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: |
|
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 -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 -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"]}'
echo '{
"category": "test",
"description": "This is a test",
"name": "testCollection",
"tags": [
"test1"
]
}' | http POST http://localhost:5635/v1/collection Content-Type:application/json
requests.post('http://localhost:5635/v1/collection', headers={'Content-Type': 'application/json'}, json={'category': 'test', 'description': 'This is a test', 'name': 'testCollection', 'tags': ['test1']})
HTTP/1.1 200 OK
Location: http://localhost:5635/v1/collection
{
"id": "5be8cb42f5eee933213a3982",
"name": "testCollection",
"description": "This is a test",
"category": "test",
"tags": [
"test1"
]
}
GET /v1/collection/{key} HTTP/1.1
Host: localhost:5635
curl -i 'http://localhost:5635/v1/collection/{key}'
wget -S -O- 'http://localhost:5635/v1/collection/{key}'
http 'http://localhost:5635/v1/collection/{key}'
requests.get('http://localhost:5635/v1/collection/{key}')
POST
/v1/collection/{key}
¶Create a new Asset Collection.
Request Headers: | |
---|---|
|
|
Status Codes: |
|
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 -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 -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"]}'
echo '{
"category": "test",
"description": "This is a test",
"name": "testCollection",
"tags": [
"test1"
]
}' | http POST 'http://localhost:5635/v1/collection/{key}' Content-Type:application/json
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']})
HTTP/1.1 200 OK
Location: http://localhost:5635/v1/collection
{
"id": "5be8cb42f5eee933213a3982",
"name": "testCollection",
"description": "This is a test",
"category": "test",
"tags": [
"test1"
]
}
GET /v1/collection?name=test&num_records=10&page=0 HTTP/1.1
Host: localhost:5635
curl -i 'http://localhost:5635/v1/collection?name=test&num_records=10&page=0'
wget -S -O- 'http://localhost:5635/v1/collection?name=test&num_records=10&page=0'
http 'http://localhost:5635/v1/collection?name=test&num_records=10&page=0'
requests.get('http://localhost:5635/v1/collection?name=test&num_records=10&page=0')
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"
]
}
]
DELETE /v1/collection/{key} HTTP/1.1
Host: localhost:5635
curl -i -X DELETE 'http://localhost:5635/v1/collection/{key}'
wget -S -O- --method=DELETE 'http://localhost:5635/v1/collection/{key}'
http DELETE 'http://localhost:5635/v1/collection/{key}'
requests.delete('http://localhost:5635/v1/collection/{key}')