Record the fact that some asset metadata suggestions have been rejected, and should therefore not be suggested again for the given asset.
- Get the status of metadata suggestions for assets
Dash API (2.0.0)
If the standard PUT, PATCH and DELETE methods cannot adequately describe an operation on a resource the operation may itself be treated as a resource and the endpoint URLs will reflect this accordingly. For example making a POST to /asset-uploads returns an AssetUpload resource which describes the URL(s) the client should PUT the binary data to upload a file to an asset.
If an operation is unlikely to complete via a synchronous REST call, or asynchronous behaviour is simply preferable, job resource endpoints may provided for the operation. Created job resources can then be periodically polled to Get the status of the operation. Such endpoints can be expected to contain a job qualifier. e.g /asset-download-jobs and /asset-download-jobs/{id}
All job resources can be expected to conform to a polymorphic job structure with common properties such as id, progress and type specific properties such as dateCompleted for successfully completed jobs.
If an operation can be applied to multiple resources an endpoint may provided to create a batch resource for the operation. Such endpoints can be expected to contain a batch qualifier. As batch operations almost always need to be asynchronous you can expect to see both qualifiers in the endpoint URL e.g /asset-download-batch-jobs and /asset-download-batch-jobs/{id}.
In most responses from the Dash API you will find a permittedActions property alongside a result property which contains the resource. This is to provide context for operations the current user is permitted to perform on that resource.
If an expected permitted action is not included in the permittedActions property then the current user does not have permission to perform the action.
The GET Current User endpoint houses permitted actions which are not associated with a specific API resource instance. e.g. If the current user has permission to create new Asset resources then the GET Current User permittedActions property will contain the permitted action ASSETS : CREATE_ASSETS.
Asset.metadata consists of a map of String to String[]
The keys for map are Field IDs. Full details, including the field name, can be got via the GET Field endpoint or the full list of fields for an account can be retrieved via the GET Fields endpoint.
The map values are a list of plain text values if Field.hasFixedOptions = false or a list of FieldOption IDs if Field.hasFixedOptions = true
Where Field.hasFixedOptions = true details, including the field option name, can be got via the GET Field Option endpoint.
Where Field.hierarchical = true the complete branch of the tree will be returned and can be constructed via the FieldOption.parent property.
The full list of fields for an account can be retrieved via the GET Fields endpoint.
Where Field.hasFixedOptions = true the POST Field Option Searches endpoint can be used to get the available options.
Where Field.hierarchical = true you should start with a PARENT_ID FIELD_IS_EMPTY query to get the top level options and then PARENT_ID FIELD_EQUALS queries to get each sub-level.
A Folder in Dash is simply a FieldOption, for the built-in Folders Field. To determine the ID of the Folders Field, use the Folder Settings endpoint. Once you have this ID, Folders behave the same as any other Field.
For getting the folder tree see Getting fields and field options for asset metadata and Getting the full schema of fields and field options
For getting assets in folders see AssetSearch
For getting assets in no folders see the Search for field is empty example in the POST Asset Searches endpoint.
Assets are the main resources in Dash. An asset consists of a file, some fixed properties (such as the date the asset was added to Dash) and custom metadata.
To create new assets and upload files:
- Create an Asset and Upload batch job
- Wait for the job to complete by checking the GET Asset and upload batch job endpoint
- The completed job includes an
AssetUploadresources in the job'sresultproperty. For each file you want to upload:- Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding
AssetUploadPart. - Get the
etagproperty from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion)
- Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding
- The assets will be created with a lifecycle status of
STAGED. Use the POST Asset lifecycle transition batch job endpoint if you'd like to change the state of the assets (e.g. toPENDING_APPROVALorLIVE).
- Create an
AssetUploadvia the POST Asset Upload endpoint - Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding
AssetUploadPart. - Get the
etagproperty from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion)
The current AssetFile for an Asset is returned in the Asset resource via the Asset.currentFile property.
The GET Asset Files endpoint can be used to get all AssetFile resources for an Asset
Edit the contents of one or more Asset.metadata map properties via the POST Asset Metadata Edit Batch Job endpoint and check on the progress and status of the edit via the GET Asset Metadata Edit Batch Job endpoint.
- Get the current user ID from the current user details
- Use this ID in the
ASSOCIATED_WITH_USERcriterion of the POST Collection Search endpoint to get all collections a user has access to. - To get the
Assetresources in each collection see the All assets in a collection and Search within assets in a collection examples in the POST Asset Searches endpoint for how to specify theCollection.idin aCOLLECTIONS:FIELD_EQUALScriterion.
See the Search by file extension and Search by multiple file extensions example in the POST Asset Searches endpoint
The following date properties exist on an asset and can be supplied as FIXED field criteria in the POST Asset Searches endpoint
Asset.lifecycleStatus.dateStaged: The datetime theAssetwas created but not yet live.DATE_STAGEDin search criteria.Asset.lifecycleStatus.datePendingApproval: The datetime theAssetwas set for approval (if it was).DATE_PENDING_APPROVALin search criteria.Asset.lifecycleStatus.dateLive: The datetime theAssetwas put live.DATE_LIVEin search criteria.Asset.currentAssetFile.dateAdded: The datetime the latestAssetFilewas added.DATE_LAST_ASSET_FILE_ADDEDin search criteria.Asset.dateLastModified: The datetime the any change was made to anAsset. This includes all of the above and any change to custom metadataDATE_LAST_MODIFIEDin search criteria.
There is currently no way to determine if only custom metadata has changes.
Several breaking changes have been introduced in the switch from V1 to V2, which are all the result of three changes.
- The domain is changing from
brightdash.apptodash.app. All URLs used to access the API, including for authorisation, should be updated to the new domain. - The concept of "asset staging status" has been renamed to "asset lifecycle" with the introduction of the bin, which adds another state for assets that isn't just about the staging workflow. This second change manifests in the changing of the StagingWorkflowTransitionBatchJob to the LifecycleTransitionBatchJob, a refactoring of the asset model to bring the "date added" and "added by" fields together with other lifecycle information, and the renaming of the "date added" and "added by" fields to the more specific "date live" and "staged by".
- Asset batch jobs used to only support carrying out operations on assets by a search criterion. This has been extended to also allow performing operations by id, so the "criterion" field has changed to a "selector" field which supports objects of either type.
- The term
Attributehas been renamed toFieldthroughout, to mirror the change of terminology within the Dash frontend.
All these changes are described in more specific detail below.
- The path of this endpoint has changed from
asset-staging-workflow-transition-batch-jobstoasset-lifecycle-transition-batch-jobs. criterionin the POST body has becomeselector, and the criterion now needs to be wrapped in the following{"type": "BY_CRITERION", "criterion": {...}}.
For both scroll and paged searches:
- The following
criterion.field.fieldNameandsorts.field.fieldNamevalues have been renamed:DATE_ADDED->DATE_LIVEADDED_BY->STAGED_BY
- The
stagingStatus,addedBy, anddateAddedfields have been removed from the response. This data can now be found in thelifecycleStatusfield.
criterionin the POST body has becomeselector, and the criterion now needs to be wrapped in the following{"type": "BY_CRITERION", "criterion": {...}}.
criterionin the POST body has becomeselector, and the criterion now needs to be wrapped in the following{"type": "BY_CRITERION", "criterion": {...}}.
- The value returned from the
searchFieldfield of search filter results of typeHARD_CODED_FREE_OPTIONhave changed fromDATE_ADDEDtoDATE_LIVE. This isn't really a breaking change as the specification says this field could return any string, but it feels worth mentioning.
- The following
criterion.field.fieldNameandsorts.field.fieldNamevalues have been renamed for both POSTing and GETting SavedSearches:DATE_ADDED->DATE_LIVEADDED_BY->STAGED_BY
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
For the most part Folders in Dash are just like any custom Field with Field.hasFixedOptions = true, Field.hierarchical = true and Field.multiValue = true.
The Folders Field also has the following behaviour.
- It cannot be deleted -
Field.indestructable = true - It is used to define
Assetpermissions for aUserGroup(currently only configurable via the Dash frontend, not via the API) - A quick browse widget of your Folders
Fieldappears on your Dash app homepage.
Folder Settings specify the Field.id of the Folders Field in your Dash.
Coming soon; contact us if you need access to this API endpoint.
The Search Filter View defines which filters appear, and the order in which they appear, in the left hand filter bar on the search page in the Dash frontend. These filters are used to build search criteria.
Filters either refer to a Field in your Dash or a one of a subset of the fixed search fields available in the search API (currently DATE_LIVE, FILE_TYPE or STAGED)
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
An Asset is the main resource in Dash. It consists of:
- One or more
AssetFileresources, detailing the versions of a file for anAsset. Only the currentAssetFilefor anAssetis returned with theAssetresource. Use GET Asset Files to retrieve allAssetFileresources for anAsset Asset.metadatawhich defines the assigned values for thisAssetforFieldresources- A number of fixed properties, e.g.
addedBytheUser.idof whoever added theAsset
For the sake of performance any Field and FieldOption resources referenced in the Asset.metadata.values will need to be retrieved separately, if required.
An ID provided by the caller to uniquely identify this item in the batch request This is will be used to match the relevant results in the batch result
The ID of the Asset the suggestion is for
The unique ID of the Field the suggestion is for
The value that was suggested and has now been rejected. This will be the ID of a FieldOption
- Productionhttps://api-v2.dash.app/rejected-asset-metadata-suggestion-batches
- Staginghttps://api-v2.dashstaging.app/rejected-asset-metadata-suggestion-batches
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-v2.dash.app/rejected-asset-metadata-suggestion-batches \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"batchItemId": "my-item-1",
"assetId": "7af90a8b-7ccd-430f-a85d-e8614015bc47",
"fieldId": "a52b5315-15b8-417f-b742-d6902108bac1",
"value": "1fc6d6c3-c42d-48ue2-b0db-5d680a58ca52"
}
]
}'{ "successes": { "property1": { … }, "property2": { … } } }
Request
Get the status of a Asset Suggestion Edit Batch Job
- Productionhttps://api-v2.dash.app/asset-metadata-suggestion-batch-jobs/{id}
- Staginghttps://api-v2.dashstaging.app/asset-metadata-suggestion-batch-jobs/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api-v2.dash.app/asset-metadata-suggestion-batch-jobs/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Success
Unique identifier of the job that has been created
The ID of the account the job is happening in
The ID of the User who created the job
The number of items that have been completed in this step so far
- In progress
- Complete
{ "id": "be161977-d44e-4888-af3c-66522e223963", "accountId": "cfb665ca-ce35-4418-b9d5-70ee815db4bd", "creatorId": "google-oauth2|110955770826801837334", "type": "IN_PROGRESS", "status": "PENDING", "progress": { "steps": [ … ] } }
Request
Move a set of Asset resources from one Asset.lifecycleStatus.state to another.
The Asset resources to be added to the batch job are specified using the AssetSearch criteria language or by a simple set of ids
If you are selecting by search criteria you must explicitly include criteria describing the state you are moving from in order to account for the fact that the Dash API will only return Assets in the 'LIVE' state by default. See the request examples for more.
- Productionhttps://api-v2.dash.app/asset-lifecycle-transition-batch-jobs
- Staginghttps://api-v2.dashstaging.app/asset-lifecycle-transition-batch-jobs
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- Move all staged by user to pending approval
- Move all in pending approval to live
- Move specific asset to pending approval
- Move specific assets to pending approval
curl -i -X POST \
https://api-v2.dash.app/asset-lifecycle-transition-batch-jobs \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"transition": "STAGED_TO_PENDING_APPROVAL",
"selector": {
"type": "BY_CRITERION",
"criterion": {
"type": "AND",
"criteria": [
{
"type": "FIELD_EQUALS",
"value": "STAGED",
"field": {
"type": "FIXED",
"fieldName": "LIFECYCLE_STATE"
}
},
{
"type": "FIELD_EQUALS",
"value": "google-oauth2|110457667287511486432",
"field": {
"type": "FIXED",
"fieldName": "STAGED_BY"
}
}
]
}
}
}'Success
Unique identifier of the job that has been created
The ID of the account the job is happening in
The ID of the User who created the job
The number of items that have been completed in this step so far
{ "id": "be161977-d44e-4888-af3c-66522e223963", "accountId": "cfb665ca-ce35-4418-b9d5-70ee815db4bd", "creatorId": "google-oauth2|110955770826801837334", "type": "IN_PROGRESS", "status": "PENDING", "progress": { "steps": [ … ] } }
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
An Asset Saved Crop Area Summary resource is a saved crop area summary for a given AssetFile of an Asset.
An Asset Saved Crop Area resource is a saved crop area for a given AssetFile of an Asset.
A Collection is a user defined set of Asset resources.
The Asset resources in a Collection are not returned with the Collection resource. To get the Asset resources you must create an Asset Search and use the Collection.id as the value in a COLLECTIONS : FIELD_EQUALS criterion.
Searching allows you to find Collection resources in your Dash matching specific criteria.
A list of sorts can also be provided to control the order in the which the results are returned.
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.
A SubdomainAvailabilityCheck is used to check whether a Dash subdomain is in use or not.
An Asset Download Event Search allows you to search and aggregate over Asset Download Events
Criteria can be constructed based on exact or ranged comparison of the queryable event fields listed in the request schema below. Some fields like USER_TYPE and DOWNLOAD_TYPE have a fixed set of possible values which can be determined from the response scheme below.
The logical operators AND, OR and NOT are provided to support complex queries based on multiple fields.
A list of sorts can also be provided to control the order in the which the results are returned.
Only the ids of referenced resources such as Portal and Asset are provided in the response, which can then be used to GET the full resources.
Aggregations operations can also be performed on the events described by the criteria, in order to, for example
- Search across all downloads and count the number of downloads for each asset
- Search downloads for a specific user and count the number of downloads per month
Note, an Asset Download Event Search will only allow you to page to 10,000 but values returned in any aggregations and the totalResults property will be correct.
Field resources define the custom metadata schema for Asset resources in your Dash account. Every Asset in your Dash account can be assigned a value or values for each Field you define.
The type and structure of the data stored against the Asset for each Field is described by a series of properties specified on the Field.
FieldOption resources define the set of valid choices for a Field when Field.hasFixedOptions = true.
An FieldOption has human-readable FieldOption.value and an FieldOption.position which determines the order in which it appears in relation to the other FieldOption resources for a Field.
If Field.hierarchical = true then FieldOption.parent is the FieldOption which is the parent node of the FieldOption in the tree. FieldOption.position then determines the order in which the option appears in relation to the other options with the same FieldOption.parent.
The FieldOption resource intentionally does not include the list of child FieldOption resources. This is to prevent costly loading of large FieldOption tree structures. FieldOption.leaf and FieldOption.numberOfChildren properties can be used to determine the number of children for a node, but it is recommended to implement a combination of lazy-loading strategies using the GET Field Option and POST Field Option Searches resources for retrieval.
e.g. Doing a GET Field Option with an FieldOption.id value found in Asset.metadata.values will give the complete branch of the tree necessary in the context of the viewing that Asset via the FieldOption.parent property. For traversing down an FieldOption tree POST Field Option Searches can be used to first get all the top-level options and then each sub level as and when needed.
Searching allows you to find FieldOption resources in your Dash matching specific criteria
Criteria can be constructed based on direct comparison or pattern matching of a set of fixed FieldOption properties.
The logical operators AND, OR and NOT are provided to support complex queries based on multiple fields.
A list of sorts can also be provided to control the order in the which the results are returned.
Coming soon; contact us if you need access to this API endpoint.
At present the Corebook integration with Dash is configured entirely within Corebook. However, Dash allows admins to set their CorebookSettings.corebookUrl, which will then show up as a "Brand" link to all users.
Coming soon; contact us if you need access to this API endpoint.
Portals allow a public (or passcode protected) view on Assets within a set of folders.
A SavedSearch is an AssetSearch(#operation/postAssetSearch).criterion and AssetSearch(#operation/postAssetSearch).sorts that have been saved by a user. The user may also chose to receive email updates every time a new asset matches the saved criterion.
Searching allows you to find SavedSearches resources in your Dash matching specific criteria.
Coming soon; contact us if you need access to this API endpoint.
The User resource contains information about a user in Dash such as their email address and their name (if provided).
Coming soon; contact us if you need access to this API endpoint.
Coming soon; contact us if you need access to this API endpoint.