Create file
To create a file item you first need to store it using the upload endpoint.
Headers
- Type: string
X - Exabase - Workspace - Id Optional. When provided, the request is executed against the specified delegated workspace. If omitted, the parent workspace is used.
Body
application/json
- Type: object
attachment required - Type: string
mime Type required parent Id required- Type: string · UUID
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$Parent resource ID or an alias (the alias is resolved to the actual ID during the request handling).
comment - Type: string
anonymous Display Name min length:1max length:100 - Type: string
content max length:25000
location - Type: string
insert After Id required - Type: string
sort Key min length:1max length:128required
- Type: object
metadata - Type: string
name min length:1max length:255 - Type: array
- Type: stringFormat: uri
url
Responses
- application/json
Request Example for post/v2/files
curl https://api.exabase.io/v2/files \
--request POST \
--header 'X-Exabase-Workspace-Id: ' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: YOUR_SECRET_TOKEN' \
--data '{
"name": "",
"attachment": {
"path": "",
"filename": ""
},
"parentId": "",
"tags": [
{
"id": ""
}
],
"comment": null,
"location": {
"sortKey": "",
"insertAfterId": ""
},
"url": "",
"mimeType": "",
"metadata": {
"attributes": {
"dimensions": {
"width": null,
"height": null
}
},
"transcript": {
"key": ""
},
"voiceNote": null
}
}'
{
"id": "string",
"kind": "document",
"mimeType": null,
"extension": null,
"name": null,
"description": null,
"icon": {
"type": "emoji",
"emoji": "string"
},
"size": null,
"url": "string",
"commentPinned": null,
"label": {
"id": 1,
"hexColor": "string"
},
"parent": {
"id": "string",
"name": null
},
"cover": null,
"user": null,
"root": {
"id": "string",
"type": "SYSTEM",
"subtype": "GOOGLE_DRIVE",
"isPrivate": true,
"folder": {
"id": "string",
"name": null,
"user": null
}
},
"stateProcessing": "pending",
"originUrl": null,
"tags": [
{
"id": "string",
"name": "string"
}
],
"chats": [
{
"id": "string",
"name": null,
"isPinned": true,
"createdAt": "string",
"modifiedAt": "string"
}
],
"thumbnail": {
"sm": "string",
"md": "string",
"lg": "string",
"xl": "string",
"original": "string"
},
"fileUrl": null,
"preferences": null,
"isPasswordProtected": false,
"isLocked": false,
"publishedAncestors": [
{
"resourceId": "string",
"accessToken": "string"
}
],
"createdAt": "string",
"modifiedAt": "string"
}