Get Activity by IDs

Overview

Use this API 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.

Note:

  • If actor is customer:
    • This API succeeds only if the requested activity is visible to the customer. Refer 'API's for Core Case management' section for information about the activities visible to the customer.

      Permissions

      Actor Permission
      User All of the following are required:
      • Must have 'View Agent Console' action on 'System' resource.
      • Only activities that satisfy one of the below conditions are returned by server::
        • activity must either belong to the user's home department, or to a department in which 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.
      Client Application No additional permission required.
      Customer
    • Only activities that the customer (self, or customer sent in as query parameter) can view are returned. Refer 'API's for Core Case management' section for information about the activities visible to the customer.
    • If the query parameter customer={id} is provided, the logged in customer must be authorized to perform this action on behalf of the customer specified through the "customer" query parameter. Otherwise, the application returns a 400 (bad request) response code.

Supported common query parameters

One or more query parameters listed below can be supplied per API call:

Actor Available values
User / Client Application $attribute, $order, $sort
Customer $attribute

Supported API specific query parameters

One or more query parameters listed below can be supplied per API call:

Actor Available values
User transcriptDatetimeFormat, timeOffset, payloadVersion, embedInlineAttachment
Client Application payloadVersion, embedInlineAttachment
Customer customer, transcriptDatetimeFormat, timeOffset
SecurityoAuthUser or oAuthClient or oAuthCustomer
Request
path Parameters
ids
required
string <= 1500 characters

Pass one id or comma separated list of id(s).

Examples:
Providing single ID.
1001
Providing multiple IDs.
1001,1002
query Parameters
$attribute
string

Server can be prompted to return additional attributes of resource representation using $attribute common query parameter.

Actor Available values
User / Client Application all, created, createdBy, payload, custom.<name>, lastDepartment, contactPointData, userLastWorked, classifications, language
Customer all, created, createdBy, payload, custom.<name>
Examples:
$attribute=
Attributes 'created' and 'payload' is returned in server response.
$attribute=created,payload
All the attributes are returned in server response.
$attribute=all
$order
string

Common query parameter $order.

Enum: "asc" "desc"
$sort
string

Activities returned in server response are sorted based on the attribute supplied under $sort.

Actor Available values
User / Client Application id, case, created, custom.<name>, department, dueDate, lastModified
Customer id, case, created, custom.<name>
Examples:
$sort=
Response is sorted based on 'id' attribute.
$sort=id
Response is sorted based on 'created' attribute.
$sort=created
customer
string
Actor Description
User / Client Application Not allowed.
Customer The customer must be authorized to perform this action on behalf of the customer specified through the "customer" query parameter.
payloadVersion
string
Actor Description
User / Client Application 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.
  • System messages sent to Agent.
Customer Not allowed.
Value: "internal"
embedInlineAttachment
string
Actor Description
User / Client Application The only allowed value for this parameter is "yes". If provided, the inline attachments is 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.
Customer Not allowed.
Value: "yes"
transcriptDatetimeFormat
string
Actor Description
User / Customer Date and time format used for transcript date and messages. Default format: h:mm a (dd MMM yyyy). Note that this is applicable only for chat activities, and only when a single chat activity is requested.
Client Application Not allowed.
Enum: "MM/dd/yyyy hh:mm a" "MMM/dd/yyyy hh:mm a" "MMMM dd yyyy hh:mm a" "yyyy-MM-dd hh:mm a" "dd/MM/yyyy hh:mm a" "dd-MM-yyyy hh:mm a" "d MMM yyyy hh:mm a" "MMM d, yyyy hh:mm a" "dd.MM.yyyy hh:mm a" "MM/dd/yyyy HH:mm" "MMM/dd/yyyy HH:mm" "MMMM dd yyyy HH:mm" "yyyy-MM-dd HH:mm" "dd/MM/yyyy HH:mm" "dd-MM-yyyy HH:mm" "d MMM yyyy HH:mm" "MMM d, yyyy HH:mm" "dd.MM.yyyy HH:mm" "h:mm a (dd MMM yyyy)"
timeOffset
integer [ -720 .. 720 ]
Actor Description
User / Customer The time offset of the chat messages. Allowed values: Between -720 and 720. Default value: 0. Note that this is applicable only for chat activities, and only when a single chat activity is requested.
Client Application Not allowed.
header Parameters
Accept
required
string
Default: application/json

Content type accepted by client.

Enum: "application/json" "application/xml"
Accept-Language
required
string
Default: en-US

Language locale accepted by client (used for locale specific fields in resource representation and in error responses).

Enum: "en-US" "es-ES" "fr-FR" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR" "sv-SE"
Responses
200

OK

  • The request was successfully executed.
400

Bad Request

  • Any criteria for successful execution mentioned in the Overview and Request Body sections are violated.
  • In case actor is customer and the logged in customer does not have grants on the customer provided through the query parameter "customer".
401

Unauthorized

  • In case actor is user or customer and :
    • X-egain-session request header is missing.
    • Session is invalid or expired.
  • In case actor is client application and :
    • Authorization header is not provided.
    • Authorization header format is incorrect.
    • Session does not exist corresponding to the provided authorization header.
    • The session identified through authorization header is not a client application session.
403

Forbidden

404

Not Found

  • One or more activity IDs specified in the request were not found.
  • One or more activity IDs specified in the request is not visible to the logged in customer.
406

Not Acceptable

500

Internal server error

get/activity/{ids}
Request samples
Response samples
application/json
  • GET /core/casemgr/v3/activity/1205?customer=1000
  • This example demonstrates the following:
    • Getting the details of an activity of another customer.
    • Representation of the summary attributes of an email activity.
    • URLs in the links of an activity representation when activity belongs to another customer.
{
  • "activity": [
    ]
}