Revision as of 15:23, November 25, 2019 by Jumunn (talk | contribs) (Update with the copy of version: 8.5.2DRAFT)
Jump to: navigation, search

Platform Configuration API

Overview

You can use the Platform Configuration API to get read and write access to low-level data from Configuration Server. See Introduction to the Configuration Layer Objects for a full list of the supported configuration objects.

Accessing the API

The following table provides basic information about accessing the Platform Configuration API:

Root request URL /api/v2/platform/configuration
HTTP Methods GET, POST, PUT, DELETE
Required Features
  • api-platform-configuration-read — for read operations
  • api-platform-configuration-write — for write operations

All configuration objects are retrieved directly from Configuration Server by using the following URI naming format: the plural version of the object name in lower case, with each word separated by a hyphen (-). Here are a few examples:

Configuration object URI name
CfgAccessGroup access-groups
CfgCampaign campaigns
CfgAgentLogin agent-logins
CfgSkill skills

The API also supports the standard CfgQuery attributes for an object as parameters on the URI. If you filter the returned resources using these parameters, you can enclose the filter values in quotes to force a "string" type, where applicable. If the filter value doesn't have quotes and is numeric, Web Services uses an integer filter type. You should be aware of the filter types Configuration Server expects and use quotes as needed. See List of Configuration Layer Objects for details about configuration objects and their filters.

For example, the CfgApplication object has a name attribute (a string) and a dbid attribute (an integer).

Here's how you could query by application name, using quotes around the string filter value:

Request

GET http://198.51.100.10:8080/api/v2/platform/configuration/applications?name="SomeName"

And here's how you could query by dbid, without quotes around the integer filter value:

Request

GET http://198.51.100.10:8080/api/v2/platform/configuration/applications?dbid=123

Security

All Platform Configuration API operations are performed with the credentials of the currently logged in user. If a user doesn't have permissions to access a given object or to perform a given operation, Web Services returns an error. If you retrieve object lists through a query, Web Services only returns the set of objects that are accessible to the currently logged in user.

GET Operations

You can retrieve lists of all objects in a contact center for a given object type. For example, you can get all the CfgAgentLogin objects:

Request

GET http://198.51.100.10:8080/api/v2/platform/configuration/agent-logins

Response

{  
   "statusCode":0,
   "agent-logins":[  
      {  
         "useOverride":"2",
         "tenantDBID":"1",
         "DBID":"261",
         "switchSpecificType":"1",
         "userProperties":{  
            "TServer":{  
               "wrap-up-time":"0"
            }
         },
         "state":"1",
         "switchDBID":"101",
         "loginCode":"111"
      },
      {  
         "useOverride":"2",
         "tenantDBID":"1",
         "DBID":"263",
         "switchSpecificType":"1",
         "userProperties":{  
            "provisioning_flags":{  
               "modified_At":"4ac7b1ad-ac79-4f7b-a082-317ea79fc667"
            },
            "TServer":{  
               "wrap-up-time":"0"
            }
         },
         "state":"1",
         "switchDBID":"101",
         "loginCode":"123456789"
      }
   ]
}

Or you can get a specific object by a database ID. For example, let's get the CfgAgentLogin with a DBID of 261:

Request

GET http://198.51.100.10:8080/api/v2/platform/configuration/agent-logins/261

Response

{  
   "statusCode":0,
   "agent-login":{  
      "useOverride":"2",
      "tenantDBID":"1",
      "DBID":"261",
      "switchSpecificType":"1",
      "userProperties":{  
         "TServer":{  
            "wrap-up-time":"0"
         }
      },
      "state":"1",
      "switchDBID":"101",
      "loginCode":"111"
   }
}

You can specify the filters object_path and read_folder_dbid, which will cause the path

Comments or questions about this documentation? Contact us for support!