View, update and manage the sharing rights for a data source.
GET /datasources/{id}
/share-rights
{id}
/share-rightsField | Description |
---|---|
Description | Get the sharing right details for the specific datasource ID. |
Permissions | dashboard.library |
Resource URL | https://app.klipfolio.com/api/1.0/datasources/{id} /share-rights |
Parameters | id={datasource id} |
Response codes | 401 — Access denied to users from other companies and users with no share right404 — Data source not found |
Example Request
GET https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef/share-rights
Example Response
{
"meta": {
"success": true,
"status": 200
},
"data": {
"share_rights": [
{
"group_id": "some grp id",
"group_name": "Admin",
"can_edit": false
}
],
"user_share_rights": [
{
"user_id": "some user id",
"first_name": "Mark",
"last_name": "Adams",
"can_edit": true
}
]
}
}
PUT /datasources/{id}
/share-rights
{id}
/share-rightsField | Description |
---|---|
Description | Update a data source's share rights. If the data source is not already shared with the specified group, a new share right is created; otherwise, the existing right is updated. |
Permissions | datasource.share |
Resource URL | https://app.klipfolio.com/api/1.0/datasources/{id} /share-rights |
Parameters | id={datasource id} |
Response codes | 400 — 'groups' missing in post data or poorly formatted post data401 — Access denied to users from other companies and users with no share right403 — Forbidden to share across companies404 — Data source not found |
Example Request
PUT https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef/share-rights \
-d '{
"users": [
{
"user_id": "abcdef0123456789986543210",
"can_edit": true
}
],
"groups": [
{
"group_id": "abcdef0123456789986543210",
"can_edit": false
}
]
}'
Example Response
{
"meta": {
"status": 200,
"success": true
}
}
DELETE /datasources/{id}
/share-rights/{group-id}
or {user-id}
{id}
/share-rights/{group-id}
or {user-id}
Field | Description |
---|---|
Description | Revoke user access or group access to a data source. |
Permissions | datasource.share |
Resource URL | https://app.klipfolio.com/api/1.0/datasources/{id} /share-rights/{group-id} |
Parameters | None |
Response codes | 400 — Missing {group-id} 401 — Access denied to users from other companies and users with no share right403 — Data source is not shared with group404 — {id} or {group-id} not found |
Example Request
For Groups:
DELETE https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef/share-rights/fedcba9876543210fedcba9876543210
For Users:
DELETE https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef/share-rights/abcdef9876543210abcdef9876543210?type=user
Example Response
{
"data": {},
"meta": {
"status": 200,
"success": true
}
}