View, update and manage the sharing rights for a data source.

GET /datasources/{id}/share-rights

DescriptionGet the sharing right details for the specific datasource id.
Permissionsdashboard.library
Resource URLhttps://app.klipfolio.com/api/1.0/datasources/{id}/share-rights
Parametersid={datasource id}
Response codes401 — Access denied to users from other companies and users with no share right
404 — 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

DescriptionUpdate 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.
Permissionsdatasource.share
Resource URLhttps://app.klipfolio.com/api/1.0/datasources/{id}/share-rights
Parametersid={datasource id}
Response codes400 — 'groups' missing in post data or poorly formatted post data
401 — Access denied to users from other companies and users with no share right
403 — forbidden to share across companies
404 — 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}

DescriptionRevoke user access or group access to a data source.
Permissionsdatasource.share
Resource URLhttps://app.klipfolio.com/api/1.0/datasources/{id}/share-rights/{group-id}
ParametersNone.
Response codes400 — missing {group-id}
401 — access denied to users from other companies and users with no share right
403 — data source is not shared with group
404 — {id} or {group-id} not found

Example Request

For Groups use the data source ID and group ID: DELETE https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef/share-rights/fedcba9876543210fedcba9876543210

For Users use the data source ID and user ID: DELETE https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef/share-rights/abcdef9876543210abcdef9876543210?type=user

Example Response

{
   "data": {},
   "meta": {
       "status": 200,
       "success": true
   }
}