Media

get
Get Assets by Project

https://app.fuchsiacms.com/api/assets/project/:projectId
This endpoint returns assets from a project
Request
Response
Request
Path Parameters
projectId
required
string
ID of the cake to get, for free of course.
Query Parameters
skip
optional
integer
The number of assets to skip. Used with take query parameter to create pagination. Default: 0
take
optional
integer
The number of assets to return. Default: 20
search
optional
string
Filter by the asset name
key
required
string
The project API key
Response
200: OK
List of Asset objects
[
{
id: "string",
projectId: "string",
name: "string",
displayName: "string",
urlPath: "string",
fullUrl: "string",
size: "int64",
prettySize: "string",
kind: "string",
deleted: "boolean",
createdAt: "int64",
updatedAt: "int64"
}
]
400: Bad Request
Malformed Request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"

get
Get Asset

https://app.fuchsiacms.com/api/assets/asset/:assetId
Get one asset by it's ID
Request
Response
Request
Path Parameters
assetId
required
string
The ID of the asset
Query Parameters
key
required
string
The project API key
Response
200: OK
Asset object
{
id: "string",
projectId: "string",
name: "string",
displayName: "string",
urlPath: "string",
fullUrl: "string",
size: "int64",
prettySize: "string",
kind: "string",
deleted: "boolean",
createdAt: "int64",
updatedAt: "int64"
}
400: Bad Request
Malformed request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"

post
Upload File

https://app.fuchsiacms.com/api/assets/project/:projectId
Upload a file to a project
Request
Response
Request
Path Parameters
projectId
required
string
The project ID to upload the file to
Headers
Content-Type
required
string
Must be "multipart/form-data"
Query Parameters
key
required
string
The project API key
Form Data Parameters
file
required
string
The actual file to upload
type
optional
string
The type of the file. Ex: image/jpeg, image/png. Deafult: Empty
Response
200: OK
Asset object
{
id: "string",
projectId: "string",
name: "string",
displayName: "string",
urlPath: "string",
fullUrl: "string",
size: "int64",
prettySize: "string",
kind: "string",
deleted: "boolean",
createdAt: "int64",
updatedAt: "int64"
}
400: Bad Request
Malformed request
"messagek"
401: Unauthorized
Invalid API key
"Invalid API key"

patch
Modify Asset

https://app.fuchsiacms.com/api/assets/asset
Change an Asset object
Request
Response
Request
Query Parameters
key
required
string
The project API key
Body Parameters
displayName
required
string
Change the display name field of the Asset
id
required
string
The ID of the asset to modify
Response
200: OK
Returns the count of the modified objects
1
400: Bad Request
Malformed request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"

delete
Delete Asset

https://app.fuchsiacms.com/api/assets/asset/:assetId
Delete an Asset from a project. Warning: This is a destructive operation and is unrecoverable.
Request
Response
Request
Path Parameters
assetId
required
string
The ID of the asset to delete
Query Parameters
key
required
string
The project API key
Response
200: OK
Returns the ID of the successfully deleted Asset
"<Asset ID>"
400: Bad Request
Malformed Request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"