Collection users
Handle permissions and user management for a specific collection.
Was this helpful?
Handle permissions and user management for a specific collection.
Was this helpful?
Was this helpful?
Control which users have access to a collection's spaces. This ensures only the right individuals can view or modify sensitive content.
The unique id of the collection
Role to set.
"The role of a member in an organization. "admin": Can administrate the content: create, delete spaces, ... "create": Can create content. "review": Can review content. "edit": Can edit the content (live or change requests). "comment": Can access the content and its discussions. "read": Can access the content, but cannot update it in any way.
OK
No team or user with the provided Id
The unique id of the collection
Identifier of the page results to fetch.
The number of results per page
Listing of users who have been added to a collection.
No space found with the given Id
The unique id of the collection
The unique ID of the User
The role of a member in an organization, null for guests
"The role of a member in an organization. "admin": Can administrate the content: create, delete spaces, ... "create": Can create content. "review": Can review content. "edit": Can edit the content (live or change requests). "comment": Can access the content and its discussions. "read": Can access the content, but cannot update it in any way.
User permission was updated
No user found with the given ID
The unique id of the collection
Identifier of the page results to fetch.
The number of results per page
"The role of a member in an organization. "admin": Can administrate the content: create, delete spaces, ... "create": Can create content. "review": Can review content. "edit": Can edit the content (live or change requests). "comment": Can access the content and its discussions. "read": Can access the content, but cannot update it in any way.
Listing of users who can access the collections.
No content
No content
Listing of users who can access the collections.
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"permission": "admin",
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
}
}
]
}
POST /v1/collections/{collectionId}/permissions HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 33
{
"role": "admin",
"teams": [
"text"
]
}
GET /v1/collections/{collectionId}/permissions/users HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"permission": "admin",
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
}
}
]
}
DELETE /v1/collections/{collectionId}/permissions/users/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
PATCH /v1/collections/{collectionId}/permissions/users/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"role": "admin"
}
GET /v1/collections/{collectionId}/permissions/aggregate HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*