Collections

get
Get Collections By Project

https://app.fuchsiacms.com/api/collections/project/:projectId
This endpoint allows you to get all the collections in a project.
Request
Response
Request
Path Parameters
projectId
required
string
ID of the project
Query Parameters
skip
optional
integer
How many collections to skip. Works well with take query param to setup pagination. Default is 0
take
optional
integer
How many collections to return. Default is 20
search
optional
string
Filter the collections by their name or a subset of their name.
key
required
string
Secret API key associated with the project.
Response
200: OK
List of collection objects
[
{
id: "string",
projectId: "string",
modelId: "string",
displayName: "string",
createdAt: "int64",
updatedAt: "int64"
}
]
400: Bad Request
Any error caused by improper query.
"message"
401: Unauthorized
Returned when the API key is invalid
"Invalid API Key"

get
Get Collection

https://app.fuchsiacms.com/api/collections/collection/:collectionId
Get one collection
Request
Response
Request
Path Parameters
collectionId
required
string
The ID of the collection to retrieve
Query Parameters
key
required
string
The API key for the Project that the collection belongs to.
Response
200: OK
One collection object
{
id: "string",
projectId: "string",
modelId: "string",
displayName: "string",
createdAt: "int64",
updatedAt: "int64"
}
400: Bad Request
Any error caused by a bad request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"

post
Create Collection

https://app.fuchsiacms.com/api/collections/collection
Request
Response
Request
Query Parameters
key
required
string
API key for the project that the collection should be apart of.
Body Parameters
displayName
required
string
The name of the collection
modelId
required
string
The ID of the model that will represent all records in the collection
projectId
required
string
The ID of the Project to have the collection inserted into.
Response
200: OK
The new collection
{
id: "string",
projectId: "string",
modelId: "string",
displayName: "string",
createdAt: "int64",
updatedAt: "int64"
}
400: Bad Request
Malformed request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"

patch
Modify Collection

https://app.fuchsiacms.com/api/collections/collection
Modify a collection
Request
Response
Request
Query Parameters
key
required
string
API key for the collection's project
Body Parameters
displayName
required
string
The collection name to change
id
required
string
The collection ID to modify
Response
200: OK
Returns a count of records that have been modified
1
400: Bad Request
Malformed request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"

delete
Delete a Collection

https://app.fuchsiacms.com/api/collections/collection/:collectionId
Deleting a collection is a permanent destructive operation, and is unrecoverable. Warning: All records inside the collection will also be deleted.
Request
Response
Request
Path Parameters
collectionId
required
string
The ID of the collection to delete
Query Parameters
key
required
string
The API key of the project that holds the collection
Response
200: OK
Returns the ID of the successfully deleted collection
"<ID of the deleted collection>"
400: Bad Request
Malformed request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"