Resource
File
BLOB or File storage
The File Model
Properties
- Name
_id- Type
- Object ID
- Description
ID of this object
- Name
createdAt- Type
- Date
- Description
Date and Time when the object was created.
- Name
updatedAt- Type
- Date
- Description
Date and Time when the object was updated.
- Name
file- Type
- FileRequired
- Description
- Name
name- Type
- TextRequired
- Description
Any friendly name of this object
- Name
fileType- Type
- TextRequired
- Description
- Name
slug- Type
- SlugRequired
- Description
- Name
isPublic- Type
- SlugRequired
- Description
GETorPOST
/api/file/get-listList
This endpoint allows you to retrieve a paginated list of all your File. By default, a maximum of ten File are shown per page.
Optional Query Params
limit- number
- Number of objects to fetch. By default 10, you can increase this count up to 100
skip- number
- Number of objects to skip. This can be useful in pagination
Optional Request Body
query- If you would like to filter on File. You can specify include a query here. For more information, please check out writing queries here.
select- By default you will only retrieve ID of objects, to retrieve more fields you need to select them. For more information, please check how to select here.
sort- Objects will be sorted based on created date by default. You can change the sort order — see Data Types: Sort.
List Request
POST/api/file/get-list?skip=0&limit=10Headers
Content-Type: application/json ApiKey: YOUR_API_KEY
Body
{
"select": {
"file": true,
"fileType": true,
"isPublic": true,
"name": true,
"slug": true
},
"query": {
"fileType": "Example value"
},
"sort": {
"createdAt": -1
}
}Response
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "376eab80-28fe-11f1-b591-3fdcef396aba",
"file": "Example value",
"fileType": "Example value",
"isPublic": "Example value",
"name": "Example name",
"slug": "Example value"
},
{
"_id": "376eab81-28fe-11f1-b591-3fdcef396aba",
"file": "Example value",
"fileType": "Example value",
"isPublic": "Example value",
"name": "Example name",
"slug": "Example value"
},
{
"_id": "376eab82-28fe-11f1-b591-3fdcef396aba",
"file": "Example value",
"fileType": "Example value",
"isPublic": "Example value",
"name": "Example name",
"slug": "Example value"
}
]
}GETorPOST
/api/file/:id/get-itemGet item by ID
This endpoint allows you to retrieve File by ID.
id- text
- ID of the Object
Optional Request Body
select- By default you will only retrieve ID of objects, to retrieve more fields you need to select them. For more information, please check how to select here.
Get Item Request
POST/api/file/:id/get-itemHeaders
Content-Type: application/json ApiKey: YOUR_API_KEY
Body
{
"select": {
"file": true,
"fileType": true,
"isPublic": true,
"name": true,
"slug": true
}
}Response
{
"_id": "376eab80-28fe-11f1-b591-3fdcef396aba",
"file": "Example value",
"fileType": "Example value",
"isPublic": "Example value",
"name": "Example name",
"slug": "Example value"
}POST
/api/file/countCount
This endpoint allows you to retrieve the count of all your File.
Optional Request Body
query- If you would like to filter on File. You can specify include a query here. For more information, please check out writing queries here.
Count Request
POST/api/file/countHeaders
Content-Type: application/json ApiKey: YOUR_API_KEY
Body
{
"query": {
"fileType": "Example value"
}
}Response
{
"count": 107
}POST
/api/fileCreate File
This endpoint allows you to create a new object.
Create Request
POST/api/fileHeaders
Content-Type: application/json ApiKey: YOUR_API_KEY
Body
{
"data": {
"file": "Example value",
"fileType": "Example value",
"isPublic": "Example value",
"name": "Example name",
"slug": "Example value"
}
}Response
{
"_id": "376eab80-28fe-11f1-b591-3fdcef396aba",
"file": "Example value",
"fileType": "Example value",
"isPublic": "Example value",
"name": "Example name",
"slug": "Example value"
}Permissions
Your API Token needs permissions to create, update, read or delete this resource. If you do not have permissions to make a request a 4xx status will be sent as response.
Read Permissions
Required to read File
This resource cannot be read via the API
Create Permissions
Required to create File
Logged in UserAuthenticatedRequest
Update Permissions
Required to update File
This resource cannot be updated via the API
Delete Permissions
Required to delete File
This resource cannot be deleted via the API