Skip to main content

Sharing

Library access control and sharing with users and teams.

GET /api/libraries/{id}/shares

List all shares for a library.

Authentication: Required

Path Parameters:

ParameterTypeDescription
idstringLibrary ID or natural ID

Response:

{
"_links": {
"self": { "href": "/api/libraries/{id}/shares" }
},
"_embedded": {
"inf:share": [
{
"principalId": "team:engineering",
"libraryId": "550e8400-e29b-41d4-a716-446655440000",
"accessLevel": 1
},
{
"principalId": "alice",
"libraryId": "550e8400-e29b-41d4-a716-446655440000",
"accessLevel": 1
}
]
},
"start": 0,
"count": 2,
"total": 2
}

Access Levels:

LevelNameDescription
0NONENo access
1READRead-only access to indexed files

GET /api/libraries/{id}/shares/{principalId}

Get a specific share for a principal (user or team).

Authentication: Required

Path Parameters:

ParameterTypeDescription
idstringLibrary ID or natural ID
principalIdstringUser ID or team ID (e.g., team:engineering)

Response:

{
"principalId": "team:engineering",
"libraryId": "550e8400-e29b-41d4-a716-446655440000",
"accessLevel": 1
}

PUT /api/libraries/{id}/shares/{principalId}

Create or update a share for a principal.

Authentication: Required

Permissions: Requires library:write permission

Path Parameters:

ParameterTypeDescription
idstringLibrary ID or natural ID
principalIdstringUser ID or team ID

Request Body:

FieldTypeRequiredDescription
accessLevelintegerYesAccess level (0 = NONE, 1 = READ)

Example:

{
"accessLevel": 1
}

Response:

200 OK

{
"principalId": "team:data-science",
"libraryId": "550e8400-e29b-41d4-a716-446655440000",
"accessLevel": 1
}

DELETE /api/libraries/{id}/shares/{principalId}

Remove a share for a principal.

Authentication: Required

Permissions: Requires library:write permission

Path Parameters:

ParameterTypeDescription
idstringLibrary ID or natural ID
principalIdstringUser ID or team ID

Response:

204 No Content