Upload API
Uploads a file as an attachment to a session.| Method | POST |
|---|---|
| Endpoint | /apps/<AppID>/environments/<EnvName>/attachments/upload |
| Content-type | multipart/form-data |
| Authorization Header | x-api-key: <API-KEY> |
Path Parameters
| Fields | Description |
|---|---|
| AppID | Unique Identifier for the app. |
| EnvName | Name of the environment to be used for the agent. |
Request Parameters (form-data)
| Fields | Description | Mandatory |
|---|---|---|
| File | The actual file to be uploaded. | Yes |
| userReference | User reference | Yes |
| uploadType | Specifies the context of the upload. Set this to ‘runtime’. | Yes |
Response
Each uploaded file is assigned a unique file ID, which is returned in response along with other details of the file, such as name, path, size, extension, etc. Sample responseDelete File
Deletes an uploaded file.| Method | DELETE |
|---|---|
| Endpoint | /apps/<AppID>/environments/<EnvName>/attachments/<fileId> |
| Content-type | multipart/form-data |
| Authorization Header | x-api-key: <API-KEY> |
Path Parameters
| Fields | Description |
|---|---|
| AppID | Unique Identifier for the app. |
| EnvName | Name of the environment to be used for the agent. |
| fileId | Unique identifier of the file to be deleted. |
Request Parameters
| Fields | Description | Mandatory |
|---|---|---|
| sessionId | Unique Identifier of the session | No |
| sessionReference | Reference associated with the session | No |