Shares
Methods for creating and managing shared authorization tokens
CreateShare
objectId,
objectIds,
expiresAt,
params // optional
}) → Promise.<Object>
Create a share
Returns: Info about the created share
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The ID of the object to share |
objectIds | Array.<string> | ✓ | Additional object IDs to authorize |
expiresAt | Date | ✓ | The expiration time of the share |
params | Object | Additional parameters |
RedeemShareToken
Retrieve the authorization token for the specified share
Returns: The authorization token for the share
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
shareId | string | ✓ | The ID of the share |
RevokeShare
Revoke the specified share
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
shareId | string | ✓ | The ID of the share to modify |
ShareInfo
Retrieve info about the specified share
Returns: Info about the share
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
shareId | string | ✓ | The ID of the share |
Shares
objectId, // optional
limit, // optional
offset, // optional
params // optional
}) → Promise.<Array.<Object>>
List shares associated with your tenancy
Returns: Info about the shares
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | If specified, the results will be limited shares for the specified object | |
limit | number | Maximum number of results to return (default:100) | |
offset | number | Offset from which to return results (default:0) | |
params | Object | Additional parameters (default:{}) |
UpdateShare
shareId,
expiresAt, // optional
params // optional
}) → Promise.<Object>
Update the specified share
Returns: Info about the updated share
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
shareId | string | ✓ | The ID of the share to modify |
expiresAt | Date | The new expiration time of the share | |
params | Object | Additional parameters |