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: |
|
http
POST /v1/asset HTTP/1.1
Host: localhost:5635
Content-Type: multipart/form-data
curl
curl -i -X POST http://localhost:5635/v1/asset -H 'Content-Type: multipart/form-data'
wget
wget -S -O- http://localhost:5635/v1/asset --header='Content-Type: multipart/form-data'
httpie
http POST http://localhost:5635/v1/asset Content-Type:multipart/form-data
python-requests
requests.post('http://localhost:5635/v1/asset', headers={'Content-Type': 'multipart/form-data'})
response
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: |
|
http
POST /v1/asset/{key} HTTP/1.1
Host: localhost:5635
Content-Type: multipart/form-data
curl
curl -i -X POST 'http://localhost:5635/v1/asset/{key}' -H 'Content-Type: multipart/form-data'
wget
wget -S -O- 'http://localhost:5635/v1/asset/{key}' --header='Content-Type: multipart/form-data'
httpie
http POST 'http://localhost:5635/v1/asset/{key}' Content-Type:multipart/form-data
python-requests
requests.post('http://localhost:5635/v1/asset/{key}', headers={'Content-Type': 'multipart/form-data'})
response
HTTP/1.1 200 OK
Location: http://localhost:5635/v1/asset/{key}
new-asset-key
http
GET /v1/asset/{key} HTTP/1.1
Host: localhost:5635
curl
curl -i 'http://localhost:5635/v1/asset/{key}'
wget
wget -S -O- 'http://localhost:5635/v1/asset/{key}'
httpie
http 'http://localhost:5635/v1/asset/{key}'
python-requests
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: |
|
http
GET /v1/asset/count?file-type=obj HTTP/1.1
Host: localhost:5635
curl
curl -i 'http://localhost:5635/v1/asset/count?file-type=obj'
wget
wget -S -O- 'http://localhost:5635/v1/asset/count?file-type=obj'
httpie
http 'http://localhost:5635/v1/asset/count?file-type=obj'
python-requests
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: |
|
http
GET /v1/asset?file-type=obj HTTP/1.1
Host: localhost:5635
curl
curl -i 'http://localhost:5635/v1/asset?file-type=obj'
wget
wget -S -O- 'http://localhost:5635/v1/asset?file-type=obj'
httpie
http 'http://localhost:5635/v1/asset?file-type=obj'
python-requests
requests.get('http://localhost:5635/v1/asset?file-type=obj')
http
DELETE /v1/asset/{key} HTTP/1.1
Host: localhost:5635
curl
curl -i -X DELETE 'http://localhost:5635/v1/asset/{key}'
wget
wget -S -O- --method=DELETE 'http://localhost:5635/v1/asset/{key}'
httpie
http DELETE 'http://localhost:5635/v1/asset/{key}'
python-requests
requests.delete('http://localhost:5635/v1/asset/{key}')