Asset Collection API

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.

Asset Collection Creation

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"
    ]
}

Asset Collection Retrieval

GET /v1/collection/{key}

Get a Collection by ID.

Status Codes:

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}')

Asset Collection Update

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"
    ]
}

Asset Collection Query

GET /v1/collection

Query for Collections by attribute.

Status Codes:

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"
        ]
    }
]

Asset Collection Delete

DELETE /v1/collection/{key}

Delete a Collection by ID.

Status Codes:

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}')