All Classes Pages
GetActivitiesByIdsPage Class Reference

More...

Detailed Description

Get Activities by IDs

Overview

This API allows a user to retrieve one or more activities identified by activity IDs. To provide multiple IDs, a comma separated string must be passed in the request URI. A maximum of 75 IDs are allowed per request. Neither pagination nor range query parameters are supported by this API.

Since
11.6

APIs

Method URL Description
GET /ws/v12/interaction/activity/{IDs} Retrieve activities by their IDs.
{IDs}: a comma separated string of activity IDs.

Authentication

Authentication is required. The client must be logged in to call this API. Each API request must contain X-egain-session request header returned by Login API.

Permissions

All of the following are required:

  • 'View Agent Console' action.
  • All requested activities must satisfy one of the following:
    • activity belongs to user's home department
    • activity belongs to a department where the user is a foreign user
    • the department of the activity is shared with the department of the user, and as part of this sharing, activity sharing is enabled as well

Licenses

The logged in user must have the following licenses:

Request

Request headers

Name Description Allowed values Default value
X-egain-session Session ID obtained from Login API response header N/A N/A
Accept Content type accepted by client application/xml or application/json N/A
Accept-Language Language locale accepted by client (used for locale specific fields in resource representation and in error responses) Supported 'Accept-Language' header codes default system language

Supported API specific query parameters

Name Description Allowed values Default value
payloadVersion This is required only to get the internal version of chat activity transcript.
The internal version includes:
  • Agent to agent messages during conference.
  • Whisper chat.
  • Deflection history.
  • VA to chat escalation.
  • System messages sent to Agent.
  • internal
N/A
embedInlineAttachment The only allowed value for this parameter is "yes". If provided, the inline attachments will be embedded in the body of the email, in a base64 encoded format.
Note that this is applicable only for email activities, and only when a single email activity is requested.
  • yes
N/A

Supported common query parameters

Refer to Supported Common Query Parameters in ECE REST API page for detailed description of each common parameter listed below.

Response

Response headers

Name Description Possible values
X-egain-session Session ID of the current user session N/A
Content-Type Media type of response body application/xml or application/json

Response body xml schemas:

  • schema-interaction-activity-Activities - used in case of success
  • schema-kb-WSError - used in case of error

Summary attributes always returned in server response

   Summary attributes of Activity Resource

Additional attributes returned in server response if explicitly requested by client

Server can be prompted to return additional attributes of resource representation using $attribute common query parameter.
See Values of $attribute common parameter supported by Activity Resource for the list of allowed attribute names.

HTTP status codes

Success Status codes

200 - OK

  • The request was successfully executed

Failure Status codes

400 - Bad Request

  • Unsupported query or common parameter in request URL
  • Invalid value of common parameter in request URL (e.g., unallowed value of $order, unsupported $attribute value etc.)
  • $order provided without $sort
  • More than 75 IDs are supplied in request URL

401 - Unauthorized

  • X-egain-session request header is missing
  • Session is invalid or expired

403 - Forbidden

  • The user does not have sufficient permissions to view one or more of the requested resources

404 - Not Found

  • One or more of the requested resource IDs does not exist

406 - Not Acceptable

  • Invalid 'Accept-Language' header value

500 - Internal server error

Examples:

Example 1 - Get all attributes for an email activity
Example 2 - Get all attributes for a chat activity
v12-interaction-activity-getbyid-example3
Example 4 - Get all attributes for a call track activity
v12-interaction-activity-getbyid-example5
Example 6 - Get an additional attribute for multiple activities sorted on department name
Example 7 - Get an additional custom attribute for a single activity
Example 8 - Get summary attributes and payload for activities of all types
Example 9 - Get internal version of a chat activity transcript
Example 10 - Get email content with inline embedded attachment content