Files
Overview of files API methods
Upload File
POST
https://api.codemash.io/:version/files
Uploads a file.
Path Parameters
Name | Type | Description |
---|---|---|
version | string | The version of the API endpoint. |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Your project's secret key. |
x-cm-projectid | string | Your project's ID. Can be passed as a query parameter. |
Request Body
Name | Type | Description |
---|---|---|
path | string | Path in your file browser. |
Upload Record File
POST
https://api.codemash.io/:version/db/:collectionName/files
Uploads a file for a record field.
Path Parameters
Name | Type | Description |
---|---|---|
version | string | The version of the API endpoint. |
collectionName | string | Name of a collection. |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Your project's secret key. |
x-cm-projectid | string | Your project's ID. Can be passed as a query parameter. |
Request Body
Name | Type | Description |
---|---|---|
recordId | string | The ID of a record inside collection. |
uniqueFieldName | string | Record file field name. |
Upload User File
POST
https://api.codemash.io/:version/membership/users/files
Uploads a file for a user meta field.
Path Parameters
Name | Type | Description |
---|---|---|
version | string | The version of the API endpoint. |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Your project's secret key. |
x-cm-projectid | string | Your project's ID. Can be passed as a query parameter. |
Request Body
Name | Type | Description |
---|---|---|
userId | string | The ID of a user. |
metaFieldName | string | User meta-file field name. |
Last updated