Updated on 2025-11-13 GMT+08:00

Generating Index Files of Agent Skill Change Details

Description

This interface is invoked to generate an index file of agent skill change details based on conditions. After a file is generated, the file name (agentOprSkillFileName) is sent to the callback URL carried by callBackURL in callback mode.

The callback of the URL specified by callBackURL requires authentication. For details, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication.

Usage Description

  • Prerequisites
    • The developer environment has been established and calls can be made properly. The developer has an independent server and the server has been bound to the callback URL (callBackURL).
    • accountId, agentId, and callId are optional parameters, which can be flexibly combined to generate CDRs and recording index files. If none of the three parameters is specified, the corresponding data records of the developer in the specified period are generated.
    • You have passed the authorization and obtained the access URL.
    • You have set aicc.ssl.trustAll in the CC-FS configuration file /home/ccfsapp/webapps/ccfsapp/WEB-INF/classes/config/servicecloud.base.properties to false and performed the following steps to place the certificate:
      1. Log in to the CC-FS server as an O&M user and switch to the root user.
        su - root
      2. Upload the third-party certificate that needs to be loaded by the callback URL for notifying the index file generated by the CC-FS to the same directory ($HOME/conf) as the truststore.jks certificate file of the AICC. The directory varies according to the actual environment.
      3. Change the owner group of the uploaded third-party certificate.
        chown ccfsapp:ccfsapp XXX.jks
      4. Import the third-party certificate to truststore.jks.
        keytool -import -alias xxx -file XXX.jks -keystore truststore.jks

        Enter the password of the truststore.jks certificate file as prompted.

      5. Delete the XXX.jks certificate from the environment.
      6. Restart the CC-FS.

        Go to the /home/ccfsapp/bin directory and run the following command:

        ./shutdown.sh;./startup.sh
  • Usage restrictions

    A developer can access only the data of the account. The developer account (appId) must correspond to the enterprise account (tenant space ID: accountId).

    The developer account (appId) is contained in the authentication string. For details, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication.

Interface Method

POST

URI

https://ip:port/CCFS/resource/ccfs/queryAgentSkillInfoData

Set IP address to the IP address of the server where the CC-FS is installed and Port number to the HTTPS port number of the CC-FS.

If the request is routed through the NSLB, set ip to the IP address of the NSLB server and port to the HTTPS port number of the CC-FS service mapped on the NSLB.

Request Description

Table 1 Parameters in the request message header

No.

Parameter

Value Type

Mandatory (Yes/No)

Default Value

Description

1

Content-Type

String

True

None

The value is fixed at application/json; charset=UTF-8.

2

Authorization

String

True

None

For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication.

Table 2 request parameters in the request body

No.

Parameter

Value Type

Mandatory (Yes/No)

Default Value

Description

1

version

String (1–32)

True

2.0

Protocol version. Currently, the value is fixed to 2.0.

Table 3 msgBody parameters in the request body

No.

Parameter

Value Type

Mandatory (Yes/No)

Default Value

Description

1

beginTime

String

True

None

Start time of an agent skill change, which is the time in the time zone where the tenant space is located. The interval between the start time and end time cannot exceed three days.

The time is in yyyy-MM-dd HH:mm:ss format.

2

endTime

String

True

None

End time of an agent skill change, which is the time in the time zone where the tenant space is located. The interval between the start time and end time cannot exceed three days. The time is in yyyy-MM-dd HH:mm:ss format.

3

accountId

String

False

None

Enterprise account (tenant space ID).

4

agentId

String

False

None

Agent ID.

5

callBackUrl

String

True

None

Callback URL. After generating a data record file, the platform returns fileName to the URL specified by this parameter.

Response description:

Types:

- Response received immediately after this interface is invoked

For details about the parameters in the response message, see Table 4.

Table 4 Parameters in the response message

No.

Parameter

Value Type

Description

1

resultCode

String

Result code returned.

2

resultDesc

String

Request result description.

3

resultData

Object

Response data. For details about the resultData parameter, see Table 5.

4

response

Object

Request result object. For details, see Table 6.

This field is reserved for compatibility with earlier versions and is not recommended.

Table 5 resultData parameter in the response

No.

Parameter

Value Type

Description

3.1

responseId

String

Unique ID generated after the interface is successfully invoked. It is a part of the file name.

Table 6 Parameters in the response message

No.

Parameter

Value Type

Description

4.1

version

String (1–32)

Protocol version, for example, 2.0.

4.2

resultCode

String(1-32)

Result code returned. For details, see Error Code Reference.

4.3

resultMsg

String

Request result description.

- Response to third-party callback after data record file generation

The response consists of request and msgBody. For details about the msgBody parameter, see Table 7.

request contains version (2.0 by default).

msgBody consists of responseId (part of the agent operation CDR file name), fileName (name of the ZIP package of agent operation CDRs to be downloaded), and accountId (tenant space ID).

Table 7 msgBody parameters in the callback response body

No.

Parameter

Value Type

Description

1

responseId

String

Unique ID generated after the interface is successfully invoked. It is a part of the file name.

2

fileName

String

Name of a CDR or recording index file. The value is in yyyyMMdd_{responseId}.zip format.

For example, if the date when this interface is invoked is 2018-07-02 and the obtained value of responseId is 9239cb50a8384bb0ab503441bf089446, the value of this parameter is 20180702_9239cb50a8384bb0ab503441bf089446.zip.

3

accountId

String

Enterprise account (tenant space ID). The enterprise account carried in the request parameter is used to associate the file name with an enterprise. If accountId is not set in the request parameter, this value is not returned.

If the callback fails (the CC-FS does not receive any success response from the callback URL or the response body is missing), the CC-FS retries at an interval of 10 minutes until the callback is successful or the number of retry times exceeds the upper limit.

Example

  • Request header
    POST /CCFS/resource/ccfs/ivr/deleteFile  HTTP/1.1
    Authorization: auth-v2/ak/2021-08-31T09:38:50.872Z/content-length;content-type;host/c12f0ed0******************941bdd106
    Accept: */*
    Content-Type: application/json;charset=UTF-8
    Content-Length: 193
  • Request parameters
    {
        "request": {
            "version": "2.0"
        },
        "msgBody": {
            "beginTime": "2018-06-29 10:42:49",
            "endTime": "2018-07-02 10:42:49",
            "accountId": "",
            "agentId": "",
            "callBackURL": "https://10.57.118.171:8000"
        }
    }
  • Response parameters
    {
        "resultData": null,
        "resultCode": "0",
        "resultDesc": "success"
    }