CCCIF Media Resource API
-
- UpdatedJan 30, 2025
- 3 minutes to read
- Yokohama
- API reference
The Custom Chat Chatbot Interoperability Framework (CCCIF) Media Resource API provides endpoints that enable a primary bot to upload attachments to the associated ServiceNow instance.
Call this API in your primary bot to upload private attachments from a user that is having a conversation through Virtual Agent (VA). You must then send the mediaUrl parameter that is returned by this API to the VA API.
If the attachment is public, you can just send the attachment URL in the request body of your Virtual Agent Bot Integration call.
To access this API, the Conversational Custom Chat Integration (com.glide.cs.custom.adapter) plugin must be activated. In addition, the attachment system properties must be configured.
For additional information on the capabilities of the Virtual Agent API, see Virtual Agent API.
CCCIF - POST /cccif/media/upload
Uploads a private attachment to the called ServiceNow instance which stores the attachment in the Attachments [sys_attachment] table.
Call this method in your primary bot to upload private attachments from a user that is having a conversation through Virtual Agent (VA). You must then send the mediaUrl parameter that is returned by this method to the VA API using the Virtual Agent Bot Integration API.
URL format
Versioned URL: /api/now/{api_version}/cccif/media/upload
Default URL: /api/now/cccif/media/upload
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
file | Required. Path of the file to upload. Data type: String, such as @File path <file_path> |
provider_application_id | Sys_id of the sys_cs_provider_application interacting with the VA
bot. Default: Sys_id of the VA Bot to Bot Provider Application |
user_id | Required. Unique user identifier of the user interacting with the VA bot. This
can be any string that is unique for each user. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Supported types: multipart/form-data. |
Header | Description |
---|---|
Content-Type | Data format of the response body. Only supports application/json. |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON)
Example: cURL request
This example shows how to upload a .png file attachment.
Response: