All Classes Pages
GetAttachmentDetails Class Reference

More...

Detailed Description

Get Attachment Details

Overview

This API allows the user to get details for an attachment belonging to a specific activity. If requested, one of the response attributes is the contentUrl, which can be used to download the content of the attachment. This only exists temporarily on the server. The client should immediately download the attachment content if needed. The attachment can be retrieved only once as it is deleted from the server after download.

Since
11.6.0.3

APIs

Method URL Description
GET /ws/v12/interaction/activity/{ID1}/attachment{ID2} Retrieve details for an attachment having ID: {ID2} belonging to an activity having ID: {ID1}

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

If the logged in agent can see the activity, then the agent is able to see its attachments. All of the following are required:

  • 'View Agent Console' action
  • The requested activity must belong to the user's home department, or to the department where the user is a foreign user

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

   NONE

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-Attachment - used in case of success
  • schema-kb-WSError - used in case of error

Summary attributes

Summary attributes of Attachment Resource

HTTP status codes

Success Status codes:

200 (OK)

  • This response code is returned if the request is successful

Failure Status codes:

400 (Bad request)

  • {ID1} or {ID2} are not passed
  • Unsupported query parameter is sent in request URL.
  • Required common query parameter is not provided. Refer Supported common query parameters section for more details.

401 (Unauthorized)

  • X-egain-session header is missing
  • Session is invalid

403 (Forbidden)

  • The user does not have the appropriate permissions for this information

404 (Not found)

  • Activity ID supplied in the URI doesn't exist
  • Attachment ID supplied in the URI doesn't exist for the given activity

500 (Internal server error)

  • There are any other errors while processing the request.

Examples:

Example 1 - Get details of an attachment
Example 2 - Get contentUrl along with details for an attachment
Example 3 - Get all attributes along with details for an attachment