List collection shares
GET
/api/collections/{id}/shares
const url = 'https://firma.company-gpt.com/companygpt/rag/api/api/collections/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/shares';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://firma.company-gpt.com/companygpt/rag/api/api/collections/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/shares \ --header 'Authorization: Bearer <token>'List shares for a collection. Only collection owners may list shares.
Authorizations
Abschnitt betitelt „Authorizations“Parameters
Abschnitt betitelt „Parameters“Path Parameters
Abschnitt betitelt „Path Parameters“id
required
string format: uuid
Collection UUID
Responses
Abschnitt betitelt „Responses“List of shares
Media typeapplication/json
Array<object>
A collection share (handlers.ShareResponse)
object
id
required
string format: uuid
collection_id
required
string format: uuid
type
required
string
target
required
Email for “user” shares, Entra object ID for “entra_user”/“entra_group” shares, empty for “public”
string
targetDisplay
required
Human-readable label (e.g. resolved Entra group name); falls back to “target”
string
name
Display name of the principal, when known
string
email
Address of the principal, when known (groups usually have none)
string
role
required
“owner” shares express collection ownership; a collection always has at least one and they are only valid for “user”/“entra_user” shares.
string
created_at
required
string format: date-time
Example
[ { "type": "user", "role": "viewer" }]Invalid collection ID
Unauthorized
Forbidden — only collection owners may list shares
Collection not found