Creates a share permission for a source (i.e., the specified user or group is given access to the source).
Authorizations: Sources - ACCESS
Requests
POST /apis/sources/:sourceId/shares
{
"id": "a78758cc-48da-47ad-bc6e-6c8564badb7e",
"shareType": "USER",
"permission": "EDIT",
"name": "viewer"
}
Parameters
|
Property |
JSON Type |
Property Type |
Description |
|---|---|---|---|
|
id |
UUID |
Immutable |
Group ID or user ID. Identifies the share entity. |
|
shareType |
String |
Required Immutable |
Accepted values, GROUP or USER:
|
|
permission |
String |
Required |
Permission level granted to the group or user. Accepted values: WATCH, EDIT, OWN, or <uuid> of admin-defined access permission. |
|
name |
String |
Optional |
Group name or user name. |
Note
Either id or name must be present. If both are provided, id is used. See (4.1) User Resources and (4.1) Group Resources.
Response
Success
{
"data": {
"id": "a78758cc-48da-47ad-bc6e-6c8564badb7e",
"shareType": "USER",
"permission": "EDIT",
"name": "viewer",
"email": null
}
}
Error
|
Code |
Payload |
Description |
|---|---|---|
|
|
|
Supplied data was insufficient or incorrect. |
|
|
|
Source with UUID |
|
|
|
The user with provided |
|
|
|
The group with provided |
|
|
|
Make sure a role is assigned to the user or to at least one of the user's groups. |
|
|
|
Make sure a role is assigned to the group. |
|
|
|
An internal error occurred while searching for user. |
|
|
|
An internal error occurred while searching for group. |