Use these APIs to create and manage collections.
Create a collection
Creates a collection.
Example
mutation newCollection {
createCollection(input:{
name:"Test Collection",
image:"https://edit.co.uk/uploads/2016/12/Image-1-Alternatives-to-stock-photography-Thinkstock.jpg"
folderDescription:"Interesting Folder"
}) {
id
}
}
Response
{
"data": {
"createCollection": {
"id": "10570"
}
}
}
Get collections
Retrieves collections.
Example
query getCollections {
collections {
records {
id
}
}
Response
{
"data": {
"collections": {
"records": [
{
"id": "10566"
},
{
"id": "10570"
},
{
"id": "10569"
}
]
}
}
}
Update a collection
Updates a collection.
Example
mutation {
updateCollection(input: {folderId: "10566", name: "First Collection", folderDescription: "Folder description of first collection"}) {
id
name
}
}
Response
{
"data": {
"updateCollection": {
"id": "10566",
"name": "First Collection"
}
}
}
Delete a collection
Deletes a collection.
Example
mutation removeCollection {
deleteCollection(id: "10566") {
id
}
}
More API examples