> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datris.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Change a tap's owner

> Hands an existing tap to another user or API key. Only the owner changes: the tap keeps its versions, incremental-sync state, ledger, run history, schedule and script; no tap version is written and its update time is kept. Administrators (a signed-in admin, or an API key with unscoped full access) only; every other caller gets 403 and nothing is read. For API keys, an agent policy on tap updates applies to this action as to any other tap update. From the change on, keys limited to what they created (owner=self) reach the tap through the new owner: the new owning key may read and update it, the previous owning key may not. A run or test in progress finishes as it started; the next run reads the new owner.



## OpenAPI

````yaml /openapi.yaml post /api/v1/tap/owner
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.57.1
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/tap/owner:
    post:
      tags:
        - Taps
      summary: Change a tap's owner
      description: >-
        Hands an existing tap to another user or API key. Only the owner
        changes: the tap keeps its versions, incremental-sync state, ledger, run
        history, schedule and script; no tap version is written and its update
        time is kept. Administrators (a signed-in admin, or an API key with
        unscoped full access) only; every other caller gets 403 and nothing is
        read. For API keys, an agent policy on tap updates applies to this
        action as to any other tap update. From the change on, keys limited to
        what they created (owner=self) reach the tap through the new owner: the
        new owning key may read and update it, the previous owning key may not.
        A run or test in progress finishes as it started; the next run reads the
        new owner.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              description: Exactly one of user or key.
              properties:
                name:
                  type: string
                  description: The tap.
                  example: stock-prices-tap
                user:
                  type: string
                  description: >-
                    A username; the tap is stored as owned by
                    session:<username>.
                  example: ed
                key:
                  type: string
                  description: >-
                    An issued API key's label. Revoked and unknown keys, the
                    platform's own identities (anonymous, recovery-agent,
                    system, agent) and labels starting session: or tap: are
                    refused; ui is accepted when it is an issued key.
                  example: sales-agent
      responses:
        '200':
          description: >-
            The owner was changed, or already was the one named (changed false,
            nothing written)
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  owner:
                    type: string
                    example: sales-agent
                  previousOwner:
                    type: string
                    nullable: true
                    example: session:ada
                  changed:
                    type: boolean
                  warnings:
                    type: array
                    description: >-
                      Findings datris doctor reports that do not decide the
                      change (a target pipeline that does not exist, callback
                      reads the new owner's access narrows, a tap secret outside
                      the new owner's tap access), in the doctor rows' words.
                    items:
                      type: string
        '400':
          description: >-
            Both or neither of user and key; unknown user; unknown, revoked or
            reserved key; a catalog placeholder
        '403':
          description: >-
            Refused, and nothing about the tap is read: the caller is not an
            administrator or a full-access API key, or an agent policy on tap
            updates refuses the API key. The error text depends on which check
            refused the request.
        '404':
          description: No such tap
        '409':
          description: >-
            The new owner could not edit the tap where it is or may not load
            into its target pipeline; or the tap was moved or repointed while
            the change was being checked. Nothing was changed.
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.