Get file metadata
Update file metadata
Upload a file
Download a file
Start upload chunks session
Upload chunk
Commit upload chunk session
Returns metadata information for a file.
GET /v1/files/{fileId}/metadata
| Name | Type | Description |
|---|---|---|
| fileId | string |
The file id to request metadata for. |
The query parameters are not expected.
The request body must be empty.
The successful response contains an instance of a File.
The error response contains an Error.
Request
curl "https://app.solvexia.com/api/v1/files/f-45678/metadata" -X GET -H "Authorization: Bearer syPHeMY5H--kdRtfpoXTgYFF7LHgVOhIjOQ5QkIvSD68VZvc2_uAew.P07tEVThD5SqNCV_tFwbAg"Response
{
"id": "f-732",
"name": "Sales Q1.xlsx",
"sizeInBytes": 55741,
"fileExtension": "xlsx",
"url": "https://app.solvexia.com/api/v1/files/f-732"
}Updates metadata information for a file.
POST /v1/files/{fileId}/metadata
| Name | Type | Description |
|---|---|---|
| fileId | string |
The id of the file to update metadata for. |
The query parameters are not expected.
The request body must contain an instance of File. Note that only the name field may be changed.
{
"name": "Sales Q1 v2 changed.xlsx"
}The successful response contains an instance of a File.
The error response contains an Error.
Request
curl "https://app.solvexia.com/api/v1/files/f-45678/metadata" -X POST -H "Authorization: Bearer syPHeMY5H--kdRtfpoXTgYFF7LHgVOhIjOQ5QkIvSD68VZvc2_uAew.P07tEVThD5SqNCV_tFwbAg" -H "Content-Type: application/json" -d '{"name":"Sales Q1 v2 changed.xlsx"}'Response
{
"id": "f-45678",
"name": "Sales Q1 v2 changed.xlsx",
"sizeInBytes": 74382,
"fileExtension": "xlsx",
"url": "https://app.solvexia.com/api/v1/files/f-45678"
}Uploads file as a form data using streaming.
POST /v1/files/{fileId}
| Name | Type | Description |
|---|---|---|
| fileId | string |
The file id to upload. |
The query parameters are not expected.
The request body must contain form data.
The successful response contains an instance of a File.
The error response contains an Error.
Request
curl --location --request POST 'https://app.solvexia.com/api/v1/files/f-2238' \
--header 'Authorization: Bearer syPHeMY5H--kdRtfpoXTgYFF7LHgVOhIjOQ5QkIvSD68VZvc2_uAew.P07tEVThD5SqNCV_tFwbAg' \
--form 'file=@/C:/uploadfile.xlsx'Response
{
"id": "f-45678",
"name": "uploadfile.xlsx",
"sizeInBytes": 74382,
"fileExtension": "xlsx",
"url": "https://app.solvexia.com/api/v1/files/f-45678"
}Downloads a file.
GET /v1/files/{fileId}
| Name | Type | Description |
|---|---|---|
| fileId | string |
The id of the file requested to download. |
The query parameters are not expected.
The request body must be empty.
The successful response contains file byte array.
The error response contains an Error.
Request
curl 'https://app.solvexia.com/api/v1/files/f-2238' -x GET --header 'Authorization: Bearer syPHeMY5H--kdRtfpoXTgYFF7LHgVOhIjOQ5QkIvSD68VZvc2_uAew.P07tEVThD5SqNCV_tFwbAg' --output "./File.txt"Response
Starts an upload chunk session for a file.
POST /v1/files/{fileId}/uploadsessions
| Name | Type | Description |
|---|---|---|
| fileId | string |
The file id to upload. |
The query parameters are not expected.
The request body must must be empty.
The successful response contains an instance of Upload Session.
The error response contains an Error.
Request
curl 'https://app.solvexia.com/api/v1/files/f-2238/uploadsessions' -x POST --header 'Authorization: Bearer syPHeMY5H--kdRtfpoXTgYFF7LHgVOhIjOQ5QkIvSD68VZvc2_uAew.P07tEVThD5SqNCV_tFwbAg'Response
{
"uploadSessionId": "2a27a605-d05f-4199-bae0-8da44cd24f70"
}Uploads a chunk of a file to the upload session for a file.
POST /v1/files/{fileId}/uploadsessions/{uploadSessionId}/chunks/{chunkId}
| Name | Type | Description |
|---|---|---|
| fileId | string |
The file id to upload. |
| uploadSessionId | string |
The upload session id to upload too. |
| chunkId | string |
The chunk id to upload too, it is the sequential number of the chunk. |
The query parameters are not expected.
The request body must contain form data.
The successful response contains an instance of Chunk.
The error response contains an Error.
Request
curl 'https://app.solvexia.com/api/v1/files/f-2238/uploadsessions/2a27a605-d05f-4199-bae0-8da44cd24f70/chunks/1' -x POST --header 'Authorization: Bearer syPHeMY5H--kdRtfpoXTgYFF7LHgVOhIjOQ5QkIvSD68VZvc2_uAew.P07tEVThD5SqNCV_tFwbAg' --form 'file=@/C:/1'Response
{
"fileId": "f-2238",
"uploadSessionId": "2a27a605-d05f-4199-bae0-8da44cd24f70",
"chunkId": 1,
"chunkHash": "봨촿麊掂쬴ʅ꺟꼰믐컫蹸쯇삑"
}Finishes the upload session for a file.
POST /v1/files/{fileId}/uploadsessions/{uploadSessionId}/commit
| Name | Type | Description |
|---|---|---|
| fileId | string |
The file id to finish upload session for. |
| uploadSessionId | string |
The upload session id to finish. |
The query parameters are not expected.
The request body must be empty.
The successful response contains an instance of a File.
The error response contains an Error.
Request
curl 'https://app.solvexia.com/api/v1/files/f-2238/uploadsessions/2a27a605-d05f-4199-bae0-8da44cd24f70/commit' -x POST --header 'Authorization: Bearer syPHeMY5H--kdRtfpoXTgYFF7LHgVOhIjOQ5QkIvSD68VZvc2_uAew.P07tEVThD5SqNCV_tFwbAg'Response
{
"id": "f-2238",
"name": "uploadfile.xlsx",
"sizeInBytes": 74382,
"fileExtension": "xlsx",
"url": "https://app.solvexia.com/api/v1/files/f-2238"
}