All Classes Functions Pages
Introduction

Overview

The ECE REST API provides a simple and powerful way to interact with resources, such as Article, Case, Activity, or Customer in ECE Platform using the standard HTTP methods (GET, PUT, POST, and DELETE).
  • GET method allows retrieving a resource
  • POST method allows creating a new resource
  • PUT method allows updating a resource
  • DELETE method allows deleting or removing a resource
Since ECE REST API operates over HTTP(s), it makes it easy to use it with any programming language or framework. The API can be used for many purposes, including:
  • Building mobile apps and modern web applications.
  • Integrating ECE platform with other applications.

Getting Started With ECE REST API

Before you begin working with ECE API it is important to understand some of its key characteristics.

Stateless

ECE REST APIs are stateless. All the necessary information to process a request is contained in the request itself. No context information is stored on the server to process the request. Statelessness improves the API performance, and allows better scalability for the application.

Layered

The REST architecture of ECE APIs allows the existence of intermediaries such as gateways, proxies, or load balancers between the client and the server to facilitate improved scalability and to enforce security policies.

Support for XML and JSON

ECE REST API supports both XML and JSON as the data format for requests and responses. The default format is XML.
Use the HTTP header Accept:application/json to select JSON or Accept:application/xml to select XML.

     Date and Time format
Date and time information in requests and responses follows the ISO 8601 format.

Authentication

ECE REST API supports session based authentication. To learn more about authentication refer Understanding Authentication.

Compression

In order to improve performance, ECE API allows the use of compression on responses.

     Response Compression
You can request compression on the responses by using the HTTP header Accept-Encoding:gzip in a request. The response is compressed if a client specifies this header in the request, and the response includes HTTP header Content-Encoding:gzip to indicate response compression
     Request Compression
Compressing of requests is not supported at this time.

Optimized Responses

ECE API responses are optimized to minimize the network traffic. As a result, the response includes only a pre-defined set of attributes; the other parts of the resource are not included in the response unless explicitly requested. You can request additional attributes of a resource by using the $attribute query parameter.

Use the $attribute query parameter to specify a comma-separated list of additional attributes that you want in the response. For example, appending $attributes=keywords,summary to an Article URI's request will result in inclusion of keywords and summary for the requested article. You can also use $attributes=all, a special construct, to request all the attributes of a resource.

API load test

All public interaction APIs that been released till now and that we will be releasing as part of the test. Test is run on setup with base data.

Object Count Object Count
Case590925Activity1030019
Chat Activity1638Email Activity1028119
Department5Customers - Individual51770
Customers - Group0Customers - Corporate0
Email Alias24Chat Entry Point33
Queue308Purge Job3
Email Attachment118686Macro232
Message51Notes2321
Language in use1Articles98631
Articles with Attachments16210Email Inbound Workflow32
Outbound Workflow1Alarm Workflow7

API Frequency (Interaction API)

  • ECE CHAT+API: 5 Concurrent Users - 2 hrs Load data
  • Transactions per Second: 50
  • Transactions per Minute: 3035

Success Criteria

  • All API requests should pass (no errors during the test)
  • Response time should be ≤ 500 ms

Results

All APIs except the ones listed below had response times above 500 ms but were within an average of 1 second.

90th Percentile Response Times (>500 ms)

API Name Response Time (ms)
Create Individual Customer523
Post Inbound Activity1270
Search Case by Work Status556
Search Customer by Custom Attribute750
Change Customer of Activity705

CPU Usage

If APIs are run on top of full load, a 20% increase in CPU usage is expected compared to standard load tests without API calls.

Note on Non-Agent Console APIs

The load test was performed on Interaction/Agent Console APIs. For Admin APIs (e.g., Get Agent Details or Get Queue Details), the frequency of API calls should not match that of interaction APIs.

Admin APIs related to agent/queue configuration rely on real-time AWDB data. Configuration changes may reset permissions, affecting AWDB response times. Therefore, these APIs should be triggered:

  • On an ad hoc basis
  • Based on expected configuration change frequency on the UCCE side
  • With a minimum interval of 1 API call per 15 minutes

Support for CORS

ECE REST API supports Cross-origin resource sharing (CORS). CORS is a mechanism that allows resources (e.g. fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain from which the resource originated.
You can configure a whitelist of the origins for ECE REST API from the ECE Administration Console.

Scope of the API

The API currently covers the following areas:

Administration APIs:

Interaction:

Messaging APIs:

Common APIs: