@brightinteractive/platform-api 0.1.127 → 0.1.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7262,6 +7262,168 @@ class CollectionsService {
|
|
|
7262
7262
|
}
|
|
7263
7263
|
return httpParams;
|
|
7264
7264
|
}
|
|
7265
|
+
deleteCollection(id, observe = 'body', reportProgress = false, options) {
|
|
7266
|
+
if (id === null || id === undefined) {
|
|
7267
|
+
throw new Error('Required parameter id was null or undefined when calling deleteCollection.');
|
|
7268
|
+
}
|
|
7269
|
+
let localVarHeaders = this.defaultHeaders;
|
|
7270
|
+
let localVarCredential;
|
|
7271
|
+
// authentication (bearerToken) required
|
|
7272
|
+
localVarCredential = this.configuration.lookupCredential('bearerToken');
|
|
7273
|
+
if (localVarCredential) {
|
|
7274
|
+
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
|
|
7275
|
+
}
|
|
7276
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
7277
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
7278
|
+
// to determine the Accept header
|
|
7279
|
+
const httpHeaderAccepts = [
|
|
7280
|
+
'application/json'
|
|
7281
|
+
];
|
|
7282
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
7283
|
+
}
|
|
7284
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
7285
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
7286
|
+
}
|
|
7287
|
+
let localVarHttpContext = options && options.context;
|
|
7288
|
+
if (localVarHttpContext === undefined) {
|
|
7289
|
+
localVarHttpContext = new HttpContext();
|
|
7290
|
+
}
|
|
7291
|
+
let localVarTransferCache = options && options.transferCache;
|
|
7292
|
+
if (localVarTransferCache === undefined) {
|
|
7293
|
+
localVarTransferCache = true;
|
|
7294
|
+
}
|
|
7295
|
+
let responseType_ = 'json';
|
|
7296
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
7297
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
7298
|
+
responseType_ = 'text';
|
|
7299
|
+
}
|
|
7300
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
7301
|
+
responseType_ = 'json';
|
|
7302
|
+
}
|
|
7303
|
+
else {
|
|
7304
|
+
responseType_ = 'blob';
|
|
7305
|
+
}
|
|
7306
|
+
}
|
|
7307
|
+
let localVarPath = `/collections/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
|
|
7308
|
+
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
|
|
7309
|
+
context: localVarHttpContext,
|
|
7310
|
+
responseType: responseType_,
|
|
7311
|
+
withCredentials: this.configuration.withCredentials,
|
|
7312
|
+
headers: localVarHeaders,
|
|
7313
|
+
observe: observe,
|
|
7314
|
+
transferCache: localVarTransferCache,
|
|
7315
|
+
reportProgress: reportProgress
|
|
7316
|
+
});
|
|
7317
|
+
}
|
|
7318
|
+
deleteCollectionCollaborator(id, collaboratorId, observe = 'body', reportProgress = false, options) {
|
|
7319
|
+
if (id === null || id === undefined) {
|
|
7320
|
+
throw new Error('Required parameter id was null or undefined when calling deleteCollectionCollaborator.');
|
|
7321
|
+
}
|
|
7322
|
+
if (collaboratorId === null || collaboratorId === undefined) {
|
|
7323
|
+
throw new Error('Required parameter collaboratorId was null or undefined when calling deleteCollectionCollaborator.');
|
|
7324
|
+
}
|
|
7325
|
+
let localVarHeaders = this.defaultHeaders;
|
|
7326
|
+
let localVarCredential;
|
|
7327
|
+
// authentication (bearerToken) required
|
|
7328
|
+
localVarCredential = this.configuration.lookupCredential('bearerToken');
|
|
7329
|
+
if (localVarCredential) {
|
|
7330
|
+
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
|
|
7331
|
+
}
|
|
7332
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
7333
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
7334
|
+
// to determine the Accept header
|
|
7335
|
+
const httpHeaderAccepts = [
|
|
7336
|
+
'application/json'
|
|
7337
|
+
];
|
|
7338
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
7339
|
+
}
|
|
7340
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
7341
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
7342
|
+
}
|
|
7343
|
+
let localVarHttpContext = options && options.context;
|
|
7344
|
+
if (localVarHttpContext === undefined) {
|
|
7345
|
+
localVarHttpContext = new HttpContext();
|
|
7346
|
+
}
|
|
7347
|
+
let localVarTransferCache = options && options.transferCache;
|
|
7348
|
+
if (localVarTransferCache === undefined) {
|
|
7349
|
+
localVarTransferCache = true;
|
|
7350
|
+
}
|
|
7351
|
+
let responseType_ = 'json';
|
|
7352
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
7353
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
7354
|
+
responseType_ = 'text';
|
|
7355
|
+
}
|
|
7356
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
7357
|
+
responseType_ = 'json';
|
|
7358
|
+
}
|
|
7359
|
+
else {
|
|
7360
|
+
responseType_ = 'blob';
|
|
7361
|
+
}
|
|
7362
|
+
}
|
|
7363
|
+
let localVarPath = `/collections/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/collaborators/${this.configuration.encodeParam({ name: "collaboratorId", value: collaboratorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
|
|
7364
|
+
return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
|
|
7365
|
+
context: localVarHttpContext,
|
|
7366
|
+
responseType: responseType_,
|
|
7367
|
+
withCredentials: this.configuration.withCredentials,
|
|
7368
|
+
headers: localVarHeaders,
|
|
7369
|
+
observe: observe,
|
|
7370
|
+
transferCache: localVarTransferCache,
|
|
7371
|
+
reportProgress: reportProgress
|
|
7372
|
+
});
|
|
7373
|
+
}
|
|
7374
|
+
getCollection(id, observe = 'body', reportProgress = false, options) {
|
|
7375
|
+
if (id === null || id === undefined) {
|
|
7376
|
+
throw new Error('Required parameter id was null or undefined when calling getCollection.');
|
|
7377
|
+
}
|
|
7378
|
+
let localVarHeaders = this.defaultHeaders;
|
|
7379
|
+
let localVarCredential;
|
|
7380
|
+
// authentication (bearerToken) required
|
|
7381
|
+
localVarCredential = this.configuration.lookupCredential('bearerToken');
|
|
7382
|
+
if (localVarCredential) {
|
|
7383
|
+
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
|
|
7384
|
+
}
|
|
7385
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
7386
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
7387
|
+
// to determine the Accept header
|
|
7388
|
+
const httpHeaderAccepts = [
|
|
7389
|
+
'application/json'
|
|
7390
|
+
];
|
|
7391
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
7392
|
+
}
|
|
7393
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
7394
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
7395
|
+
}
|
|
7396
|
+
let localVarHttpContext = options && options.context;
|
|
7397
|
+
if (localVarHttpContext === undefined) {
|
|
7398
|
+
localVarHttpContext = new HttpContext();
|
|
7399
|
+
}
|
|
7400
|
+
let localVarTransferCache = options && options.transferCache;
|
|
7401
|
+
if (localVarTransferCache === undefined) {
|
|
7402
|
+
localVarTransferCache = true;
|
|
7403
|
+
}
|
|
7404
|
+
let responseType_ = 'json';
|
|
7405
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
7406
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
7407
|
+
responseType_ = 'text';
|
|
7408
|
+
}
|
|
7409
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
7410
|
+
responseType_ = 'json';
|
|
7411
|
+
}
|
|
7412
|
+
else {
|
|
7413
|
+
responseType_ = 'blob';
|
|
7414
|
+
}
|
|
7415
|
+
}
|
|
7416
|
+
let localVarPath = `/collections/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
|
|
7417
|
+
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
7418
|
+
context: localVarHttpContext,
|
|
7419
|
+
responseType: responseType_,
|
|
7420
|
+
withCredentials: this.configuration.withCredentials,
|
|
7421
|
+
headers: localVarHeaders,
|
|
7422
|
+
observe: observe,
|
|
7423
|
+
transferCache: localVarTransferCache,
|
|
7424
|
+
reportProgress: reportProgress
|
|
7425
|
+
});
|
|
7426
|
+
}
|
|
7265
7427
|
patchCollection(id, collectionPatchRequest, observe = 'body', reportProgress = false, options) {
|
|
7266
7428
|
if (id === null || id === undefined) {
|
|
7267
7429
|
throw new Error('Required parameter id was null or undefined when calling patchCollection.');
|
|
@@ -7389,6 +7551,133 @@ class CollectionsService {
|
|
|
7389
7551
|
reportProgress: reportProgress
|
|
7390
7552
|
});
|
|
7391
7553
|
}
|
|
7554
|
+
postCollectionAssetMembershipBatches(collectionAssetMembershipBatchRequest, observe = 'body', reportProgress = false, options) {
|
|
7555
|
+
if (collectionAssetMembershipBatchRequest === null || collectionAssetMembershipBatchRequest === undefined) {
|
|
7556
|
+
throw new Error('Required parameter collectionAssetMembershipBatchRequest was null or undefined when calling postCollectionAssetMembershipBatches.');
|
|
7557
|
+
}
|
|
7558
|
+
let localVarHeaders = this.defaultHeaders;
|
|
7559
|
+
let localVarCredential;
|
|
7560
|
+
// authentication (bearerToken) required
|
|
7561
|
+
localVarCredential = this.configuration.lookupCredential('bearerToken');
|
|
7562
|
+
if (localVarCredential) {
|
|
7563
|
+
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
|
|
7564
|
+
}
|
|
7565
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
7566
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
7567
|
+
// to determine the Accept header
|
|
7568
|
+
const httpHeaderAccepts = [
|
|
7569
|
+
'application/json'
|
|
7570
|
+
];
|
|
7571
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
7572
|
+
}
|
|
7573
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
7574
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
7575
|
+
}
|
|
7576
|
+
let localVarHttpContext = options && options.context;
|
|
7577
|
+
if (localVarHttpContext === undefined) {
|
|
7578
|
+
localVarHttpContext = new HttpContext();
|
|
7579
|
+
}
|
|
7580
|
+
let localVarTransferCache = options && options.transferCache;
|
|
7581
|
+
if (localVarTransferCache === undefined) {
|
|
7582
|
+
localVarTransferCache = true;
|
|
7583
|
+
}
|
|
7584
|
+
// to determine the Content-Type header
|
|
7585
|
+
const consumes = [
|
|
7586
|
+
'application/json'
|
|
7587
|
+
];
|
|
7588
|
+
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
7589
|
+
if (httpContentTypeSelected !== undefined) {
|
|
7590
|
+
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
7591
|
+
}
|
|
7592
|
+
let responseType_ = 'json';
|
|
7593
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
7594
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
7595
|
+
responseType_ = 'text';
|
|
7596
|
+
}
|
|
7597
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
7598
|
+
responseType_ = 'json';
|
|
7599
|
+
}
|
|
7600
|
+
else {
|
|
7601
|
+
responseType_ = 'blob';
|
|
7602
|
+
}
|
|
7603
|
+
}
|
|
7604
|
+
let localVarPath = `/collection-asset-membership-batches`;
|
|
7605
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
7606
|
+
context: localVarHttpContext,
|
|
7607
|
+
body: collectionAssetMembershipBatchRequest,
|
|
7608
|
+
responseType: responseType_,
|
|
7609
|
+
withCredentials: this.configuration.withCredentials,
|
|
7610
|
+
headers: localVarHeaders,
|
|
7611
|
+
observe: observe,
|
|
7612
|
+
transferCache: localVarTransferCache,
|
|
7613
|
+
reportProgress: reportProgress
|
|
7614
|
+
});
|
|
7615
|
+
}
|
|
7616
|
+
postCollectionCollaborator(id, collectionCollaboratorRequest, observe = 'body', reportProgress = false, options) {
|
|
7617
|
+
if (id === null || id === undefined) {
|
|
7618
|
+
throw new Error('Required parameter id was null or undefined when calling postCollectionCollaborator.');
|
|
7619
|
+
}
|
|
7620
|
+
if (collectionCollaboratorRequest === null || collectionCollaboratorRequest === undefined) {
|
|
7621
|
+
throw new Error('Required parameter collectionCollaboratorRequest was null or undefined when calling postCollectionCollaborator.');
|
|
7622
|
+
}
|
|
7623
|
+
let localVarHeaders = this.defaultHeaders;
|
|
7624
|
+
let localVarCredential;
|
|
7625
|
+
// authentication (bearerToken) required
|
|
7626
|
+
localVarCredential = this.configuration.lookupCredential('bearerToken');
|
|
7627
|
+
if (localVarCredential) {
|
|
7628
|
+
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
|
|
7629
|
+
}
|
|
7630
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
7631
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
7632
|
+
// to determine the Accept header
|
|
7633
|
+
const httpHeaderAccepts = [
|
|
7634
|
+
'application/json'
|
|
7635
|
+
];
|
|
7636
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
7637
|
+
}
|
|
7638
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
7639
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
7640
|
+
}
|
|
7641
|
+
let localVarHttpContext = options && options.context;
|
|
7642
|
+
if (localVarHttpContext === undefined) {
|
|
7643
|
+
localVarHttpContext = new HttpContext();
|
|
7644
|
+
}
|
|
7645
|
+
let localVarTransferCache = options && options.transferCache;
|
|
7646
|
+
if (localVarTransferCache === undefined) {
|
|
7647
|
+
localVarTransferCache = true;
|
|
7648
|
+
}
|
|
7649
|
+
// to determine the Content-Type header
|
|
7650
|
+
const consumes = [
|
|
7651
|
+
'application/json'
|
|
7652
|
+
];
|
|
7653
|
+
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
7654
|
+
if (httpContentTypeSelected !== undefined) {
|
|
7655
|
+
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
7656
|
+
}
|
|
7657
|
+
let responseType_ = 'json';
|
|
7658
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
7659
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
7660
|
+
responseType_ = 'text';
|
|
7661
|
+
}
|
|
7662
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
7663
|
+
responseType_ = 'json';
|
|
7664
|
+
}
|
|
7665
|
+
else {
|
|
7666
|
+
responseType_ = 'blob';
|
|
7667
|
+
}
|
|
7668
|
+
}
|
|
7669
|
+
let localVarPath = `/collections/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/collaborators`;
|
|
7670
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
7671
|
+
context: localVarHttpContext,
|
|
7672
|
+
body: collectionCollaboratorRequest,
|
|
7673
|
+
responseType: responseType_,
|
|
7674
|
+
withCredentials: this.configuration.withCredentials,
|
|
7675
|
+
headers: localVarHeaders,
|
|
7676
|
+
observe: observe,
|
|
7677
|
+
transferCache: localVarTransferCache,
|
|
7678
|
+
reportProgress: reportProgress
|
|
7679
|
+
});
|
|
7680
|
+
}
|
|
7392
7681
|
postCollectionSearch(collectionSearchRequest, observe = 'body', reportProgress = false, options) {
|
|
7393
7682
|
if (collectionSearchRequest === null || collectionSearchRequest === undefined) {
|
|
7394
7683
|
throw new Error('Required parameter collectionSearchRequest was null or undefined when calling postCollectionSearch.');
|
|
@@ -13539,7 +13828,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
13539
13828
|
* Do not edit the class manually.
|
|
13540
13829
|
*/
|
|
13541
13830
|
/* tslint:disable:no-unused-variable member-ordering */
|
|
13542
|
-
class
|
|
13831
|
+
class ReferenceFilesService {
|
|
13543
13832
|
constructor(httpClient, basePath, configuration) {
|
|
13544
13833
|
this.httpClient = httpClient;
|
|
13545
13834
|
this.basePath = 'https://api-v2.dash.app';
|
|
@@ -13598,7 +13887,10 @@ class ReferenceImageUploadsService {
|
|
|
13598
13887
|
}
|
|
13599
13888
|
return httpParams;
|
|
13600
13889
|
}
|
|
13601
|
-
|
|
13890
|
+
getReferenceFile(id, observe = 'body', reportProgress = false, options) {
|
|
13891
|
+
if (id === null || id === undefined) {
|
|
13892
|
+
throw new Error('Required parameter id was null or undefined when calling getReferenceFile.');
|
|
13893
|
+
}
|
|
13602
13894
|
let localVarHeaders = this.defaultHeaders;
|
|
13603
13895
|
let localVarCredential;
|
|
13604
13896
|
// authentication (bearerToken) required
|
|
@@ -13637,7 +13929,57 @@ class ReferenceImageUploadsService {
|
|
|
13637
13929
|
responseType_ = 'blob';
|
|
13638
13930
|
}
|
|
13639
13931
|
}
|
|
13640
|
-
let localVarPath = `/reference-
|
|
13932
|
+
let localVarPath = `/reference-files/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
|
|
13933
|
+
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
13934
|
+
context: localVarHttpContext,
|
|
13935
|
+
responseType: responseType_,
|
|
13936
|
+
withCredentials: this.configuration.withCredentials,
|
|
13937
|
+
headers: localVarHeaders,
|
|
13938
|
+
observe: observe,
|
|
13939
|
+
transferCache: localVarTransferCache,
|
|
13940
|
+
reportProgress: reportProgress
|
|
13941
|
+
});
|
|
13942
|
+
}
|
|
13943
|
+
postReferenceFiles(observe = 'body', reportProgress = false, options) {
|
|
13944
|
+
let localVarHeaders = this.defaultHeaders;
|
|
13945
|
+
let localVarCredential;
|
|
13946
|
+
// authentication (bearerToken) required
|
|
13947
|
+
localVarCredential = this.configuration.lookupCredential('bearerToken');
|
|
13948
|
+
if (localVarCredential) {
|
|
13949
|
+
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
|
|
13950
|
+
}
|
|
13951
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
13952
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
13953
|
+
// to determine the Accept header
|
|
13954
|
+
const httpHeaderAccepts = [
|
|
13955
|
+
'application/json'
|
|
13956
|
+
];
|
|
13957
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
13958
|
+
}
|
|
13959
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
13960
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
13961
|
+
}
|
|
13962
|
+
let localVarHttpContext = options && options.context;
|
|
13963
|
+
if (localVarHttpContext === undefined) {
|
|
13964
|
+
localVarHttpContext = new HttpContext();
|
|
13965
|
+
}
|
|
13966
|
+
let localVarTransferCache = options && options.transferCache;
|
|
13967
|
+
if (localVarTransferCache === undefined) {
|
|
13968
|
+
localVarTransferCache = true;
|
|
13969
|
+
}
|
|
13970
|
+
let responseType_ = 'json';
|
|
13971
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
13972
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
13973
|
+
responseType_ = 'text';
|
|
13974
|
+
}
|
|
13975
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
13976
|
+
responseType_ = 'json';
|
|
13977
|
+
}
|
|
13978
|
+
else {
|
|
13979
|
+
responseType_ = 'blob';
|
|
13980
|
+
}
|
|
13981
|
+
}
|
|
13982
|
+
let localVarPath = `/reference-files`;
|
|
13641
13983
|
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
13642
13984
|
context: localVarHttpContext,
|
|
13643
13985
|
responseType: responseType_,
|
|
@@ -13648,10 +13990,10 @@ class ReferenceImageUploadsService {
|
|
|
13648
13990
|
reportProgress: reportProgress
|
|
13649
13991
|
});
|
|
13650
13992
|
}
|
|
13651
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type:
|
|
13652
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type:
|
|
13993
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ReferenceFilesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
13994
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ReferenceFilesService, providedIn: 'root' }); }
|
|
13653
13995
|
}
|
|
13654
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type:
|
|
13996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ReferenceFilesService, decorators: [{
|
|
13655
13997
|
type: Injectable,
|
|
13656
13998
|
args: [{
|
|
13657
13999
|
providedIn: 'root'
|
|
@@ -20676,7 +21018,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
20676
21018
|
type: Optional
|
|
20677
21019
|
}] }] });
|
|
20678
21020
|
|
|
20679
|
-
const APIS = [AIImageGenerationsService, AccountSecurityService, AccountsService, AllowedLoginMethodsService, AssetCommentsService, AssetDeduplicationService, AssetDownloadEventsService, AssetEmbeddableLinksService, AssetMetadataExportService, AssetSavedCropAreaSummariesService, AssetSavedCropAreasService, AssetShareAccessTokensService, AssetShareEmailsService, AssetSharesService, AssetVariantCriteriaService, AssetsService, AutoTaggingImageSettingsService, CloudConnectionsService, CloudImportJobsService, CloudObjectsService, CollectionShareAccessTokensService, CollectionSharesService, CollectionsService, CorebookService, CustomService, DefaultService, EntityQuotaOverridesService, ExternalAppService, FieldOptionImagesService, FieldOptionsService, FieldViewsService, FieldsService, FolderSettingsService, GroupsService, GuestUploadAccessTokensService, GuestUploadEmailsService, GuestUploadsService, KlaviyoService, OnboardingChecklistService, PingService, PortalAccessTokensService, PortalEmailsService, PortalsService, PresetSettingsService, PresetTransformationsService, ProductsService, PubliclyAvailableGuestUploadDataService, PubliclyAvailablePortalDatasService,
|
|
21021
|
+
const APIS = [AIImageGenerationsService, AccountSecurityService, AccountsService, AllowedLoginMethodsService, AssetCommentsService, AssetDeduplicationService, AssetDownloadEventsService, AssetEmbeddableLinksService, AssetMetadataExportService, AssetSavedCropAreaSummariesService, AssetSavedCropAreasService, AssetShareAccessTokensService, AssetShareEmailsService, AssetSharesService, AssetVariantCriteriaService, AssetsService, AutoTaggingImageSettingsService, CloudConnectionsService, CloudImportJobsService, CloudObjectsService, CollectionShareAccessTokensService, CollectionSharesService, CollectionsService, CorebookService, CustomService, DefaultService, EntityQuotaOverridesService, ExternalAppService, FieldOptionImagesService, FieldOptionsService, FieldViewsService, FieldsService, FolderSettingsService, GroupsService, GuestUploadAccessTokensService, GuestUploadEmailsService, GuestUploadsService, KlaviyoService, OnboardingChecklistService, PingService, PortalAccessTokensService, PortalEmailsService, PortalsService, PresetSettingsService, PresetTransformationsService, ProductsService, PubliclyAvailableGuestUploadDataService, PubliclyAvailablePortalDatasService, ReferenceFilesService, SavedSearchService, SavedSearchesService, SearchFiltersService, ShopifyService, ShopifySKUSettingsService, StaffMembersService, SubdomainsService, SubscriptionService, SubscriptionChangesService, TermsAndConditionsService, TextInImageSettingsService, ThemeService, UserPreferencesService, UserReferrerService, UsersService, WordPressService];
|
|
20680
21022
|
|
|
20681
21023
|
/**
|
|
20682
21024
|
* Dash API
|
|
@@ -20803,6 +21145,7 @@ const ActionType = {
|
|
|
20803
21145
|
CreateGuestUploadUsers: 'CREATE_GUEST_UPLOAD_USERS',
|
|
20804
21146
|
CreateGuestUploads: 'CREATE_GUEST_UPLOADS',
|
|
20805
21147
|
CreatePortals: 'CREATE_PORTALS',
|
|
21148
|
+
CreateReferenceFiles: 'CREATE_REFERENCE_FILES',
|
|
20806
21149
|
CreateSavedCropAreas: 'CREATE_SAVED_CROP_AREAS',
|
|
20807
21150
|
CreateSavedSearches: 'CREATE_SAVED_SEARCHES',
|
|
20808
21151
|
CreateSubscription: 'CREATE_SUBSCRIPTION',
|
|
@@ -20890,6 +21233,7 @@ const ActionType = {
|
|
|
20890
21233
|
UseCorebookIntegration: 'USE_COREBOOK_INTEGRATION',
|
|
20891
21234
|
UseEmbeddableLinks: 'USE_EMBEDDABLE_LINKS',
|
|
20892
21235
|
UseHootsuiteIntegration: 'USE_HOOTSUITE_INTEGRATION',
|
|
21236
|
+
UseMcp: 'USE_MCP',
|
|
20893
21237
|
UseWordpressIntegration: 'USE_WORDPRESS_INTEGRATION',
|
|
20894
21238
|
ViewAccount: 'VIEW_ACCOUNT',
|
|
20895
21239
|
ViewAsset: 'VIEW_ASSET',
|
|
@@ -20920,6 +21264,7 @@ const ActionType = {
|
|
|
20920
21264
|
ViewPortal: 'VIEW_PORTAL',
|
|
20921
21265
|
ViewPortals: 'VIEW_PORTALS',
|
|
20922
21266
|
ViewPresetSizes: 'VIEW_PRESET_SIZES',
|
|
21267
|
+
ViewReferenceFile: 'VIEW_REFERENCE_FILE',
|
|
20923
21268
|
ViewSavedCropArea: 'VIEW_SAVED_CROP_AREA',
|
|
20924
21269
|
ViewSavedCropAreas: 'VIEW_SAVED_CROP_AREAS',
|
|
20925
21270
|
ViewSavedSearch: 'VIEW_SAVED_SEARCH',
|
|
@@ -21021,6 +21366,30 @@ var AdminUserRequestItem;
|
|
|
21021
21366
|
};
|
|
21022
21367
|
})(AdminUserRequestItem || (AdminUserRequestItem = {}));
|
|
21023
21368
|
|
|
21369
|
+
/**
|
|
21370
|
+
* Dash API
|
|
21371
|
+
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
21372
|
+
*
|
|
21373
|
+
* The version of the OpenAPI document: 2.0.0
|
|
21374
|
+
* Contact: help@dash.app
|
|
21375
|
+
*
|
|
21376
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21377
|
+
* https://openapi-generator.tech
|
|
21378
|
+
* Do not edit the class manually.
|
|
21379
|
+
*/
|
|
21380
|
+
|
|
21381
|
+
/**
|
|
21382
|
+
* Dash API
|
|
21383
|
+
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
21384
|
+
*
|
|
21385
|
+
* The version of the OpenAPI document: 2.0.0
|
|
21386
|
+
* Contact: help@dash.app
|
|
21387
|
+
*
|
|
21388
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21389
|
+
* https://openapi-generator.tech
|
|
21390
|
+
* Do not edit the class manually.
|
|
21391
|
+
*/
|
|
21392
|
+
|
|
21024
21393
|
var AiImageGenerationsRequest;
|
|
21025
21394
|
(function (AiImageGenerationsRequest) {
|
|
21026
21395
|
AiImageGenerationsRequest.AspectRatioEnum = {
|
|
@@ -21420,6 +21789,13 @@ var AssetIsSimilarToAssetCriterion;
|
|
|
21420
21789
|
};
|
|
21421
21790
|
})(AssetIsSimilarToAssetCriterion || (AssetIsSimilarToAssetCriterion = {}));
|
|
21422
21791
|
|
|
21792
|
+
var AssetIsSimilarToCriterion;
|
|
21793
|
+
(function (AssetIsSimilarToCriterion) {
|
|
21794
|
+
AssetIsSimilarToCriterion.TypeEnum = {
|
|
21795
|
+
IsSimilarTo: 'IS_SIMILAR_TO'
|
|
21796
|
+
};
|
|
21797
|
+
})(AssetIsSimilarToCriterion || (AssetIsSimilarToCriterion = {}));
|
|
21798
|
+
|
|
21423
21799
|
var AssetNotSearchCriterion;
|
|
21424
21800
|
(function (AssetNotSearchCriterion) {
|
|
21425
21801
|
AssetNotSearchCriterion.TypeEnum = {
|
|
@@ -21634,6 +22010,18 @@ var AssetSearchFieldFixed;
|
|
|
21634
22010
|
};
|
|
21635
22011
|
})(AssetSearchFieldFixed || (AssetSearchFieldFixed = {}));
|
|
21636
22012
|
|
|
22013
|
+
/**
|
|
22014
|
+
* Dash API
|
|
22015
|
+
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
22016
|
+
*
|
|
22017
|
+
* The version of the OpenAPI document: 2.0.0
|
|
22018
|
+
* Contact: help@dash.app
|
|
22019
|
+
*
|
|
22020
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22021
|
+
* https://openapi-generator.tech
|
|
22022
|
+
* Do not edit the class manually.
|
|
22023
|
+
*/
|
|
22024
|
+
|
|
21637
22025
|
/**
|
|
21638
22026
|
* Dash API
|
|
21639
22027
|
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
@@ -22347,6 +22735,59 @@ var CloudObjectsSelectorByIds;
|
|
|
22347
22735
|
};
|
|
22348
22736
|
})(CloudObjectsSelectorByIds || (CloudObjectsSelectorByIds = {}));
|
|
22349
22737
|
|
|
22738
|
+
var CollectionAssetMembershipBatchRequest;
|
|
22739
|
+
(function (CollectionAssetMembershipBatchRequest) {
|
|
22740
|
+
CollectionAssetMembershipBatchRequest.OperationEnum = {
|
|
22741
|
+
Add: 'ADD',
|
|
22742
|
+
Remove: 'REMOVE'
|
|
22743
|
+
};
|
|
22744
|
+
})(CollectionAssetMembershipBatchRequest || (CollectionAssetMembershipBatchRequest = {}));
|
|
22745
|
+
|
|
22746
|
+
/**
|
|
22747
|
+
* Dash API
|
|
22748
|
+
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
22749
|
+
*
|
|
22750
|
+
* The version of the OpenAPI document: 2.0.0
|
|
22751
|
+
* Contact: help@dash.app
|
|
22752
|
+
*
|
|
22753
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22754
|
+
* https://openapi-generator.tech
|
|
22755
|
+
* Do not edit the class manually.
|
|
22756
|
+
*/
|
|
22757
|
+
|
|
22758
|
+
/**
|
|
22759
|
+
* Dash API
|
|
22760
|
+
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
22761
|
+
*
|
|
22762
|
+
* The version of the OpenAPI document: 2.0.0
|
|
22763
|
+
* Contact: help@dash.app
|
|
22764
|
+
*
|
|
22765
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22766
|
+
* https://openapi-generator.tech
|
|
22767
|
+
* Do not edit the class manually.
|
|
22768
|
+
*/
|
|
22769
|
+
const CollectionAssetMembershipFailure = {
|
|
22770
|
+
MembershipChangeFailed: 'MEMBERSHIP_CHANGE_FAILED'
|
|
22771
|
+
};
|
|
22772
|
+
|
|
22773
|
+
/**
|
|
22774
|
+
* Dash API
|
|
22775
|
+
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
22776
|
+
*
|
|
22777
|
+
* The version of the OpenAPI document: 2.0.0
|
|
22778
|
+
* Contact: help@dash.app
|
|
22779
|
+
*
|
|
22780
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22781
|
+
* https://openapi-generator.tech
|
|
22782
|
+
* Do not edit the class manually.
|
|
22783
|
+
*/
|
|
22784
|
+
var CollectionAssociatedWithUserSearchCriterion;
|
|
22785
|
+
(function (CollectionAssociatedWithUserSearchCriterion) {
|
|
22786
|
+
CollectionAssociatedWithUserSearchCriterion.TypeEnum = {
|
|
22787
|
+
AssociatedWithUser: 'ASSOCIATED_WITH_USER'
|
|
22788
|
+
};
|
|
22789
|
+
})(CollectionAssociatedWithUserSearchCriterion || (CollectionAssociatedWithUserSearchCriterion = {}));
|
|
22790
|
+
|
|
22350
22791
|
/**
|
|
22351
22792
|
* Dash API
|
|
22352
22793
|
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
@@ -23924,6 +24365,60 @@ var InProgressJob;
|
|
|
23924
24365
|
};
|
|
23925
24366
|
})(InProgressJob || (InProgressJob = {}));
|
|
23926
24367
|
|
|
24368
|
+
/**
|
|
24369
|
+
* Dash API
|
|
24370
|
+
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
24371
|
+
*
|
|
24372
|
+
* The version of the OpenAPI document: 2.0.0
|
|
24373
|
+
* Contact: help@dash.app
|
|
24374
|
+
*
|
|
24375
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24376
|
+
* https://openapi-generator.tech
|
|
24377
|
+
* Do not edit the class manually.
|
|
24378
|
+
*/
|
|
24379
|
+
var IsSimilarToAssetSource;
|
|
24380
|
+
(function (IsSimilarToAssetSource) {
|
|
24381
|
+
IsSimilarToAssetSource.TypeEnum = {
|
|
24382
|
+
Asset: 'ASSET'
|
|
24383
|
+
};
|
|
24384
|
+
})(IsSimilarToAssetSource || (IsSimilarToAssetSource = {}));
|
|
24385
|
+
|
|
24386
|
+
/**
|
|
24387
|
+
* Dash API
|
|
24388
|
+
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
24389
|
+
*
|
|
24390
|
+
* The version of the OpenAPI document: 2.0.0
|
|
24391
|
+
* Contact: help@dash.app
|
|
24392
|
+
*
|
|
24393
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24394
|
+
* https://openapi-generator.tech
|
|
24395
|
+
* Do not edit the class manually.
|
|
24396
|
+
*/
|
|
24397
|
+
var IsSimilarToEmbeddingMethod;
|
|
24398
|
+
(function (IsSimilarToEmbeddingMethod) {
|
|
24399
|
+
IsSimilarToEmbeddingMethod.TypeEnum = {
|
|
24400
|
+
Embedding: 'EMBEDDING'
|
|
24401
|
+
};
|
|
24402
|
+
})(IsSimilarToEmbeddingMethod || (IsSimilarToEmbeddingMethod = {}));
|
|
24403
|
+
|
|
24404
|
+
/**
|
|
24405
|
+
* Dash API
|
|
24406
|
+
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
24407
|
+
*
|
|
24408
|
+
* The version of the OpenAPI document: 2.0.0
|
|
24409
|
+
* Contact: help@dash.app
|
|
24410
|
+
*
|
|
24411
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24412
|
+
* https://openapi-generator.tech
|
|
24413
|
+
* Do not edit the class manually.
|
|
24414
|
+
*/
|
|
24415
|
+
var IsSimilarToReferenceFileSource;
|
|
24416
|
+
(function (IsSimilarToReferenceFileSource) {
|
|
24417
|
+
IsSimilarToReferenceFileSource.TypeEnum = {
|
|
24418
|
+
ReferenceFile: 'REFERENCE_FILE'
|
|
24419
|
+
};
|
|
24420
|
+
})(IsSimilarToReferenceFileSource || (IsSimilarToReferenceFileSource = {}));
|
|
24421
|
+
|
|
23927
24422
|
/**
|
|
23928
24423
|
* Dash API
|
|
23929
24424
|
* # Introduction The Dash API follows the [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) standard and uses common [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers, methods and response codes. Request and response bodies are all in [JSON](https://www.json.org/json-en.html) format except for `PUT` requests of binary file data when upload files. # Operations, Jobs and Batches 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`](/dash/openapi/assets/postassetupload) 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}`. # Authorisation ## Get a short-lived bearer token for testing You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you want to set up programmatic API access to Dash, including how to obtain your client ID and secret. However, if you just want to try out an API endpoint, you can get a short-lived bearer token: 1. Log in to your Dash account as normal 2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT + I on Windows) 3. Click the \"Application\" tab 4. Under \"Storage\" in the left panel, expand \"local storage\" 5. Click on the URL of your Dash site 6. Copy the \"value\" for the access_token from the right-hand panel (be sure to select the whole thing - double click to edit, select all then copy). This token can be used to try out an endpoint directly from these docs. Just click \"Try it...\" in the right-hand panel and enter your token in the \"Auth\" tab. ## OAuth2 Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be found [here](https://auth0.com/docs/protocols/protocol-oauth2). Endpoints: * https://login.dash.app/authorize * https://login.dash.app/oauth/token Scopes to note: * **subdomain**: this should be set to the subdomain of the Dash the user is trying to access e.g. `subdomain:my-account` * **offline_access**: the standard OAuth 2.0 scope to use to obtain a refresh token Audience: An query parameter of `audience=https://assetplatform.io` must be provided to the https://login.dash.app/authorize endpoint To obtain your client ID and secret you can either use the Dash app or the API. **In the Dash app (recommended)** Sign in to Dash as an account admin, go to **Admin** > **Integrations**, open the **REST API** tab and switch **Enable API** on. Your **Client ID** and **Secret key** are then displayed, each with a button to copy it, and you can manage your allowed callback URLs on the same page. **Via the API** Follow the steps above to [get a temporary bearer token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing) and use this to [create custom integration settings](/dash/openapi/custom/putcustomintegrationsettings). The response you receive from the custom integration settings endpoint will include your client ID and secret. Whichever route you take, your credentials are stored rather than shown only once, so you can read them back at any time with [get custom integration settings](/dash/openapi/custom/getcustomintegrationsettings). There is a single client ID and secret per Dash account. Deleting your custom integration settings, or switching **Enable API** off in the Dash app, revokes them along with your saved URLs, and enabling the API again issues a new client ID and secret. ## Authorization Code Flow To begin the flow, send your user in a browser to to https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN} Once the user successfully authenticates, they will be redirected to your `redirect_uri` with the Authorization Code provided in a query parameter. Now that you have an Authorization Code, you must exchange it for your tokens via the https://login.dash.app/oauth/token endpoint. ``` curl --request POST \\ --url \'https://login.dash.app/oauth/token\' \\ --header \'content-type: application/x-www-form-urlencoded\' \\ --data grant_type=authorization_code \\ --data \'client_id={YOUR_CLIENT_ID}\' \\ --data \'client_secret={YOUR_CLIENT_SECRET}\' \\ --data \'code={CODE_FROM_PREVIOUS_STEP}\' \\ --data \'redirect_uri={YOUR_REDIRECT}\' ``` A more detailed description of the Authorization Code Flow can be found [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow) ## Authentication Without User Interaction Due to security concerns, neither OAuth grant types `Client Credentials` or `Password` are supported by the Dash API. If you require an automated script to call the Dash API, we recommend going through the Authorization Code Flow described above once, specifying the offline_access scope to get a refresh token along with your access token. Your script can store and use this refresh token to call https://login.dash.app/oauth/token and get a new access token when the current one expires. ## Current User Details The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so can be useful to decode in some cases. For example, the `sub` field of the Bearer Token can be used in cases where you need access to the `User.id` of the current user. e.g. When making an [`AssetSearch`](/dash/openapi/assets/postassetsearch) with the `STAGED_BY` criterion to find all [`Asset`](/dash/openapi/Assets) resources staged by the current user. Alternatively the [GET Current User](/dash/openapi/users/getcurrentuser) endpoint contains properties for the current user to avoid needing to decode the Bearer Token. # Rate Limits Requests are rate limited per user and per account, or per endpoint for endpoints that do not take a Bearer Token. | Scope | Sustained rate | Burst | | -- | -- | -- | | Per user | 20 requests per second | 100 requests | | Per account | 100 requests per second | 500 requests | | Per endpoint | 100 requests per second | 500 requests | A request that exceeds a limit receives a `429 Too Many Requests` response with the following headers: | Header | Description | | -- | -- | | `Retry-After` | Seconds to wait before retrying. | | `RateLimit-Policy` | The limit that was exceeded, `\"user\"`, `\"account\"` or `\"endpoint\"`, with its quota `q` over a window of `w` seconds. | | `RateLimit` | The requests remaining `r` in that limit, and the seconds `t` until it is restored. | To stay within the limits, use endpoints that work on many resources at once, such as searches and batch jobs, rather than making a request per resource. # Permitted Actions 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](/dash/openapi/users/getcurrentuser) 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`](/dash/openapi/Assets) resources then the [GET Current User](/dash/openapi/users/getcurrentuser) `permittedActions` property will contain the permitted action `ASSETS` : `CREATE_ASSETS`. # Common Use Cases ## Getting fields and field options for asset metadata [`Asset.metadata`](/dash/openapi/Assets) consists of a map of `String` to `String[]` The keys for map are [`Field`](/dash/openapi/Fields) IDs. Full details, including the field name, can be got via the [GET Field](/dash/openapi/fields/getfield) endpoint or the full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. The map values are a list of plain text values if [`Field.hasFixedOptions = false`](/dash/openapi/Fields) or a list of [`FieldOption`](/dash/openapi/Field-Options) IDs if [`Field.hasFixedOptions = true`](/dash/openapi/Fields) Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) details, including the field option name, can be got via the [GET Field Option](/dash/openapi/field-options/getfieldoption) endpoint. Where [`Field.hierarchical = true`](/dash/openapi/Fields) the complete branch of the tree will be returned and can be constructed via the [`FieldOption.parent`](/dash/openapi/Field-Options) property. ## Getting the full schema of fields and field options The full list of fields for an account can be retrieved via the [GET Fields](/dash/openapi/fields/getfields) endpoint. Where [`Field.hasFixedOptions = true`](/dash/openapi/Fields) the [POST Field Option Searches](/dash/openapi/field-options/postfieldoptionsearch) endpoint can be used to get the available options. Where [`Field.hierarchical = true`](/dash/openapi/Fields) 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. ## Folders A Folder in Dash is simply a [`FieldOption`](/dash/openapi/Field-Options), for the built-in Folders [`Field`](/dash/openapi/Fields). To determine the ID of the Folders [`Field`](/dash/openapi/Fields), use the [`Folder Settings`](/dash/openapi/Folder-Settings) endpoint. Once you have this ID, Folders behave the same as any other [`Field`](/dash/openapi/Fields). For getting the folder tree see [Getting fields and field options for asset metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata) and [Getting the full schema of fields and field options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options) For getting assets in folders see [`AssetSearch`](/dash/openapi/assets/postassetsearch) For getting assets in no folders see the _Search for field is empty_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint. ## Creating a new asset 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: 1. [Create an Asset and Upload batch job](/dash/openapi/assets/postassetanduploadbatchjob) 2. Wait for the job to complete by checking the [GET Asset and upload batch job](/dash/openapi/assets/postassetupload/operation/getAssetAndUploadBatchJob) endpoint 3. The completed job includes an [`AssetUpload`](/dash/openapi/assets/postassetupload) resources in the job\'s `result` property. 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 `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) 4. The assets will be created with a [`Asset.lifecycleStatus`](/dash/openapi/Assets) of `STAGED`. Use the [POST Asset lifecycle transition batch job](/dash/openapi/assets/postassetlifecycletransitionbatchjob) endpoint if you\'d like to change the state of the assets (e.g. to `PENDING_APPROVAL` or `LIVE`). ## Uploading a new file for an asset 1. Create an [`AssetUpload`](/dash/openapi/assets/postassetupload) via the [POST Asset Upload](/dash/openapi/assets/postassetupload) endpoint 3. Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`. 4. Get the `etag` property from the response of each PUT request and use them to complete the upload via the [POST Asset Upload Completion](/dash/openapi/assets/postassetuploadCompletion) ## Getting asset file versions The current [`AssetFile`](/dash/openapi/assets/getassetfiles) for an [`Asset`](/dash/openapi/Assets) is returned in the [`Asset`](/dash/openapi/Assets) resource via the [`Asset.currentFile`](/dash/openapi/Assets) property. The [GET Asset Files](/dash/openapi/assets/getassetfiles) endpoint can be used to get all [`AssetFile`](/dash/openapi/assets/getassetfiles) resources for an [`Asset`](/dash/openapi/Assets) ## Editing asset metadata Edit the contents of one or more [`Asset.metadata`](/dash/openapi/Assets) map properties via the [POST Asset Metadata Edit Batch Job](/dash/openapi/assets/postassetmetadataeditbatchjob) endpoint and check on the progress and status of the edit via the [GET Asset Metadata Edit Batch Job](/dash/openapi/assets/getassetmetadataeditbatchjob) endpoint. ## Getting user collections 1. Get the current user ID from the [current user details](#section/Authorisation/Current-User-Details) 2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST Collection Search](/dash/openapi/collections/postcollectionsearch) endpoint to get all collections a user has access to. 3. To get the [`Asset`](/dash/openapi/Assets) resources in each collection see the _All assets in a collection_ and _Search within assets in a collection_ examples in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint for how to specify the [`Collection.id`](/dash/openapi/Collections) in a `COLLECTIONS` : `FIELD_EQUALS` criterion. ## Search by file extension See the _Search by file extension_ and _Search by multiple file extensions_ example in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint ## Searching for changed assets The following date properties exist on an asset and can be supplied as FIXED field criteria in the [POST Asset Searches](/dash/openapi/assets/postassetsearch) endpoint - [`Asset.lifecycleStatus.dateStaged`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was created but not yet live. `DATE_STAGED` in search criteria. - [`Asset.lifecycleStatus.datePendingApproval`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was set for approval (if it was). `DATE_PENDING_APPROVAL` in search criteria. - [`Asset.lifecycleStatus.dateLive`](/dash/openapi/Assets) : The datetime the [`Asset`](/dash/openapi/Assets) was put live. `DATE_LIVE` in search criteria. - [`Asset.currentAssetFile.dateAdded`](/dash/openapi/Assets) : The datetime the latest [`AssetFile`](/dash/openapi/assets/getassetfiles) was added. `DATE_LAST_ASSET_FILE_ADDED` in search criteria. - [`Asset.dateLastModified`](/dash/openapi/Assets) : The datetime the *any* change was made to an [`Asset`](/dash/openapi/Assets). This includes all of the above and any change to custom metadata `DATE_LAST_MODIFIED` in search criteria. There is currently no way to determine if only custom metadata has changes. # Migration from V1 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.app` to `dash.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 `Attribute` has been renamed to `Field` throughout, to mirror the change of terminology within the Dash frontend. All these changes are described in more specific detail below. ## Domain - Domain has changed from `brightdash.app` to `dash.app` throughout the API. ## Asset Staging Workflow - The path of this endpoint has changed from `asset-staging-workflow-transition-batch-jobs` to `asset-lifecycle-transition-batch-jobs`. - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Searches For both scroll and paged searches: - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed from the response. This data can now be found in the `lifecycleStatus` field. ## Asset Deletion - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Asset Metadata Edit - `criterion` in the POST body has become `selector`, and the criterion now needs to be wrapped in the following `{\"type\": \"BY_CRITERION\", \"criterion\": {...}}`. ## Search Filters - The value returned from the `searchField` field of search filter results of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to `DATE_LIVE`. This isn\'t really a breaking change as the specification says this field could return any string, but it feels worth mentioning. ## Saved Search - The following `criterion.field.fieldName` and `sorts.field.fieldName` values have been renamed for both POSTing and GETting SavedSearches: - `DATE_ADDED` -> `DATE_LIVE` - `ADDED_BY` -> `STAGED_BY` ## Attributes/Fields - The string `Attribute` has been replaced with the string `Field` throughout. This includes e.g. `AttributeOption` being renamed to `FieldOption`. A simple find and replace should be enough to migrate.
|
|
@@ -25292,6 +25787,12 @@ const PubliclyAvailableAccountDataSearchField = {
|
|
|
25292
25787
|
* https://openapi-generator.tech
|
|
25293
25788
|
* Do not edit the class manually.
|
|
25294
25789
|
*/
|
|
25790
|
+
var ReferenceFileAwaitingUpload;
|
|
25791
|
+
(function (ReferenceFileAwaitingUpload) {
|
|
25792
|
+
ReferenceFileAwaitingUpload.TypeEnum = {
|
|
25793
|
+
AwaitingUpload: 'AWAITING_UPLOAD'
|
|
25794
|
+
};
|
|
25795
|
+
})(ReferenceFileAwaitingUpload || (ReferenceFileAwaitingUpload = {}));
|
|
25295
25796
|
|
|
25296
25797
|
/**
|
|
25297
25798
|
* Dash API
|
|
@@ -25304,6 +25805,15 @@ const PubliclyAvailableAccountDataSearchField = {
|
|
|
25304
25805
|
* https://openapi-generator.tech
|
|
25305
25806
|
* Do not edit the class manually.
|
|
25306
25807
|
*/
|
|
25808
|
+
var ReferenceFileUploadRejected;
|
|
25809
|
+
(function (ReferenceFileUploadRejected) {
|
|
25810
|
+
ReferenceFileUploadRejected.TypeEnum = {
|
|
25811
|
+
UploadRejected: 'UPLOAD_REJECTED'
|
|
25812
|
+
};
|
|
25813
|
+
ReferenceFileUploadRejected.ReasonEnum = {
|
|
25814
|
+
FileTooLarge: 'FILE_TOO_LARGE'
|
|
25815
|
+
};
|
|
25816
|
+
})(ReferenceFileUploadRejected || (ReferenceFileUploadRejected = {}));
|
|
25307
25817
|
|
|
25308
25818
|
/**
|
|
25309
25819
|
* Dash API
|
|
@@ -25316,6 +25826,18 @@ const PubliclyAvailableAccountDataSearchField = {
|
|
|
25316
25826
|
* https://openapi-generator.tech
|
|
25317
25827
|
* Do not edit the class manually.
|
|
25318
25828
|
*/
|
|
25829
|
+
var ReferenceFileUploaded;
|
|
25830
|
+
(function (ReferenceFileUploaded) {
|
|
25831
|
+
ReferenceFileUploaded.TypeEnum = {
|
|
25832
|
+
Uploaded: 'UPLOADED'
|
|
25833
|
+
};
|
|
25834
|
+
ReferenceFileUploaded.EmbeddingStatusEnum = {
|
|
25835
|
+
Pending: 'PENDING',
|
|
25836
|
+
Ready: 'READY',
|
|
25837
|
+
Unsupported: 'UNSUPPORTED',
|
|
25838
|
+
Failed: 'FAILED'
|
|
25839
|
+
};
|
|
25840
|
+
})(ReferenceFileUploaded || (ReferenceFileUploaded = {}));
|
|
25319
25841
|
|
|
25320
25842
|
/**
|
|
25321
25843
|
* Dash API
|
|
@@ -25446,12 +25968,15 @@ const ResourceType = {
|
|
|
25446
25968
|
IndesignExtension: 'INDESIGN_EXTENSION',
|
|
25447
25969
|
IntelligenceSettings: 'INTELLIGENCE_SETTINGS',
|
|
25448
25970
|
KlaviyoIntegration: 'KLAVIYO_INTEGRATION',
|
|
25971
|
+
Mcp: 'MCP',
|
|
25449
25972
|
MetadataSchema: 'METADATA_SCHEMA',
|
|
25450
25973
|
ParentAttributeOptions: 'PARENT_ATTRIBUTE_OPTIONS',
|
|
25451
25974
|
ParentFieldOptions: 'PARENT_FIELD_OPTIONS',
|
|
25452
25975
|
Portal: 'PORTAL',
|
|
25453
25976
|
Portals: 'PORTALS',
|
|
25454
25977
|
PresetSizes: 'PRESET_SIZES',
|
|
25978
|
+
ReferenceFile: 'REFERENCE_FILE',
|
|
25979
|
+
ReferenceFiles: 'REFERENCE_FILES',
|
|
25455
25980
|
Referral: 'REFERRAL',
|
|
25456
25981
|
SavedCropArea: 'SAVED_CROP_AREA',
|
|
25457
25982
|
SavedCropAreas: 'SAVED_CROP_AREAS',
|
|
@@ -25620,7 +26145,8 @@ var SelfReportedGoalFixed;
|
|
|
25620
26145
|
ShareWithRetailers: 'SHARE_WITH_RETAILERS',
|
|
25621
26146
|
SendToShopify: 'SEND_TO_SHOPIFY',
|
|
25622
26147
|
ResizeForMarketingChannels: 'RESIZE_FOR_MARKETING_CHANNELS',
|
|
25623
|
-
CollectAndApprove: 'COLLECT_AND_APPROVE'
|
|
26148
|
+
CollectAndApprove: 'COLLECT_AND_APPROVE',
|
|
26149
|
+
ConnectAiAssistant: 'CONNECT_AI_ASSISTANT'
|
|
25624
26150
|
};
|
|
25625
26151
|
})(SelfReportedGoalFixed || (SelfReportedGoalFixed = {}));
|
|
25626
26152
|
|
|
@@ -26770,5 +27296,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
26770
27296
|
* Generated bundle index. Do not edit.
|
|
26771
27297
|
*/
|
|
26772
27298
|
|
|
26773
|
-
export { AIImageGenerationsService, APIS, AccountPlan, AccountSecurityService, AccountsService, ActionType, ActiveAccountUser, AdminPermissions, AdminUserPatchRequest, AdminUserRequest, AdminUserRequestItem, AiImageGenerationsRequest, AllowedLoginMethodsService, AlterShopifyStoreRequestDelete, AlterShopifyStoreRequestInstallRequested, AlterShopifyStoreRequestInstalledBeforeProductSync, AlterShopifyStoreRequestReadyToInstall, ApiModule, AppName, ApprovedPaymentStatus, AssetAndSearchCriterion, AssetAndUploadBatchCompletedJob, AssetCommentsService, AssetDeduplicationCompletedJob, AssetDeduplicationService, AssetDownloadBatchCompletedJob, AssetDownloadEvent, AssetDownloadEventAndSearchCriterion, AssetDownloadEventDateField, AssetDownloadEventDateHistogramAggregationRequest, AssetDownloadEventField, AssetDownloadEventFieldEqualsSearchCriterion, AssetDownloadEventFieldInRangeSearchCriterion, AssetDownloadEventNotSearchCriterion, AssetDownloadEventOrSearchCriterion, AssetDownloadEventTermsAggregationRequest, AssetDownloadEventsService, AssetDownloadFailure, AssetEmbeddableLinksService, AssetFieldEqualsSearchCriterion, AssetFieldHasAllEqualSearchCriterion, AssetFieldHasAnyEqualSearchCriterion, AssetFieldIsEmptySearchCriterion, AssetFieldMatchesSearchCriterion, AssetIsSimilarToAssetCriterion, AssetMetadataExportService, AssetNotSearchCriterion, AssetOrSearchCriterion, AssetPaginatedSearchRequest, AssetPermittedActions, AssetPermittedActionsWithDefault, AssetPromptCompletedJob, AssetPromptFailure, AssetPromptInProgressJob, AssetSavedCropAreaSummariesService, AssetSavedCropAreasService, AssetScrollSearchRequest, AssetSearchFieldField, AssetSearchFieldFixed, AssetShareAccessTokensService, AssetShareEmailsService, AssetShareFieldEqualsSearchCriterion, AssetShareSearchField, AssetShareSortField, AssetSharesService, AssetSortFieldField, AssetSortFieldFixed, AssetUploadCompletionFailure, AssetUploadCompletionSuccess, AssetUploadFailure, AssetVariantCriteriaService, AssetVariantCriterionBulkUpdate, AssetVariantCriterionFieldEqualsSearchCriterion, AssetVariantCriterionFieldInSearchCriterion, AssetVariantCriterionSearchField, AssetVariantCriterionSortField, AssetsSelectorByCriterion, AssetsSelectorByIds, AssetsService, AutoTaggingImageSettingsService, BASE_PATH, BaseAssetSearchRequest, BaseCloudObject, BaseJob, Beta, Billing, BillingPeriod, BillingRequest, COLLECTION_FORMATS, ClipTransformation, CloudConnectionsService, CloudFile, CloudFileShortcut, CloudFolder, CloudFolderShortcut, CloudImportCompletedJob, CloudImportJobsService, CloudObjectFieldEqualsSearchCriterion, CloudObjectIdValue, CloudObjectMatchesTextSearchCriterion, CloudObjectRootFolder, CloudObjectSearchField, CloudObjectsSelectorByIds, CloudObjectsService, CollectionShareAccessTokensService, CollectionShareFieldEqualsSearchCriterion, CollectionShareSearchField, CollectionShareSortField, CollectionSharesService, CollectionSortField, CollectionsService, CompletedJob, Configuration, ContextType, ConvertBitrateTransformation, ConvertPresetParameters, ConvertTransformation, ConvertTransformationTemplate, CorebookService, Coupon, CreatedByCurrentUserSearchCriterion, CreatedSubscription, CropPresetParameters, CropTransformation, CropTransformationTemplate, Currency, CustomService, CustomTransformationDescription, DashAsset, DataType, DefaultService, DynamicOnboardingChecklistItemId, EmbeddableLink, EmbeddableLinkBatchCompletedJob, EmbeddableLinkFailure, EmbeddableLinkFieldInSearchCriterion, EmbeddableLinkPatchRequest, EmbeddableLinkSearchField, EmbeddableLinkSortField, EntityQuotaOverridesService, EventAggregationBucketResponse, EventAggregationValueResponse, EventDateHistogramAggregationRequest, EventDateInterval, EventTermsAggregationRequest, ExternalAccessUser, ExternalAppService, ExternalAppSsoTokenRequest, ExternalAppUserRequest, FailedJob, FailedPaymentStatus, FailedSubscription, FeatureBasedPlan, Field, FieldOptionAndSearchCriterion, FieldOptionFailure, FieldOptionFieldContainsSearchCriterion, FieldOptionFieldEqualsSearchCriterion, FieldOptionFieldInSearchCriterion, FieldOptionFieldIsEmptySearchCriterion, FieldOptionFilterField, FieldOptionImageFailure, FieldOptionImagesService, FieldOptionOrSearchCriterion, FieldOptionSearchField, FieldOptionsService, FieldRequest, FieldSearchFilter, FieldView, FieldViewsService, FieldWhitelistAllOptions, FieldWhitelistSpecificOptions, FieldsService, FileType, FolderSettingsService, GroupRole, GroupsService, GuestUploadAccessTokensService, GuestUploadEmailsService, GuestUploadSortField, GuestUploadUser, GuestUploadsService, HardCodedFixedOptionsSearchFilter, HardCodedFreeOptionDimensionsSearchFilter, HardCodedFreeOptionsSearchFilter, HardCodedUserSearchFilter, InGroupsPermissions, InGroupsUserPatchRequest, InGroupsUserRequest, InGroupsUserRequestItem, InProgressJob, IsTransparentTransformationCriterion, JobPatchRequest, JobStepProgress, KlaviyoExportCompletedJob, KlaviyoInstallationStatus, KlaviyoService, LifecycleStatusBinned, LifecycleStatusLive, LifecycleStatusPendingApproval, LifecycleStatusStaged, LifecycleTransition, LimitedDownloads, LoginMethod, MatchAllSearchCriterion, MatchNoneSearchCriterion, MatchValues, MatchesMediaTypesTransformationCriterion, MetadataExportCompletedJob, MetadataFieldValueUpdateByIds, MetadataFieldValueUpdateByValues, MetadataFieldValueUpdateOperation, MetadataSuggestionCompletedJob, OnboardingChecklistService, Orientation, OrientationTransformation, OriginGuestUpload, OriginalDownloadFilename, PendingAccountUser, PendingPaymentStatus, PendingSubscription, Period, PingService, PlanUpgradeRequiredDenialReason, PortalAccessTokensService, PortalEmailsService, PortalSortField, PortalUser, PortalsService, PresetSettingsService, PresetTransformationAndSearchCriterion, PresetTransformationApplicableForAnyAssetsSearchCriterion, PresetTransformationDescription, PresetTransformationHasTransformationOfTypeSearchCriterion, PresetTransformationNotSearchCriterion, PresetTransformationOrSearchCriterion, PresetTransformationSort, PresetTransformationsForAssetFieldInSearchCriterion, PresetTransformationsForAssetSearchField, PresetTransformationsForAssetSort, PresetTransformationsService, ProductAndSearchCriterion, ProductFieldEqualsSearchCriterion, ProductFieldHasAllEqualSearchCriterion, ProductFieldHasAnyEqualSearchCriterion, ProductFieldIsEmptySearchCriterion, ProductFieldMatchesSearchCriterion, ProductNotSearchCriterion, ProductOrSearchCriterion, ProductSearchFieldField, ProductSearchFieldFixed, ProductSortFieldField, ProductSortFieldFixed, ProductStatus, ProductVariantAndSearchCriterion, ProductVariantFieldEqualsSearchCriterion, ProductVariantFieldHasAllEqualSearchCriterion, ProductVariantFieldHasAnyEqualSearchCriterion, ProductVariantFieldIsEmptySearchCriterion, ProductVariantFieldMatchesSearchCriterion, ProductVariantNotSearchCriterion, ProductVariantOrSearchCriterion, ProductVariantSearchFieldField, ProductVariantSearchFieldFixed, ProductVariantSortFieldField, ProductVariantSortFieldFixed, ProductsService, PublicCollectionShareSearchField, PublicCollectionShareSortField, PubliclyAvailableAccountDataFieldEqualsSearchCriterion, PubliclyAvailableAccountDataHasUsersWithEmailDomainSearchCriterion, PubliclyAvailableAccountDataSearchField, PubliclyAvailableGuestUploadDataService, PubliclyAvailablePortalDatasService,
|
|
27299
|
+
export { AIImageGenerationsService, APIS, AccountPlan, AccountSecurityService, AccountsService, ActionType, ActiveAccountUser, AdminPermissions, AdminUserPatchRequest, AdminUserRequest, AdminUserRequestItem, AiImageGenerationsRequest, AllowedLoginMethodsService, AlterShopifyStoreRequestDelete, AlterShopifyStoreRequestInstallRequested, AlterShopifyStoreRequestInstalledBeforeProductSync, AlterShopifyStoreRequestReadyToInstall, ApiModule, AppName, ApprovedPaymentStatus, AssetAndSearchCriterion, AssetAndUploadBatchCompletedJob, AssetCommentsService, AssetDeduplicationCompletedJob, AssetDeduplicationService, AssetDownloadBatchCompletedJob, AssetDownloadEvent, AssetDownloadEventAndSearchCriterion, AssetDownloadEventDateField, AssetDownloadEventDateHistogramAggregationRequest, AssetDownloadEventField, AssetDownloadEventFieldEqualsSearchCriterion, AssetDownloadEventFieldInRangeSearchCriterion, AssetDownloadEventNotSearchCriterion, AssetDownloadEventOrSearchCriterion, AssetDownloadEventTermsAggregationRequest, AssetDownloadEventsService, AssetDownloadFailure, AssetEmbeddableLinksService, AssetFieldEqualsSearchCriterion, AssetFieldHasAllEqualSearchCriterion, AssetFieldHasAnyEqualSearchCriterion, AssetFieldIsEmptySearchCriterion, AssetFieldMatchesSearchCriterion, AssetIsSimilarToAssetCriterion, AssetIsSimilarToCriterion, AssetMetadataExportService, AssetNotSearchCriterion, AssetOrSearchCriterion, AssetPaginatedSearchRequest, AssetPermittedActions, AssetPermittedActionsWithDefault, AssetPromptCompletedJob, AssetPromptFailure, AssetPromptInProgressJob, AssetSavedCropAreaSummariesService, AssetSavedCropAreasService, AssetScrollSearchRequest, AssetSearchFieldField, AssetSearchFieldFixed, AssetShareAccessTokensService, AssetShareEmailsService, AssetShareFieldEqualsSearchCriterion, AssetShareSearchField, AssetShareSortField, AssetSharesService, AssetSortFieldField, AssetSortFieldFixed, AssetUploadCompletionFailure, AssetUploadCompletionSuccess, AssetUploadFailure, AssetVariantCriteriaService, AssetVariantCriterionBulkUpdate, AssetVariantCriterionFieldEqualsSearchCriterion, AssetVariantCriterionFieldInSearchCriterion, AssetVariantCriterionSearchField, AssetVariantCriterionSortField, AssetsSelectorByCriterion, AssetsSelectorByIds, AssetsService, AutoTaggingImageSettingsService, BASE_PATH, BaseAssetSearchRequest, BaseCloudObject, BaseJob, Beta, Billing, BillingPeriod, BillingRequest, COLLECTION_FORMATS, ClipTransformation, CloudConnectionsService, CloudFile, CloudFileShortcut, CloudFolder, CloudFolderShortcut, CloudImportCompletedJob, CloudImportJobsService, CloudObjectFieldEqualsSearchCriterion, CloudObjectIdValue, CloudObjectMatchesTextSearchCriterion, CloudObjectRootFolder, CloudObjectSearchField, CloudObjectsSelectorByIds, CloudObjectsService, CollectionAssetMembershipBatchRequest, CollectionAssetMembershipFailure, CollectionAssociatedWithUserSearchCriterion, CollectionShareAccessTokensService, CollectionShareFieldEqualsSearchCriterion, CollectionShareSearchField, CollectionShareSortField, CollectionSharesService, CollectionSortField, CollectionsService, CompletedJob, Configuration, ContextType, ConvertBitrateTransformation, ConvertPresetParameters, ConvertTransformation, ConvertTransformationTemplate, CorebookService, Coupon, CreatedByCurrentUserSearchCriterion, CreatedSubscription, CropPresetParameters, CropTransformation, CropTransformationTemplate, Currency, CustomService, CustomTransformationDescription, DashAsset, DataType, DefaultService, DynamicOnboardingChecklistItemId, EmbeddableLink, EmbeddableLinkBatchCompletedJob, EmbeddableLinkFailure, EmbeddableLinkFieldInSearchCriterion, EmbeddableLinkPatchRequest, EmbeddableLinkSearchField, EmbeddableLinkSortField, EntityQuotaOverridesService, EventAggregationBucketResponse, EventAggregationValueResponse, EventDateHistogramAggregationRequest, EventDateInterval, EventTermsAggregationRequest, ExternalAccessUser, ExternalAppService, ExternalAppSsoTokenRequest, ExternalAppUserRequest, FailedJob, FailedPaymentStatus, FailedSubscription, FeatureBasedPlan, Field, FieldOptionAndSearchCriterion, FieldOptionFailure, FieldOptionFieldContainsSearchCriterion, FieldOptionFieldEqualsSearchCriterion, FieldOptionFieldInSearchCriterion, FieldOptionFieldIsEmptySearchCriterion, FieldOptionFilterField, FieldOptionImageFailure, FieldOptionImagesService, FieldOptionOrSearchCriterion, FieldOptionSearchField, FieldOptionsService, FieldRequest, FieldSearchFilter, FieldView, FieldViewsService, FieldWhitelistAllOptions, FieldWhitelistSpecificOptions, FieldsService, FileType, FolderSettingsService, GroupRole, GroupsService, GuestUploadAccessTokensService, GuestUploadEmailsService, GuestUploadSortField, GuestUploadUser, GuestUploadsService, HardCodedFixedOptionsSearchFilter, HardCodedFreeOptionDimensionsSearchFilter, HardCodedFreeOptionsSearchFilter, HardCodedUserSearchFilter, InGroupsPermissions, InGroupsUserPatchRequest, InGroupsUserRequest, InGroupsUserRequestItem, InProgressJob, IsSimilarToAssetSource, IsSimilarToEmbeddingMethod, IsSimilarToReferenceFileSource, IsTransparentTransformationCriterion, JobPatchRequest, JobStepProgress, KlaviyoExportCompletedJob, KlaviyoInstallationStatus, KlaviyoService, LifecycleStatusBinned, LifecycleStatusLive, LifecycleStatusPendingApproval, LifecycleStatusStaged, LifecycleTransition, LimitedDownloads, LoginMethod, MatchAllSearchCriterion, MatchNoneSearchCriterion, MatchValues, MatchesMediaTypesTransformationCriterion, MetadataExportCompletedJob, MetadataFieldValueUpdateByIds, MetadataFieldValueUpdateByValues, MetadataFieldValueUpdateOperation, MetadataSuggestionCompletedJob, OnboardingChecklistService, Orientation, OrientationTransformation, OriginGuestUpload, OriginalDownloadFilename, PendingAccountUser, PendingPaymentStatus, PendingSubscription, Period, PingService, PlanUpgradeRequiredDenialReason, PortalAccessTokensService, PortalEmailsService, PortalSortField, PortalUser, PortalsService, PresetSettingsService, PresetTransformationAndSearchCriterion, PresetTransformationApplicableForAnyAssetsSearchCriterion, PresetTransformationDescription, PresetTransformationHasTransformationOfTypeSearchCriterion, PresetTransformationNotSearchCriterion, PresetTransformationOrSearchCriterion, PresetTransformationSort, PresetTransformationsForAssetFieldInSearchCriterion, PresetTransformationsForAssetSearchField, PresetTransformationsForAssetSort, PresetTransformationsService, ProductAndSearchCriterion, ProductFieldEqualsSearchCriterion, ProductFieldHasAllEqualSearchCriterion, ProductFieldHasAnyEqualSearchCriterion, ProductFieldIsEmptySearchCriterion, ProductFieldMatchesSearchCriterion, ProductNotSearchCriterion, ProductOrSearchCriterion, ProductSearchFieldField, ProductSearchFieldFixed, ProductSortFieldField, ProductSortFieldFixed, ProductStatus, ProductVariantAndSearchCriterion, ProductVariantFieldEqualsSearchCriterion, ProductVariantFieldHasAllEqualSearchCriterion, ProductVariantFieldHasAnyEqualSearchCriterion, ProductVariantFieldIsEmptySearchCriterion, ProductVariantFieldMatchesSearchCriterion, ProductVariantNotSearchCriterion, ProductVariantOrSearchCriterion, ProductVariantSearchFieldField, ProductVariantSearchFieldFixed, ProductVariantSortFieldField, ProductVariantSortFieldFixed, ProductsService, PublicCollectionShareSearchField, PublicCollectionShareSortField, PubliclyAvailableAccountDataFieldEqualsSearchCriterion, PubliclyAvailableAccountDataHasUsersWithEmailDomainSearchCriterion, PubliclyAvailableAccountDataSearchField, PubliclyAvailableGuestUploadDataService, PubliclyAvailablePortalDatasService, ReferenceFileAwaitingUpload, ReferenceFileUploadRejected, ReferenceFileUploaded, ReferenceFilesService, ResizeTransformation, ResizeTransformationTemplate, ResourceType, SavedCropAreaSummaryAndSearchCriterion, SavedCropAreaSummaryFieldEqualsSearchCriterion, SavedCropAreaSummaryFieldInSearchCriterion, SavedCropAreaSummarySearchField, SavedSearchFieldEqualsSearchCriterion, SavedSearchSearchField, SavedSearchService, SavedSearchesService, SearchFiltersService, SelfReportedCompanyDescription, SelfReportedGoalFixed, SelfReportedGoalOther, ShopifyExportCompletedJob, ShopifyExportRemovalItem, ShopifyExportUploadItem, ShopifyFile, ShopifyImageUsedInOther, ShopifyImageUsedInProduct, ShopifyInstallStatus, ShopifyProductFieldInSearchCriterion, ShopifyProductSearchField, ShopifySKUSettingsService, ShopifyService, SliderValueBasedPlan, SomethingElseSubscriptionCancellationRequest, SortOrder, StaffMembersService, StandardSubscriptionCancellationRequest, StorageAndDownloadsPlan, StorageAndDownloadsPlanRequest, StorageAndDownloadsV7Plan, StorageAndDownloadsV7PlanRequest, StorageAndDownloadsV8Plan, StorageAndDownloadsV8PlanRequest, SubdomainsService, SubscriptionChangeType, SubscriptionChangesService, SubscriptionService, SucceededPaymentStatus, TermsAndConditionsService, TextInImageSettingsService, Theme, ThemeAndSearchCriterion, ThemeImageType, ThemeSearchField, ThemeService, TieredValueBasedPlan, TieredValueBasedPlanRequest, UnlimitedDownloads, UnverifiedFreeTrialDenialReason, UnverifiedPaidPlanDenialReason, UserAndSearchCriterion, UserBatchCompletedJob, UserCanUploadSearchCriterion, UserCreationStatusResponse, UserDataAccountUser, UserDataPortalUser, UserDataShareUser, UserDataUnknown, UserFailure, UserFieldEqualsSearchCriterion, UserFieldInSearchCriterion, UserFieldMatchesSearchCriterion, UserGroupSearchField, UserInGroupWhereFieldEqualsSearchCriterion, UserNotSearchCriterion, UserOrSearchCriterion, UserPreferencesService, UserReferrerService, UserSearchField, UserSortField, UsersService, WordPressService };
|
|
26774
27300
|
//# sourceMappingURL=brightinteractive-platform-api.mjs.map
|