Create Share Permissions for a Source
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 { |
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 User Resources and Group Resources.
Response
Success
{ |
Error
Code | Payload | Description |
---|---|---|
400 | {"code":"010001", "name":"InputValidation", | Supplied data was insufficient or incorrect. |
404 | {"code":"040009", "name":"SourceNotFound", | Source with UUID |
404 | {"code":"040004", "name":"UserNotFound", | The user with provided |
404 | {"code":"040005", "name":"GroupNotFound", | The group with provided |
409 | {"code":"060001", "name":"UserHasNoRoles", | Make sure a role is assigned to the user or to at least one of the user's groups. |
409 | {"code":"060002", "name":"GroupHasNoRoles", | Make sure a role is assigned to the group. |
500 | {"code":"070008", "name":"FindUser", | An internal error occurred while searching for user. |
500 | {"code":"070009", "name":"FindGroup", | An internal error occurred while searching for group. |