ReferenceAPI ReferenceSharing

Sharing

⚠️

Sharing is a Pro Edition feature. In the Community Edition, these endpoints return 501 Not Implemented. To enable sharing, deploy the sharing plugin via the Pro compose overlay.

Sharing endpoints manage access grants and ownership transfers for platform resources. They enable multi-user collaboration by allowing resource owners to grant read, write, or admin permissions to other users.

All sharing endpoints require authentication.


Endpoints

MethodEndpointDescription
POST/api/v1/sharingGrant access to a resource
GET/api/v1/sharingList access grants for a resource
DELETE/api/v1/sharing/{id}Revoke an access grant
POST/api/v1/sharing/transferTransfer resource ownership

Permission Levels

PermissionDescription
readView the resource (pipeline details, run history, table data)
writeModify the resource, trigger runs, edit files
adminFull control including sharing with others and deletion

Permissions are cumulative: admin includes write, which includes read.


Grant Access

POST /api/v1/sharing

Grants a user access to a resource at the specified permission level.

Request Body

FieldTypeRequiredDescription
grantee_idstringYesUser ID to grant access to
resource_typestringYesResource type: pipeline, namespace, landing_zone
resource_idstringYesResource UUID
permissionstringYesPermission level: read, write, or admin

Request

curl -X POST http://localhost:8080/api/v1/sharing \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "grantee_id": "user-123",
    "resource_type": "pipeline",
    "resource_id": "pipeline-uuid",
    "permission": "read"
  }'

Response — 201 Created

{
  "id": "grant-uuid",
  "grantor_id": "owner-user-id",
  "grantee_id": "user-123",
  "resource_type": "pipeline",
  "resource_id": "pipeline-uuid",
  "permission": "read",
  "created_at": "2026-02-15T10:00:00Z"
}

Response Fields

FieldTypeDescription
idstringGrant UUID
grantor_idstringUser ID who created the grant
grantee_idstringUser ID who received the grant
resource_typestringResource type
resource_idstringResource UUID
permissionstringPermission level
created_atstringISO 8601 creation timestamp

Error Responses

StatusCodeDescription
400INVALID_ARGUMENTMissing required fields or invalid permission level
401AUTHENTICATIONAuthentication required
403AUTHORIZATIONYou do not have permission to share this resource (need admin permission)
404NOT_FOUNDResource not found
501UNAVAILABLESharing not available (Community Edition)

List Access Grants

GET /api/v1/sharing

Returns all access grants for a specific resource.

Query Parameters

ParameterTypeRequiredDescription
resource_typestringYesResource type: pipeline, namespace, landing_zone
resource_idstringYesResource UUID

Request

curl "http://localhost:8080/api/v1/sharing?resource_type=pipeline&resource_id=pipeline-uuid" \
  -H "Authorization: Bearer $TOKEN"

Response — 200 OK

{
  "grants": [
    {
      "id": "grant-uuid-1",
      "grantor_id": "owner-user-id",
      "grantee_id": "user-123",
      "resource_type": "pipeline",
      "resource_id": "pipeline-uuid",
      "permission": "read",
      "created_at": "2026-02-15T10:00:00Z"
    },
    {
      "id": "grant-uuid-2",
      "grantor_id": "owner-user-id",
      "grantee_id": "user-456",
      "resource_type": "pipeline",
      "resource_id": "pipeline-uuid",
      "permission": "write",
      "created_at": "2026-02-15T11:00:00Z"
    }
  ],
  "total": 2
}

Error Responses

StatusCodeDescription
400INVALID_ARGUMENTMissing resource_type or resource_id
401AUTHENTICATIONAuthentication required
501UNAVAILABLESharing not available (Community Edition)

Revoke Access

DELETE /api/v1/sharing/{id}

Revokes an access grant. Only the grant creator or the resource owner can revoke a grant.

Path Parameters

ParameterTypeDescription
idstringGrant UUID

Request

curl -X DELETE http://localhost:8080/api/v1/sharing/grant-uuid \
  -H "Authorization: Bearer $TOKEN"

Response — 204 No Content

No response body.

Error Responses

StatusCodeDescription
401AUTHENTICATIONAuthentication required
403AUTHORIZATIONOnly the grant creator or resource owner can revoke
404NOT_FOUNDGrant not found
501UNAVAILABLESharing not available (Community Edition)

Transfer Ownership

POST /api/v1/sharing/transfer

Transfers ownership of a resource to another user. Only the current owner can transfer ownership. Currently supports pipeline resource type only.

Request Body

FieldTypeRequiredDescription
resource_typestringYesResource type (currently only pipeline)
resource_idstringYesResource UUID
to_user_idstringYesUser ID of the new owner

Request

curl -X POST http://localhost:8080/api/v1/sharing/transfer \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "resource_type": "pipeline",
    "resource_id": "pipeline-uuid",
    "to_user_id": "user-456"
  }'

Response — 200 OK

{
  "transferred": true,
  "resource_id": "pipeline-uuid",
  "new_owner": "user-456"
}

Response Fields

FieldTypeDescription
transferredbooleanAlways true on success
resource_idstringResource UUID
new_ownerstringUser ID of the new owner

Error Responses

StatusCodeDescription
400INVALID_ARGUMENTUnsupported resource type (only pipeline is supported)
401AUTHENTICATIONAuthentication required
403AUTHORIZATIONOnly the current owner can transfer ownership
404NOT_FOUNDResource not found
501UNAVAILABLESharing not available (Community Edition)

Ownership transfer is atomic — the old owner loses admin permission and the new owner gains it in a single operation. Existing grants from other users are preserved.