Skip to main content

Sharing

View as Markdown

List Recipient Share Permissions GA

GET /api/2.1/unity-catalog/recipients/{name}/share-permissions

Gets the share permissions for the specified Recipient. The caller must have the USE_RECIPIENT privilege on the metastore or be the owner of the Recipient.

API scopes: sharing

Parameters

namestringRequiredpath

The name of the Recipient.

max_resultsint32query

Maximum number of permissions to return.

  • when set to 0, the page length is set to a server configured value (recommended);
  • when set to a value greater than 0, the page length is the minimum of this value and a server configured value;
  • when set to a value less than 0, an invalid parameter error is returned;
  • If not set, all valid permissions are returned (not recommended).
  • Note: The number of returned permissions might be less than the specified max_results size, even zero. The only definitive indication that no further permissions can be fetched is when the next_page_token is unset from the response.

Constraints: <= 1000

page_tokenstringquery

Opaque pagination token to go to next page based on previous query.

Response

permissions_outarray of object

An array of data share permissions for a recipient.

Show child attributesHide child attributes
share_namestring

The share name.

privilege_assignmentsarray of object

The privileges assigned to the principal.

Show child attributesHide child attributes
principalstring

The principal (user email address or group name). For deleted principals, principal is empty while principal_id is populated.

privilegesarray of string

The privileges assigned to the principal.

Example: SELECT

next_page_tokenstring

Opaque token to retrieve the next page of results. Absent if there are no more pages. page_token should be set to this value for the next request (for the next page of results).

List Share Permissions GA

GET /api/2.1/unity-catalog/shares/{name}/permissions

Gets the permissions for a data share from the metastore. The caller must have the USE_SHARE privilege on the metastore or be the owner of the share.

API scopes: sharing

Parameters

namestringRequiredpath

The name of the share.

max_resultsint32query

Maximum number of permissions to return.

  • when set to 0, the page length is set to a server configured value (recommended);
  • when set to a value greater than 0, the page length is the minimum of this value and a server configured value;
  • when set to a value less than 0, an invalid parameter error is returned;
  • If not set, all valid permissions are returned (not recommended).
  • Note: The number of returned permissions might be less than the specified max_results size, even zero. The only definitive indication that no further permissions can be fetched is when the next_page_token is unset from the response.

Constraints: <= 1000

page_tokenstringquery

Opaque pagination token to go to next page based on previous query.

Response

next_page_tokenstring

Opaque token to retrieve the next page of results. Absent if there are no more pages. page_token should be set to this value for the next request (for the next page of results).

privilege_assignmentsarray of object

The privileges assigned to each principal

Show child attributesHide child attributes
principalstring

The principal (user email address or group name). For deleted principals, principal is empty while principal_id is populated.

privilegesarray of string

The privileges assigned to the principal.

Example: SELECT