Get Records by Collection
https://app.fuchsiacms.com/api/records/collection/:collectionId
This endpoint allows you to query records in a collection
Path Parameters
The ID of the collection to query records within
Query Parameters
If the field has a default value attached and the record value is empty, then the default will be returned. Set loadDefaults to false to ignore defaults and just return empty values. Default: true
An array of filters to query records by their data. Example: `?filter=name:==:bob&filter=age:<=:45`. See below for more filter examples.
If set to true, any record that contains markdown will automatically be converted to HTML. Default: false
If set to true, will return records that are unpublished. Default: false
If set to true, any records that contain a reference to another record will load the full record referenced inline. Default: false.
If set to true, any records that contain a media Asset will load the full Asset record inline. Default: false
The number of records to skip. Used with take query param to create pagination. Default: 0
The max number of records to return. Default: 25
List of records
[
{
id: "string",
projectId: "string",
modelId: "string",
collectionId: "string",
published: "boolean",
data: {
[modelFieldCodeNames]: "any value"
},
createdAt: "int64",
updatedAt: "int64"
}
]
Using the Get Records by Collection endpoint, you can query your data with flexible operators. The format must always be in the format of filter=fieldCodeName:operand:value
. You can chain as many filters as you like by including more filter query params in the request. Ex: ?filter=name:==:jason&filter=age:<=:70&filter=tall:==:true
These are all the supported operands for filtering data.
Create Record
https://app.fuchsiacms.com/api/records/record
Create a new record. Whichever model is associated to it - then the `data` field will have to be the same format as the model describes.
Body Parameters
The data that respects the form of the model. Every field in the model should have a key in this data object.
If the record should be published right away, set to True, otherwise set to False to be unpublished.
The ID of the collection to insert the record into. The collection must also have the same Model ID as the record Model ID.
The ID of the model that represents the structure of the data fieldc
The successfully saved record object
{
id: "string",
projectId: "string",
modelId: "string",
collectionId: "string",
published: "boolean",
data: {
[modelFieldCodeNames]: "any value"
},
createdAt: "int64",
updatedAt: "int64"
}
Modify Record
https://app.fuchsiacms.com/api/records/record
Modify an existing Record
Body Parameters
Data object that respects the model structure
If the record should be published, set to True, otherwise False
The ID of the record to modify
Count of objects successfully modifed
Delete Record
https://app.fuchsiacms.com/api/records/record/:recordId
Delete a record. Warning: this is a destructive operation that can not be recovered.
Path Parameters
The ID of the record to delete
Returns the ID of the record if successfully deleted