Data Source Share Rights

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

GET /datasources/{id}/share-rights

FieldDescription
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

FieldDescription
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}

FieldDescription
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:

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
  }
}