API Framework Actions

API Framework actions are Studio actions that allow you to use CXone APIs in your scripts. You can use the action instead of calling the API using traditional integration methods such as using a snippet or the RestAPI action. API actions are all located on the Framework tab in Studio.

The API actions are different from the standard Studio actions. They are currently not documented in the online help. However, the APIs that correspond to the API actions are documented in the CXone developer portalA square with an arrow pointing from the center to the upper right corner.. You can use this documentation when working with API actions in your scripts.

Not every CXone API has a corresponding API action in Studio.

API Action Versions

As new versions of CXone APIs are released, new versions of the corresponding actions may be released in Studio. Generally, it's best to use the newest version of the action. Older versions still work in most cases. You can try the different versions to see which ones work and provide the functionality you need.

Some API actions have the version in the action name. You can see it when you look at the tree structure of actions on the Framework tab. Not all API actions include the version number. For these actions, you can find the version in the action's extended properties. You can only see the extended properties on the Properties tab when the action is selected in the Framework tab.

Not every version of every API has a corresponding action in Studio.

View API Action Extended Properties

  1. In Studio, rearrange the tabs so you can see the Properties tab and the Framework tab at the same time.
  2. On the Framework tab, click on an API action.
  3. On the Properties tab, you can now see the extended properties of the action. In particular, the following properties are helpful when learning about an API action: 
    • Misc > Parameters > Verb: This property shows you the method, or verb, associated with the action.
    • Misc > Parameters > Version: This property shows you the version of the API.
    • Misc > Web > URI: This property can be useful when locating the API's documentation in the developer portal.
    • Misc > Parameters: In the Parameters section, you can expand the properties to see additional information about each of the action's properties.

Locate API Documentation

CXone APIs are documented in the CXone Developer Portal. API actions in Studio don't have a direct link to the documentation corresponding to their APIs. However, you can use information available in the action's extended properties to help you locate the documentation.

Using the URI requires general familiarity of the CXone system as a whole and of the different CXone APIs. This is because determining which API matches an action in Studio is not always straightforward. Knowing the general flow of a contact through CXone helps you correctly interpret an action's URI and apply the clues found there to the structure of API documentation in the developer portal. The examples in this section demonstrate the interpretation that can be required.

The home page of the API section of the developer portal provides an overview of each CXone API.

Example 1

Sometimes there's a straightforward correlation between an action and its API:

Based on the action's name and URI, the first two APIs to consider are the Agent API and the Admin API. By looking at the list of API calls for each one, you can eliminate the Agent API. Its description indicates that it's used to manage agent sessions and it doesn't appear to have any calls related to skills, as shown in the following image.

The Admin API indicates that it works with system objects such as skills. The list of API calls available for this API includes skills, as shown in the following image.

When you expand the Skills section, one of the endpoints is GET /skills/agents. The small description for this endpoint says that it "Returns skills assignments." 

Example 2

Sometimes the correlation is not obvious, as shown in the following example. In cases such as this, you'll need to apply your knowledge of CXone APIs and the platform itself to find the corresponding API endpoint. —

Based on this action's name and URI, it's not immediately obvious which API to look at first. If you're not sure where to start, you can look through the documentation for each API and examine any section that relates to contacts. The Admin API is the only one with a top-level contact section. Unfortunately, this API doesn't contain endpoints relating to active contacts.

At this point, you might key in on the word active in the action name and URI. Drawing on your knowledge of CXone, you know that active indicates contacts that are currently being handled. This leads you to look more closely at the Real-Time Data API. This API only has one section, and when you expand it, you see that one of the endpoints is GET /contacts/active. The small description for this endpoint says that it "Returns active contacts."