Skip to main content
POST
/
permissions
/
datasets
/
{username}
/
{namespace}
/
{datasetName}
/
shares
Share a dataset with a user
curl --request POST \
  --url https://api.datalinks.com/api/v1/permissions/datasets/{username}/{namespace}/{datasetName}/shares \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "username": "alice",
  "role": "viewer"
}
'
{
  "error_code": "UNAUTHORIZED",
  "message": "Missing authentication token",
  "error_message": "",
  "sub_errors": [
    {
      "code": "<string>",
      "message": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Use a Bearer token for authentication. Submit the token using the Authorization header: Authorization: Bearer <token>.

Path Parameters

username
string
required

The username associated with the request.

namespace
string
required

Namespace for the dataset.

datasetName
string
required

Name of the dataset.

Body

application/json
username
string
required

Username of the user to grant or revoke access for.

Example:

"alice"

role
enum<string>
required

Access level. 'viewer' is read-only; 'editor' is read and write.

Available options:
viewer,
editor
Example:

"viewer"

Response

Access was granted.