Change a binding role
curl --request PATCH \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/access/{principal_type}/{principal_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/access/{principal_type}/{principal_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/access/{principal_type}/{principal_id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"object": "collection.access",
"collection_id": "<string>",
"principal_type": "user",
"principal_id": "<string>",
"role": "owner",
"email": "<string>"
}{
"error": "InvalidArguments",
"message": "<string>"
}Sharing
Change a binding role
PATCH
/
v1
/
collections
/
{collection_id}
/
access
/
{principal_type}
/
{principal_id}
Change a binding role
curl --request PATCH \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/access/{principal_type}/{principal_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/access/{principal_type}/{principal_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/access/{principal_type}/{principal_id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"object": "collection.access",
"collection_id": "<string>",
"principal_type": "user",
"principal_id": "<string>",
"role": "owner",
"email": "<string>"
}{
"error": "InvalidArguments",
"message": "<string>"
}Authorizations
BearerAuthOrgApiKeyAuth
User session JWT. Send as Authorization: Bearer <token>.
Path Parameters
Collection identifier returned at creation.
Available options:
user, group, org Body
application/json
Available options:
reader, editor, admin Was this page helpful?