Access
Create access grant
POST
Create access grant. Scoped to the resource named by resource_id.
header
AuthorizationBearer <esk_live_…>A workspace API key created in workspace settings. It acts as the member who created it, narrowed to its abilities, projects and credit limit. Each operation names the ability it needs.
Scope: sharing:write
resource_type*stringValue in
"asset""chat_conversation""canvas""project""scheduled_task""skill""element""connector_credential"resource_id*stringFormat
uuidEndless-Api-Version?stringPin the caller to an API major (1). Omit to accept the current version. A major this deployment cannot serve is refused with 400 unsupported_api_version.
application/json- body
user_id*stringMatch
^user_role?stringValue in
"viewer""editor""manager"OK
application/json- response
resource_type*stringValue in
"asset""chat_conversation""canvas""project""scheduled_task""skill""element""connector_credential"resource_id*stringowner_id*string|nulltitle*string|nullrole*stringValue in
"viewer""editor""manager""owner"shared*booleancapabilities*can_leave*booleangeneral_access*general_access_editable*booleanworkspace_roles?array<>editable_by_others*boolean|nullgrants*array<>inherited*array<>can_publish*booleancan_file?booleanpublic_link*|nullcurl -X POST 'https://api.endless.app/access/asset/497f6eca-6276-4993-bfeb-53cbbbba6f08/grants' \ -H 'Content-Type: application/json' \ -d '{ "user_id": "string"}'Example Response
{ "resource_type": "asset", "resource_id": "string", "owner_id": "string", "title": "string", "role": "viewer", "shared": true, "capabilities": { "can_edit": true, "can_manage_people": true, "can_change_general_access": true, "can_delete": true }, "can_leave": true, "general_access": { "visibility": "private", "workspace_role": "viewer" }, "general_access_editable": true, "workspace_roles": [ "viewer" ], "editable_by_others": true, "grants": [ { "id": "string", "user_id": "string", "role": "viewer", "granted_by_id": "string", "created_at": "2019-08-24T14:15:22Z", "role_without_grant": "viewer" } ], "inherited": [ { "kind": "chat", "id": "string", "title": "string", "emoji": "string", "via": "origin", "role": "viewer", "through": "chat", "audience": true } ], "can_publish": true, "can_file": true, "public_link": { "show_prompts": true, "show_owner": true, "token": "string", "snapshot_at": "2019-08-24T14:15:22Z", "snapshot_behind": true, "created_at": "2019-08-24T14:15:22Z" }}