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.
When authentication is active, collections are associated to the user that creates them and can be public or private. Users can only interact with collections that are either public, or that they own.
POST
/v1/collection
¶Create a new Asset Collection.
Request Headers: | |
---|---|
|
|
Status Codes: |
|
POST /v1/collection HTTP/1.1
Host: localhost:8080
Content-Type: application/json
{
"name":"testCollection",
"description": "This is a test",
"category": "test",
"public": true,
"tags": ["test1"],
"isPublic": true
}
curl -i -X POST http://localhost:8080/v1/collection -H 'Content-Type: application/json' --data-raw '{"category": "test", "description": "This is a test", "isPublic": true, "name": "testCollection", "public": true, "tags": ["test1"]}'
HTTP/1.1 200 OK
Location: http://localhost:8080/v1/collection
{
"id": "5be8cb42f5eee933213a3982",
"name": "testCollection",
"description": "This is a test",
"category": "test",
"tags": [
"test1"
]
}
GET /v1/collection/{key} HTTP/1.1
Host: localhost:8080
curl -i 'http://localhost:8080/v1/collection/{key}'
POST
/v1/bulk/collection
¶Get Asset Collections by IDs in bulk.
Request Headers: | |
---|---|
|
|
Status Codes: |
|
POST
/v1/collection/{key}
¶Create a new Asset Collection.
Request Headers: | |
---|---|
|
|
Status Codes: |
|
POST /v1/collection/{key} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
{
"name":"testCollection",
"description": "This is a test",
"category": "test",
"tags": ["test1"]
}
curl -i -X POST 'http://localhost:8080/v1/collection/{key}' -H 'Content-Type: application/json' --data-raw '{"category": "test", "description": "This is a test", "name": "testCollection", "tags": ["test1"]}'
HTTP/1.1 200 OK
Location: http://localhost:8080/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:8080
curl -i 'http://localhost:8080/v1/collection?name=test&num_records=10&page=0'
HTTP/1.1 200 OK
Location: http://localhost:8080/v1/collection?name=test&num_records=10&page=0
[
{
"id": "5be8cb42f5eee933213a3982",
"name": "test",
"description": "This is another test",
"category": "test2",
"tags": [
"test3"
]
}
]