Case API
The Case API provides endpoints that enable you to retrieve and update Customer Service Management (CSM) case records.
In addition, you can generate new social media profile records when creating a case.
The Case API requires the Customer Service plugin (com.sn_customerservice) and is provided within the sn_customerservice namespace.
Users must have the csm_ws_integration role for full API access. External users with the sn_customerservice.customer or sn_customerservice.consumer roles can also access the endpoints.
Parent Topic:REST API reference
Case - GET /sn_customerservice/case/{id}/activities
Retrieves the activity stream for a specified Customer Service Management (CSM) case.
Use this endpoint to retrieve all entries from the activity stream for a specified record from the Case [sn_customerservice_case] table.
To use this endpoint, users must have the csm_ws_integration, sn_customerservice.customer, or sn_customerservice.consumer role.
Note: You can reference all sysparm query parameters using either their full name or their shortened name (without the sysparm_ prefix). For example, for sysparm_limit you can also use limit.
URL format
Versioned URL: /api/sn_customerservice/{api_version}/case/{id}/activities
Default URL: /api/sn_customerservice/case/{id}/activities
Note: Available versions are specified in the REST API Explorer. For scripted REST APIs there is additional version information on the Scripted REST Service form.
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 |
| id | Sys\_id or case number of the case to retrieve. Results will be unpredictable if a specified case number is shared by two or more cases.Data type: String Table: Case \[sn\_customerservice\_case\] |
| Name | Description |
|---|---|
| sysparm\_activity\_type | Filters the type of activities to return from the activity stream. The entries.element parameter contains the activity type for each activity. For example:
Data type: String Default: Returns all types of activity. |
| sysparm\_limit | Maximum number of records to return. Unusually large sysparm_limit values can impact system performance. For requests that exceed this number of records, use the sysparm_offset parameter to paginate record retrieval. Data type: Number |
| sysparm\_offset | Starting record index for which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks. For example, the first time you call this endpoint, sysparm_offset is set to "0". To simply page through all available records, use Do not pass a negative number in the sysparm_offset parameter.Data type: Number Default: 0 |
| Name | Description |
|---|---|
| None |
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: application/json or application/xml. Default: application/json |
| Header | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Link | REST response data can be split into multiple result sets. Where applicable, the response header contains different links for the first set, previous set, next set, and the last set of records.For example: `https://| X-Total-Count | Response header showing the total number of records matching the request when the sysparm_limit or sysparm_offset query parameters are specified. | Status codesThe 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 or XML)
cURL requestRetrieve the complete activity stream for a CSM case by sys_id. The response shows a single activity stream entry for the specified case, an Additional comments journal entry submitted by the agent. Case - GET /sn_customerservice/case/field_values/{field_name}Retrieves the list of possible field values for a choice or reference field in the Case [sn_customerservice_case] table. To use this endpoint, users must have the csm_ws_integration, sn_customerservice.customer, or sn_customerservice.consumer role. Use this endpoint to populate field value lists in case creation forms. When you request values for a reference field, any reference qualifiers defined for the requested field in the Dictionary Entry [sys_dictionary] table are applied. For more information on reference qualifiers, see Reference qualifiers. You can use the sysparm_ref_qual_input query parameter to specify field values to use when evaluating JavaScript reference qualifiers. For an example, see the query parameter listing below. When you request values for a choice field that is dependent on another field, you can use the sysparm_dependent_value query parameter to specify a value for the dependency parent field and restrict the returned field values accordingly. For more details on dependent fields, see Make a field dependent. Note: You can reference all sysparm query parameters using either their full name or their shortened name (without the sysparm_ prefix). For example, for sysparm_limit you can also use limit. URL formatVersioned URL: Default URL: Note: Available versions are specified in the REST API Explorer. For scripted REST APIs there is additional version information on the Scripted REST Service form. Supported request parameters
HeadersThe 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.
|