An Asset, at it’s core, is simply a file. The general expectation, however, is that this file is quite large, and may be in a binary format. An Asset has some associated metadata.
POST
/v1/asset/
¶Create a new asset from the File Data in the body of the request. If the ‘related-id’ and ‘related-type’ are also populated, then an Asset Relationship is created as well.
Query Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Status Codes: |
|
POST /v1/asset HTTP/1.1
Host: localhost:5635
Content-Type: multipart/form-data
curl -i -X POST http://localhost:5635/v1/asset -H 'Content-Type: multipart/form-data'
wget -S -O- http://localhost:5635/v1/asset --header='Content-Type: multipart/form-data'
http POST http://localhost:5635/v1/asset Content-Type:multipart/form-data
requests.post('http://localhost:5635/v1/asset', headers={'Content-Type': 'multipart/form-data'})
HTTP/1.1 200 OK
Location: http://localhost:5635/v1/asset
new-asset-key
POST
/v1/asset/{asset_key}
¶Update an existing Asset. This returns a new key for the asset, and adds an entry to the associated Asset History. This will also update all relationships which were associated to the old Asset, and associate them to the new Asset.
Query Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Status Codes: |
|
POST /v1/asset/{key} HTTP/1.1
Host: localhost:5635
Content-Type: multipart/form-data
curl -i -X POST 'http://localhost:5635/v1/asset/{key}' -H 'Content-Type: multipart/form-data'
wget -S -O- 'http://localhost:5635/v1/asset/{key}' --header='Content-Type: multipart/form-data'
http POST 'http://localhost:5635/v1/asset/{key}' Content-Type:multipart/form-data
requests.post('http://localhost:5635/v1/asset/{key}', headers={'Content-Type': 'multipart/form-data'})
HTTP/1.1 200 OK
Location: http://localhost:5635/v1/asset/{key}
new-asset-key
GET /v1/asset/{key} HTTP/1.1
Host: localhost:5635
curl -i 'http://localhost:5635/v1/asset/{key}'
wget -S -O- 'http://localhost:5635/v1/asset/{key}'
http 'http://localhost:5635/v1/asset/{key}'
requests.get('http://localhost:5635/v1/asset/{key}')
GET
/v1/asset/count
¶Count the total number of assets matching the given query.
Query Parameters: | |
---|---|
|
|
Status Codes: |
|
GET /v1/asset/count?file-type=obj HTTP/1.1
Host: localhost:5635
curl -i 'http://localhost:5635/v1/asset/count?file-type=obj'
wget -S -O- 'http://localhost:5635/v1/asset/count?file-type=obj'
http 'http://localhost:5635/v1/asset/count?file-type=obj'
requests.get('http://localhost:5635/v1/asset/count?file-type=obj')
GET
/v1/asset
¶Query Asset Metadata based on various attributes.
Query Parameters: | |
---|---|
|
|
Status Codes: |
|
GET /v1/asset?file-type=obj HTTP/1.1
Host: localhost:5635
curl -i 'http://localhost:5635/v1/asset?file-type=obj'
wget -S -O- 'http://localhost:5635/v1/asset?file-type=obj'
http 'http://localhost:5635/v1/asset?file-type=obj'
requests.get('http://localhost:5635/v1/asset?file-type=obj')
DELETE /v1/asset/{key} HTTP/1.1
Host: localhost:5635
curl -i -X DELETE 'http://localhost:5635/v1/asset/{key}'
wget -S -O- --method=DELETE 'http://localhost:5635/v1/asset/{key}'
http DELETE 'http://localhost:5635/v1/asset/{key}'
requests.delete('http://localhost:5635/v1/asset/{key}')