An Asset Collection is a grouping of Assets. Collections are generally used for organizational purposes, to simplify browsing and searching of large asset libraries.
Collections are associated to Assets through Relationships, allowing Collections to stay up to date with the latest versions of each Asset.
POST /v1/collection¶Create a new Asset Collection.
| Request Headers: | |
|---|---|
|
|
| Status Codes: |
|
http
POST /v1/collection HTTP/1.1
Host: localhost:5635
Content-Type: application/json
{
"name":"testCollection",
"description": "This is a test",
"category": "test",
"tags": ["test1"]
}
curl
curl -i -X POST http://localhost:5635/v1/collection -H 'Content-Type: application/json' --data-raw '{"category": "test", "description": "This is a test", "name": "testCollection", "tags": ["test1"]}'
wget
wget -S -O- http://localhost:5635/v1/collection --header='Content-Type: application/json' --post-data='{"category": "test", "description": "This is a test", "name": "testCollection", "tags": ["test1"]}'
httpie
echo '{
"category": "test",
"description": "This is a test",
"name": "testCollection",
"tags": [
"test1"
]
}' | http POST http://localhost:5635/v1/collection Content-Type:application/json
python-requests
requests.post('http://localhost:5635/v1/collection', headers={'Content-Type': 'application/json'}, json={'category': 'test', 'description': 'This is a test', 'name': 'testCollection', 'tags': ['test1']})
response
HTTP/1.1 200 OK
Location: http://localhost:5635/v1/collection
{
"id": "5be8cb42f5eee933213a3982",
"name": "testCollection",
"description": "This is a test",
"category": "test",
"tags": [
"test1"
]
}
http
GET /v1/collection/{key} HTTP/1.1
Host: localhost:5635
curl
curl -i 'http://localhost:5635/v1/collection/{key}'
wget
wget -S -O- 'http://localhost:5635/v1/collection/{key}'
httpie
http 'http://localhost:5635/v1/collection/{key}'
python-requests
requests.get('http://localhost:5635/v1/collection/{key}')
POST /v1/collection/{key}¶Create a new Asset Collection.
| Request Headers: | |
|---|---|
|
|
| Status Codes: |
|
http
POST /v1/collection/{key} HTTP/1.1
Host: localhost:5635
Content-Type: application/json
{
"name":"testCollection",
"description": "This is a test",
"category": "test",
"tags": ["test1"]
}
curl
curl -i -X POST 'http://localhost:5635/v1/collection/{key}' -H 'Content-Type: application/json' --data-raw '{"category": "test", "description": "This is a test", "name": "testCollection", "tags": ["test1"]}'
wget
wget -S -O- 'http://localhost:5635/v1/collection/{key}' --header='Content-Type: application/json' --post-data='{"category": "test", "description": "This is a test", "name": "testCollection", "tags": ["test1"]}'
httpie
echo '{
"category": "test",
"description": "This is a test",
"name": "testCollection",
"tags": [
"test1"
]
}' | http POST 'http://localhost:5635/v1/collection/{key}' Content-Type:application/json
python-requests
requests.post('http://localhost:5635/v1/collection/{key}', headers={'Content-Type': 'application/json'}, json={'category': 'test', 'description': 'This is a test', 'name': 'testCollection', 'tags': ['test1']})
response
HTTP/1.1 200 OK
Location: http://localhost:5635/v1/collection
{
"id": "5be8cb42f5eee933213a3982",
"name": "testCollection",
"description": "This is a test",
"category": "test",
"tags": [
"test1"
]
}
http
GET /v1/collection?name=test&num_records=10&page=0 HTTP/1.1
Host: localhost:5635
curl
curl -i 'http://localhost:5635/v1/collection?name=test&num_records=10&page=0'
wget
wget -S -O- 'http://localhost:5635/v1/collection?name=test&num_records=10&page=0'
httpie
http 'http://localhost:5635/v1/collection?name=test&num_records=10&page=0'
python-requests
requests.get('http://localhost:5635/v1/collection?name=test&num_records=10&page=0')
response
HTTP/1.1 200 OK
Location: http://localhost:5635/v1/collection?name=test&num_records=10&page=0
[
{
"id": "5be8cb42f5eee933213a3982",
"name": "test",
"description": "This is another test",
"category": "test2",
"tags": [
"test3"
]
}
]
http
DELETE /v1/collection/{key} HTTP/1.1
Host: localhost:5635
curl
curl -i -X DELETE 'http://localhost:5635/v1/collection/{key}'
wget
wget -S -O- --method=DELETE 'http://localhost:5635/v1/collection/{key}'
httpie
http DELETE 'http://localhost:5635/v1/collection/{key}'
python-requests
requests.delete('http://localhost:5635/v1/collection/{key}')