ckanaction

package_collaborator_create

POST
package_collaborator_create

Make a user a collaborator in a dataset.

If the user is already a collaborator in the dataset then their capacity will be updated.

Currently you must be an Admin on the dataset owner organization to manage collaborators.

Note: This action requires the collaborators feature to be enabled with the ckan.auth.allow_dataset_collaborators configuration option.

Authorization

apiTokenHeader
headerAuthorization<token>

CKAN API token

Request Body

application/json
  1. body
id?string

the id or name of the dataset

user_id?string

the id or name of the user to add or edit

capacity?string

the capacity or role of the membership. Must be one of "editor" or "member". Additionally if ckan.auth.allow_admin_collaborators is set to True, "admin" is also allowed.

Example Request
curl -X POST 'http://localhost:5000/api/3/action/package_collaborator_create' \  -H 'Content-Type: application/json' \  -d '{}'