Skip to main content

Shares

Methods for creating and managing shared authorization tokens

CreateShare

CreateShare({
  objectId,
  objectIds,
  expiresAt,
  params // optional
}) → Promise.<Object>

Create a share

Returns: Info about the created share

Parameters

NameTypeRequiredDescription
objectIdstring

The ID of the object to share

objectIdsArray.<string>

Additional object IDs to authorize

expiresAtDate

The expiration time of the share

paramsObject

Additional parameters

RedeemShareToken

RedeemShareToken({ shareId }) → Promise.<Object>

Retrieve the authorization token for the specified share

Returns: The authorization token for the share

Parameters

NameTypeRequiredDescription
shareIdstring

The ID of the share

RevokeShare

RevokeShare({ shareId })

Revoke the specified share

Parameters

NameTypeRequiredDescription
shareIdstring

The ID of the share to modify

ShareInfo

ShareInfo({ shareId }) → Promise.<Object>

Retrieve info about the specified share

Returns: Info about the share

Parameters

NameTypeRequiredDescription
shareIdstring

The ID of the share

Shares

Shares({
  objectId, // optional
  limit, // optional
  offset, // optional
  params // optional
}) → Promise.<Array.<Object>>

List shares associated with your tenancy

Returns: Info about the shares

Parameters

NameTypeRequiredDescription
objectIdstring

If specified, the results will be limited shares for the specified object

limitnumber

Maximum number of results to return

(default: 100)
offsetnumber

Offset from which to return results

(default: 0)
paramsObject

Additional parameters

(default: {})

UpdateShare

UpdateShare({
  shareId,
  expiresAt, // optional
  params // optional
}) → Promise.<Object>

Update the specified share

Returns: Info about the updated share

Parameters

NameTypeRequiredDescription
shareIdstring

The ID of the share to modify

expiresAtDate

The new expiration time of the share

paramsObject

Additional parameters