Skip to content

Create an asset share

Request

Create an AssetShare.

Security
bearerToken
Bodyapplication/jsonrequired
assetIdsArray of stringsrequired

The set of Asset identifiers that have been shared

Example:
[ "7af90a8b-7ccd-430f-a85d-e8614015bc47", "024e1b06-4bda-4630-a788-8063a5b9df85" ]
expirystring or null, (date-time)required

The datetime the share will expire and no longer be accessible in ISO datetime format. If the expiry is null, the share will never expire.

Example:"2021-02-17T09:24:01.417Z"
assetPermittedActionsstring

Permissions users have on assets they are viewing

Default:"VIEW_AND_DOWNLOAD"
Enum:"VIEW""VIEW_AND_DOWNLOAD"
Example:"VIEW"
curl -i -X POST \
  https://api-v2.dash.app/asset-shares \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "assetIds": [
      "7af90a8b-7ccd-430f-a85d-e8614015bc47",
      "024e1b06-4bda-4630-a788-8063a5b9df85"
    ],
    "expiry": "2021-02-17T09:24:01.417Z",
    "assetPermittedActions": "VIEW"
  }'

Responses

Success

Bodyapplication/json
resultobjectrequired
permittedActionsArray of objectsrequired
Response
{ "result": { "id": "4517a7ba-a482-4211-b97e-f4256f53fd32", "accountId": "cfb665ca-ce35-4418-b9d5-70ee815db4bd", "author": {}, "assetIds": [], "expiry": "2021-02-17T09:24:01.417Z", "assetPermittedActions": "VIEW", "valid": true }, "permittedActions": [ {} ] }