Set activity status

post

/engagement/api/agent/{fqSiteName}/v1/setActivityStatus

This operation is used by the agent to set the agent's activity status to available or unavailable.
The following is the list of exception codes that can be returned from this operation:
  • ACCESS_DENIED - Authentication failed.
  • UNKNOWN_EXCEPTION - An unknown error has occurred.
  • BAD_REQUEST - A field in the request is invalid.
  • INTERNAL_SERVER_ERROR - An error occurred within the core server.
  • CONFLICT - The agent status could not be changed.

Request

Supported Media Types
Path Parameters
Header Parameters
  • A header element containing the agent account identifier.
  • A header element containing the unique session identifier returned in the create automated agent session call.
Body ()
The object containing the request information.
Root Schema : com.rightnow.chat.rest.agent_api.model.requests.v1.ActivityStatusChangeRequest
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

The request completed successfully.
Body ()
Root Schema : com.rightnow.chat.rest.agent_api.model.responses.v1.ActivityStatusChangeResponse
Type: object
Show Source
Nested Schema : com.rightnow.chat.rest.agent_api.model.responses.v1.results.ChatActivityStatusChangeResult
Type: object
Show Source
Nested Schema : com.rightnow.chat.rest.agent_api.model.types.v1.ChatSystemError
Type: object
Show Source

400 Response

The validation of the request object failed.
Body ()
Root Schema : schema
Type: object

403 Response

The agent session identifier is unknown.
Body ()
Root Schema : schema
Type: object

404 Response

The resource was not found.
Body ()
Root Schema : schema
Type: object

500 Response

An error occurred in the chat server while processing the request.
Body ()
Root Schema : schema
Type: object
Back to Top

Examples

The following example shows how to set the agent's status.

cURL Command Example

curl -X POST https://chat_rest_server_domain.com/engagement/api/agent/day001_221100_sql_001h/v1/setActivityStatus?pool=297:1 -H 'Content-Type: application/json; charset=UTF-8' -H 'X-JSESSIONID: node01h8m13tljpm7ns8nayp0pid91' -d ' -H 'X-AID: 12' {"timeCreated" :1618317020415, "sequenceNumber" : 12, "status" : "AVAILABLE", "subTypeId": 25}'

Request Body Example

The following shows an example of the request body in JSON format.

{
  "timeCreated" : 1618317020415,
  "sequenceNumber" : 12,
  "status" : "AVAILABLE",
  "subTypeId": 25
}

Response Header Example

The following shows an example of the response header.

Status: 200 OK
Content-Type: application/json;charset=utf-8

Response Body Example

The following shows an example of the response body in JSON format.

{
  "chatActivityStatusChangeResult": {
    "status": "AVAILABLE",
    "subTypeId": 25
  },
  "chatSystemError": null,
  "clientSendTime": 1618302560000,
  "serviceStartTime": 1648665877936,
  "serviceFinishTime": 1648665879114,
  "sessionId": "node0e17vqd3nxmwrgp0o1tyij12g0",
  "clientId": 47,
  "clientIdString": "47",
  "sequenceNumber": 12,
  "sequenceNumberString": "12"
}
Back to Top