KSC Open API
Kaspersky Security Center API description
Kaspersky Security Center Open API

The Kaspersky Security Center Open API (hereinafter referred to as KSC Open API) is an HTTP interface for managing Administration Server.

See also:

Protocol description

Each message is transmitted over HTTP in the JSON format. Messages are divided into requests and responses. The client application sends the server requests and receives responses. The connection to the server is established, and the client does not close it during the entire session with the server. Each connection supports only synchronous calls, that is, the client cannot send a request to the server until it has received a response from the previous request over the same connection.

Connection attributes

  1. Connection port: 13299
  2. Supported SSL methods: TLS 1.0, TLS 1.1, TLS 1.2
  3. SSL authentication: One-way
  4. Supported client authentication methods: Basic, KSC-Token, WebToken

Request

Each request contains the name and arguments of the KSC method. To make a request, the client uses the HTTP POST method.

  1. The KSC method is specified in the HTTP request in the following format:
    POST /api/v1.0/Instance.Class.MethodName HTTP/1.1
    or
    POST /api/v1.0/Class.MethodName HTTP/1.1
    where:
    • Instance - The requested instance. The instance can be omitted along with period for the default instance.
    • Class - The KSC interface class name.
    • MethodName - The KSC method name. Note that the instance, class name, and method name are case-sensitive.
  2. The following HTTP headers are used in the request:
    • X-KSC-RequestId - For more information, see Request tracing.
    • Content-Type - If the header is present, its value MUST be "application/json". If the header is not present, it means the type is "application/json".
    • Content-Length - If the header is not present, the Transfer-Encoding header with the value "chunked" must be used instead.
    • Transfer-Encoding - If the header is present, the value must be "chunked".
    • Accept-Encoding - Can contain the "gzip" or "deflate" value, in which case the answer will come from the server compressed by the corresponding algorithm. If the header is missing, the server does not use compression when sending a response.
    • Content-Encoding - Can contain the "gzip" or "deflate" value.

      Example of the HTTP headers:
                  POST /api/v1.0/TestInterface.ScMethod1 HTTP/1.1
                  Content-Type: application/json
                  Content-Length: 56
                  Accept-Encoding: gzip, deflate
      
  3. The HTTP request body must contain a JSON object. The JSON object contains the input parameters of the KSC method and values of these parameters. The names and types of the input parameters are defined by the method specification. Output parameters should not be set in a request. If the request size is greater than the configured limit, then the request will be rejected with the error 413 "Request Entity Too Large". If this error is received, it means that an API call that requires chunked access has been used incorrectly. If the method has no input parameters, the request must contain an empty JSON object '{}'.

    Examples of the JSON objects:
                {
                    "arg1":"value1"
                }
    
                {
                    "arg1":"value2",
                    "arg2":43
                }
    
                {
    
                }
    

Response

Administration Server (hereinafter also referred to as KSC server) sends an HTTP response with the body that contains results in the JSON format.

  1. Possible status codes the server may return:
    • 200 OK - The server returnes the request result.
    • 400 Bad Request - Request format is incorrect.
    • 401 Unauthorized - Authentication is required, the authentication information is not valid, or the authentication method is not supported.
    • 403 Forbidden - The requested KSC method is not permitted by security rules.
    • 413 Request Entity Too Large - The request body or headers are too big and have been rejected by the server.
    • 404 Not Found - The requested KSC method is not implemented.
    • 405 Method Not Allowed - The HTTP method is not supported.
    • 500 Internal Server Error - An internal error has occurred and the server cannot generate a response to the request.
    • 503 Service Unavailable - The request cannot be processed at this time, because the server is busy or is initializing/de-initializing.
  2. The HTTP headers that are used in the server response:
    • Content-Type - If the returned status code is 200, then the HTTP header contains the value "application/json". If any other code contains the "text/html" value, the response body contains the error description.
    • Content-Length - The response body length. If the length is not specified, the server sets the field "Transfer-Encoding" to "chunked".
    • Transfer-Encoding - If present, contains the value "chunked".
    • Content-Encoding - If the request contains the Accept-Encoding header, the server can use the "gzip" or "deflate" compression.
      In some cases the server can contain the error details in the headers (see also Some error definitions):
    • X-KSC-ErrorId - Error code.
    • X-KSC-ErrorModule - Error module.
    • X-KSC-ErrorMsg - Error message.
    • X-KSC-ErrorLocFMtId - Error localisation format code.
      This is not a complete list of the HTTP headers. The server can send additional headers that do not contradict this document.
  3. The HTTP response body.
    If the server returns the status code 200, the Content-Type header will contain the "application/json" value and the HTTP request will contain the JSON object in the body. The JSON object can contain the method result and output parameters, or an error description. If the server returns a status code other than 200, the answer may contain the body. At the same time, the Content-Type header will contain the "text/html" value and the body will contain unformatted text of the error description.
    • The JSON object with the Result.
      If the requested method has processed successfully, the JSON object can contain the following data:
      1. PxgRetVal - The field that contains the result of the requested method, i.e. the "return" value. The field type is determined by method specification. If the method does not have the "return" value, this field will be skipped.
      2. Output variables in the "name":"value" format. The type and name of the output variables is determined by method specification. If the method does not have output parameters, output variables will be skipped.
      3. If the result and output variables are missing, the response will contain an empty JSON object '{}'.

        Examples of the JSON objects:
                    {
                        "PxgRetVal": 15,
                        "OutVar1": "value1",
                        "OutVar2": "value2"
                    }
        
                    {
                        "PxgRetVal": "abc"
                    }
        
                    {
        
                    }
        
    • The JSON object with the Error.
      Instead of the return or output values, the JSON object can contain the error description in the PxgError field , as shown below (see also Some error definitions):
                  PxgError (params) Container with error description
                  +---code (paramInt) Error code
                  +---subcode (paramInt) Error subcode (since Kaspersky Security Center version 12.2)
                  +---module (paramString) Binary module name
                  +---file (paramString) Source file name
                  +---line (paramInt) Line number where exception occurs
                  +---message (paramString) Not localized error message
                  +---locdata (paramParams) Container which contains localized information about error, optional
                      +---format-id (paramInt) Localization format string id
                      +---format (paramString) Localization format string, may contain templates: %1, %2 ...
                      +---locmodule (paramString) Localized module name
                      +---args (paramArray) Array of strings with type paramString which contains values to templates from format field
                  

Examples of the JSON objects:

            {
                "PxgError":
                {
                    "code": 1681,
                    "module": "KLFT",
                    "file": "kca/ft/filetransferimp.cpp",
                    "line": 1234,
                    "message": "File not found. File name - 'JobId-5771bdab-dfdd-4e6a-ad52-536ef095813f'."
                }
            }

Python Lib for the KLOAPI protocol

The KlAkOAPI Python package offers high-level implementation of the client-side KLOAPI protocol in Python. Calls to Administration Server are performed as calls for methods of the provided classes, by using the KlAkOAPI Python package. Some Python samples are described below.

The KLOAPI types

  1. Types for the method parameters, return values, output parameters, and error descriptions:
    KLOAPI typeJSON presentationDescriptionValue format
    int JSON number/nullSigned 32-bit integerAs is, for example: 1234.
    unsignedInt JSON number/nullUnsigned 32-bit integerAs is, for example: 1234.
    long JSON number/nullSigned 64-bit integerAs is, for example: 1234.
    unsignedLong JSON number/nullUnsigned 64-bit integerAs is, for example: 1234.
    wstring JSON string/nullWide character stringString encoded by UTF-8. Double quotes contained in the string must be escaped by the backslash. For example: "Some text with \"double quotes\" must be like this."
    boolean JSON boolean/nullBoolean typePossible values: true or false.
    datetime JSON string/nullTime in UTCString in the "YYYY-MM-DDTHH:MM:SSZ" format. For example:"2016-09-19T15:22:35Z".
    double JSON number/nullReal number with double precisionAs is, for example: 1.23.
    float JSON number/nullReal numberAs is, for example: 1.23.
    binary JSON string/nullBinary dataData must be encoded in base64 and represented as string. For example:"c29tZXRleHQ=".
    array JSON array/nullOrdered collection of different types of valuesCan contain elements of the following types: null, paramString, paramBool, paramInt, paramLong, paramDateTime, paramDate, paramBinary, paramFloat, paramDouble, paramArray, paramParams. For example: [{"type": "date", "value": "2016-09-19"}, {"type": "datetime", "value": "2016-09-19T15:22:35Z"}].
    params JSON object/nullUniversal containerEach item of container contains a "name":"value" pair, where "value" can be one of the following types: paramString, paramBool, paramInt, paramLong, paramDateTime, paramDate, paramBinary, paramFloat, paramDouble, paramArray, paramParams. For example: {"var1": 23, "var2": "str12", "var3": {"type": "date", "value": "2016-09-19"}}.
    Note:
    If the container is used inside another container, you should use the "paramParams" type. See the "ParamParams" type description in the table number 2.

  2. Types used inside the params container.
    NOTE: Types described below can not be set to null. In the params container, use strong typing.
    KLOAPI typeJSON presentationDescriptionValue format
    paramString JSON stringWide character stringstring encoded by UTF-8. Double quotes contained in the string must be escaped by backslash, for example: "Some text with \"double quotes\" must be like this."
    paramBool JSON booleanBoolean typePossible values: true or false.
    paramInt JSON numberSigned 32-bit integerAs is, for example: 1234.
    paramLong JSON objectSigned 64-bit integerContains two fields: the field "type" with a value of "long" and the field "value" with a value represented as signed 64-bit integer. For example: {"type": "long", "value": 13}.
    paramDateTime JSON objectTime in UTCContains two fields: the field "type" with a value of "datetime" and the field "value" with a value represented as a string in the format "YYYY-MM-DDTHH:MM:SSZ". For example: {"type": "datetime", "value": "2016-09-19T15:22:35Z"}.
    paramDate JSON objectDate in format "YYYY-MM-DD"Contains two fields: the field "type" with a value of "date" and the field "value" with a value represented as a string in the format "YYYY-MM-DD". For example: {"type": "date", "value": "2016-09-19"}.
    paramBinary JSON objectBinary dataContains two fields: the field "type" with a value of "binary" and the field "value" with a value represented as a string with base64 encoded binary data. For example: {"type": "binary", "value": "c29tZXRleHQ="}.
    paramFloat JSON objectReal numberContains two fields: the field "type" with a value of "float" and the field "value" with a value represented as a real number. For example: {"type": "float", "value": 1.23}.
    paramDouble JSON objectReal number with double precisionContains two fields: the field "type" with a value of "double" and the field "value" with a value represented as a real number with double precision. For example: {"type": "double", "value": 1.23}.
    paramArray JSON arrayOrdered collection of different types of valuesMay contains elements of the following types: null, paramString, paramBool, paramInt, paramLong, paramDateTime, paramDate, paramBinary, paramFloat, paramDouble, paramArray, paramParams. Example:[{"type": "date", "value": "2016-09-19"}, {"type": "datetime", "value": "2016-09-19T15:22:35Z"}].
    paramParams JSON objectUniversal containerContains two fields: the field "type" with a value of "params" and the field "value" with a value represented as container (or null if container is empty) with pairs of "name":"value", where "value" can be one of the following types: paramString, paramBool, paramInt, paramLong, paramDateTime, paramDate, paramBinary, paramFloat, paramDouble, paramArray, paramParams. For example: {"type": "params", "value": {"var1": 23, "var2": "str12", "var3": {"type": "date", "value": "2016-09-19"}}}.
    Note:
    Make sure that the container is not a method parameter. Otherwise, see the description for the type "params" in the table number 1

Client authentication

A client may choose one of two ways for authentication: either authenticate a TCP connection, and all requests made on this connection will be authenticated, or create an authenticated session and provide a session ID with each call. These methods may not be used simultaneously on the same TCP connection.

Authenticated connection

To authenticate a connection, a client should use the "login" method as the first call on the connection. The authentication information is sent in the HTTP "Authorization" header, in the format described in RFC2617, RFC2616, RFC2047.
Name of the virtual server is sent as a UTF-8 string encoded by Base64 in the header "X-KSC-VServer".
Method "login" doesn't have any input parameters, so the request body must contain an empty JSON object '{}'.
Typical responses are:

  • 200: Authentication successful. After this response all subsequent calls on this TCP connection are considered authenticated.
  • 401: Authorization header is not provided or invalid.
  • 403: Invalid credentials or access is forbidden. The server closes the connection after sending this response.

Authenticated session

To create a session, the client must call the method Session.StartSession. The authentication information, as with the "login" method, is provided in the Authorization header.
The name of the virtual server is sent as a UTF-8 string encoded by Base64, in the X-KSC-VServer header.
If the authentication was successful, the server replies with the 200 status code and provides a session ID in the response. For example:

        POST /api/v1.0/Session.StartSession HTTP/1.1
        Accept-Encoding: gzip, deflate
        Authorization: KSCBasic user="0LvQvtCz0LjQvQ==", pass="0L/QsNGA0L7Qu9GM", internal="0"
        Content-Type: application/json
        Content-Length: 2

        {}

        HTTP/1.1 200 OK
        Transfer-Encoding: chunked
        Content-Length: 41

        {"PxgRetVal":"n4QFPNjYK2oXRMYkis5CMcg=="}


Typical responses are:

  • 200: See the JSON response, to check for an exception. If the authentication is successful, this method returns the session ID as the return value.
  • 401: The authorization header is not provided or it is invalid.
  • 403: Invalid credentials or access if forbidden.

    All subsequent calls after a successful authentication must include the X-KSC-Session header with a value returned by the StartSession method. For example:
            POST /api/v1.0/HostGroup.GetStaticInfo HTTP/1.1
            Content-Type: application/json
            Transfer-Encoding: chunked
            X-KSC-Session: n4QFPNjYK2oXRMYkis5CMcg==
            Content-Length: 16
    
            {"pValues":null}
    


An authenticated session ID is not bound to any TCP connection, and calls within an opened session may be done on any connection, with the exception that gateway calls may not overlap.
Client must call the Session.EndSession method to close an authenticated session.
Sessions have a limited lifetime, and may expire after several hours of timeout or several minutes of inactive timeout.

See also:
Session.StartSession
Session.EndSession

Supported authentication methods

The following authentication methods are supported:

  1. Basic authentication.
    For Basic authentication, use the "Authorization" header with the non-standard "KSCBasic" scheme in the following format:
    KSCBasic user = "login-str", pass = "pass-str", domain = "domain-str", internal = "internal_flag"
    where:
    • "login-str" is a user name (UTF-8 string encoded by Base64).
    • "pass-str" is a password (UTF-8 string encoded by Base64).
    • "domain-str" is a domain name of a Windows-based user account. If the user is internal, this parameter should not be set (UTF-8 string encoded by Base64, optional).
    • "internal_flag" contains "1" if user is internal or "0" if not.

    Basic authentication request example:
            POST /api/v1.0/login HTTP/1.1
            Authorization: KSCBasic user="0LvQvtCz0LjQvQ==", pass="0L/QsNGA0L7Qu9GM", internal="0"
            Content-Type: application/json
            X-KSC-VServer: 0LLQuNGA0YLRgdC10YDQstC1MQ==
            Content-Length: 2
            {}
    
    With the KlAkOAPI Python package Administration Server can be connected with basic authentication as follows:
            # main server connection:
            server_main = KlAkOAPI.AdmServer.KlAkAdmServer.Create('https://ksc.example.com', 'username', 'password', verify = False)
            # virtual server connection:
            server_vs1 = KlAkOAPI.AdmServer.KlAkAdmServer.Create('https://ksc.example.com', 'username', 'password', verify = False, vserver = 'vs1')
            
  2. Integrated authentication.
    For integrated authentication use the "Authorization" header with one of the standard schemes "Negotiate", "Kerberos", "NTLM" in the following format:
    <scheme> <auth-data>
    <auth-data> - base64-encoded authentication string, specific to the chosen authentication scheme.
    Authentication string can be obtained by using SSPI/GSSAPI libraries.
    Integrated authentication is a multi-step operation. If an additional authentication round is required, the server will reply with the 401 status code and the 'WWW-Authenticate' header with non-empty authentication data. The client should continue the authentication process until the server replies with the 200 status or with an error.

    NTLM authentication process example:
        POST /api/v1.0/login HTTP/1.1
        Authorization: NTLM TlRM....
        Content-Length: 0
    
    
        HTTP/1.1 401 Unauthorized
        Content-Length: 27
        Content-Type: text/plain
        WWW-Authenticate: NTLM TlRM....
    
        Authentication not finished
    
    
        POST /api/v1.0/login HTTP/1.1
        Authorization: NTLM TlRM....
        Content-Length: 0
    
    
        HTTP/1.1 200 OK
        Content-Length: 0
    
    SPNEGO (combined Kerberos/NTLM) authentication process example:
            POST /api/v1.0/login HTTP/1.1
            Authorization: Negotiate YY.....
            Content-Length: 0
    
    
            HTTP/1.1 200 OK
            Content-Length: 27
            Content-Type: text/plain
    
    Integration authentication is supported by Administration Server on Windows since Kaspersky Security Center 13. If the caller wants to know beforehand whether the server supports integrated authentication, the caller may send any unauthorized request and analyze the 'WWW-Authenticate' headers in the 401 response. Such a request is not a required part of the authentication process. The same response will be returned, for example, when a caller uses an unsupported authentication mechanism. For example:
            POST /api/v1.0/gssprobe HTTP/1.1
            Content-Length: 0
    
            HTTP/1.1 401 Unauthorized
            Content-Length: 23
            Content-Type: text/plain
            WWW-Authenticate: Negotiate
            WWW-Authenticate: NTLM
            WWW-Authenticate: KSCBasic
    
            Authentication required
    
  3. Second-factor authentication.
    This is not a separate method of authentication, but may appear as an additional authentication step after successful Basic/integrated authentication.
    For more information, see Two-factor authentication.
            POST /api/v1.0/login HTTP/1.1
            Authorization: KSCMFA totp="499754"
            Content-Length: 0
    
  4. KSC Token authentication.
    The authentication scheme "KSCT" is designed to be a replacement for the KSC basic authentication when it's required to grant an application temporary access to KSC without exposing credentials. The authentication token used in this scheme may be provided by KSC interfaces. Token lifetime and access rights provided to token holder are defined by the interface provided a token. Format:
    KSCT <token>

    KSCT request example:
            POST /api/v1.0/login HTTP/1.1
            Authorization: KSCT bHNsZmlIU0pTRkxsc2xzbGRm
            Content-Type: application/json
            Content-Length: 2
            {}
    
    With the KlAkOAPI Python package Administration Server can be connected with token authentication as follows:
    See also:
    Session.CreateToken
  5. Authentication by using WebToken.
    The non-standard scheme "KSCWT" used in HTTP "Authorization" header. Format:
    KSCWT <token>
    where:
    • <token> is an authentication token obtained from the Kaspersky UIS.

    WebToken request example:
            POST /api/v1.0/login HTTP/1.1
            Authorization: KSCWT ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBaQ0k2SWpFeU16UTFOamM0T1RBaWZRLlRuMEdhSEtoQVpaQjlZM2Zad1A0UURHLXl2alVYTXgzZHpBYkxLakNYOU0=
            Content-Type: application/json
            Content-Length: 2
            {}
    
  6. Authentication through Kaspersky Security Center Web Console (hereinafter also referred to as NWC console).
    The non-standard scheme "KSCNT" used in the HTTP "Authorization" header. Format:
    KSCNT <token>
    where:
    • <token> is an authentication token obtained from NWC console. This is non-encrypted and non-signed (clear) JSON.

    Clear JSON format of the KSCNT explanation:
    • "WorkspaceId" - For trial instances of KSC, it is the identifier of the workspace; and for commercial instances it is the instance identifier. This field is mandatory.
    • "AuthType" - Authorization type. Should be equal to "AdfsAuthCode" for this type of token. This field is mandatory.
    • "AdfsAuthCode" - Authorization code. This field is mandatory for all auth types. Should be equal to "AdfsAuthCode".
    • "AdfsClientId" - Client ID from the original ADFS login URL. This field is mandatory for all auth types. Should be equal to "AdfsAuthCode".
    • "AdfsIssuer" - Issuer URI, i.e. URI-address of ADFS server, by which the token was issued. This field is mandatory for all auth types. Should be equal to "AdfsAuthCode".
    • "UserSessionId" - NWC user session identifier. This field is mandatory.
    • "UserSessionState" - CSRF-token. This field is mandatory.


Example:

        KSCNT {"AuthType": "AdfsAuthCode", "AdfsAuthCode": "AwABAAAAvPM1KaPlrEqdFSBzjqfTGBCmLdgfSTLEMPGYuNHSUYBrq", "AdfsClientId": "Client Id", "WorkspaceId": "hostedinst_0207132feccc4cba834d76518cdc5005", "UserSessionId": "4adee13b-0b25-4956-b74e-57fbd6baef24", "UserSessionState": "076D0A24AE082858740E13FE1E5F7BA5", "AdfsIssuer": "http://localhost:63076/adfs"}


KSCNT auth request example:

        POST /api/v1.0/login HTTP/1.1
        Authorization: KSCNT ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBaQ0k2SWpFeU16UTFOamM0T1RBaWZRLlRuMEdhSEtoQVpaQjlZM2Zad1A0UURHLXl2alVYTXgzZHpBYkxLakNYOU0=
        Content-Type: application/json
        Content-Length: 2
        {}

  1. Gateway authentication.
    This is a special type of authentication used to create gateway connections, see Creating gateway connections. Format:
    KSCGW <key>
    where:
    • <key> is one-time authentication key

    KSCGW request example:
            POST /api/v1.0/login HTTP/1.1
            Authorization: KSCGW YmpMYmI4cEFkTktlQ3NLcmpueUcwMA==
            Content-Type: application/json
            Content-Length: 2
            {}
    

Possible authentication errors


Typical error codes are:

  • KLSTD::STDE_NOACCESS
  • KLSPL::SPLERR_ACCOUNT_BLOCKED
  • KLSPL::SPLERR_USER_OR_PASSWORD_INVALID
  • KLSPL::SPLERR_VSERVER_NOT_FOUND
  • KLSPL::SPLERR_VSERVER_NOT_DEFINED
  • KLWAT::ERR_NO_SUCH_CLIENT
  • KLWAT::ERR_LOGON_IFAILED
  • KLWAT::ERR_BA_WEB_TOKEN_FAILED
  • KLWAT::ERR_HANDSHAKE_ALREADY_COMPLETED
  • KLWAT::ERR_BA_NWC_TOKEN_FAILED
  • KLWAT::ERR_LOGON_ADFS_FAILED
    see Some error definitions.

Files download

Files download is performed by using the HTTP GET and HEAD methods.

GET /RESOURCE_PREFIX/path/file HTTP/1.1

See Some typical values for RESOURCE_PREFIX


A download may be performed on the same connection where POST methods are called.
Authentication should be performed prior to starting files download.
Analyzed request headers:

  • Range
  • Accept-Encoding

Sent response headers that must be analyzed:

  • Status code. Success codes are:
    • 200 - Requested file returned.
    • 206 - Some file chunk returned, analyze 'Content-Range' header.
  • Content-Range. Represents returned range and total file length. The returned range may differ from the requested range.
  • Transfer-Encoding. May be absent or have the value "chunked".
  • Content-Encoding. Represents the compression type used.

File download request example:

        GET /PRFX/Some/test/file HTTP/1.1
        Accept-Encoding: identity
        Range: bytes=0-99

Response example:

        HTTP/1.1 206 Partial Content
        Content-Length: 3
        Content-Range: bytes=0-2/1024
        Content-Type: application/octet-stream

        XYZ

In the KlAkOAPI Python package details of the implementation are hidden in a high-level method DownloadFile. For example:

        server = KlAkOAPI.AdmServer.KlAkAdmServer.Create(...)
        ...
        server.DownloadFile('/FTSF/klsctunnel', './klsctunnel.exe')
        

Files upload

Files upload is performed by using the HTTP PUT method.

PUT /RESOURCE_PREFIX/path/file HTTP/1.1

See Some typical values for RESOURCE_PREFIX


Upload may be performed on the same connection where the POST methods are called.
Authentication should be performed prior to starting files upload.
In order to upload a file, the client should prepare a request and send only request headers, including the 'Expect: 100-continue' header. The client must NOT send the request body until receiving the response from the server. The server will analyze headers and decide if it is ready to accept the file. After the checks are completed, the server can send the final response containing an error or success status code. In this case, the client must NOT send the request body. Otherwise, if the server decides to accept the file, it sends the intermediate response with the '100 Continue' status code. After receiving such code, the client must send the request body. After receiving the request body, the server will respond with the final response. If any error occurs during file upload, the server will respond with the non-2xx status code or will close the connection.
Analyzed request headers:

  • Expect. This is a mandatory header, must have the '100-continue' value.
  • Content-Range. The client should upload files by chunks the size of which should not exceed 1MB. By using that, it's possible to continue upload if the connection breaks or if the server is busy processing a particular request. The client can make other calls, for example, the POST methods between making the PUT requests. The client should specify the full uploading file size in every uploading request, for example 'Content-Range: bytes 0-1048575/1234567890'.
  • Sha256. Optional header containing the SHA256 hash of uploading file (not chunk). If this value is provided and uploading file is already exists on the server, the server may respond with the '201 Created' code without expecting a request body.
  • Transfer-Encoding. Optional, 'chunked' encoding is supported
  • Content-Encoding. Optional, request compression is supported.

Sent response headers which are required to be analyzed:

  • Status code.
    • 100 - continue with sending a request body.
    • 201 - file (chunk) is successfully uploaded or already exists and chunk uploading is not required.
    • 413 - Server was unable to process request, as it did not fit to configured size limit. Repeat request with shorter range. This error leads to connection close, so reconnect is required between.
    • 503 - Server is busy, repeat request later.

File upload request example. Step 1 - client sends headers without body

            PUT /FTUR/1b20a383-9ae7-49e3-b0ad-1e5edfe5926d HTTP/1.1
            Content-Length: 5
            Content-Range: 0-4/20
            Expect: 100-continue

Step 2 - server sends intermediate response

            HTTP/1.1 100 Continue

Step 3 - client sends request body.

            ABCDE

Step 4 - server sends final response

            HTTP/1.1 201 Created
            Content-Length: 0

In KlAkOAPI Python package details of implementation are hidden in high-level method UploadFile:

        server = KlAkOAPI.AdmServer.KlAkAdmServer.CreateGateway('https://ksc.example.com', token_to_nagent, verify = False)
        ...
        upload_url = KlAkOAPI.NagRdu.KlAkNagRdu(server).GetUrlToUploadFileToHost().RetVal()
        server.UploadFile(upload_url, full_archive_filename)
        

Backward compatibility

The following rules are accepted for the backward compatibility:

  1. Allowed to add new methods: if client tries to request method which is not implemented in particular version of KSC server, the server will return HTTP error code 404.
  2. Different versions of the KSC server may have a different set of parameters and their types in accordance with the following rules:
    • Allowed to add new parameters. No problem if client tries to send parameters not implemented in particular version of KSC server, such parameters will be ignored by the server. Same behavior may be implemented to client application, i.e. client may ignore unexpected parameters posted by server in response. And no problem if client doesn't send some parameters which expected by new version of KSC server, the server will assign default values to missed parameters. Also same behavior may be implemented to client application too. Table of default values are presented below:
      KLOAPI typeDefault value
      int 0
      unsignedInt 0
      long 0
      unsignedLong 0
      wstring ""
      boolean false
      datetime null
      date null
      double 0.0
      float 0.0
      binary null
      array null
      params null
    • Not allowed to change name of parameters.
    • Not allowed to change type of parameters.
    • Not allowed to change type of return values.

Request tracing

You must send the "X-KSC-RequestId" attribute in the HTTP header in every request to support request tracing. This attribute contains two UID-strings devided by the '_' symbol. The first UID is called "trace_id" and corresponds to the thread from which the request is invoked. The second one is called "span_id" and must be unique for each request. Each UID is a HEX UPPERCASE string containig 8 bytes. Example: X-KSC-RequestId: 39C49236A51C334C_86659DDD6960D6E2

Samples

Method login - Request:

    POST /api/v1.0/login HTTP/1.1
    Authorization: KSCBasic user="S0xTUlZPQVBJXzIxYWRkY2FiLTNlYjgtNDQ1Ni05Yjc3LTFiYWRkYzg4NWMxNQ==", pass="QXM1JExpNiFGaDF8RmU2Xw==", internal="0"
    X-KSC-RequestId: 39C49236A51C334C_86659DDD6960D6E2
    Content-Length: 2
    Content-Type: application/json

    {}

Method login - Response:

    HTTP/1.1 200 OK
    Content-Length: 2
    Content-Type: application/json

    {}

Method TestApi.TestMethod0 - Request:

    POST /api/v1.0/KlsrvoapiTestApi.TestMethod0 HTTP/1.1
    X-KSC-RequestId: 39C49236A51C334C_98969A4853053FEC
    Content-Length: 15
    Content-Type: application/json

    {"arg1":102030}

Method TestApi.TestMethod0 - Response:

    HTTP/1.1 200 OK
    Content-Length: 20
    Content-Type: application/json

    {"PxgRetVal":123456}

Method TestApi.TestMethod1 - Request:

    POST /api/v1.0/KlsrvoapiTestApi.TestMethod1 HTTP/1.1
    X-KSC-RequestId: 39C49236A51C334C_AE60F2F5161FD22F
    Content-Length: 79
    Content-Type: application/json

    {"Par1":{"var1":23,"var2":"str12","var3":{"type":"date","value":"2016-09-19"}}}

Method TestApi.TestMethod1 - Response:

    HTTP/1.1 200 OK
    Content-Length: 103
    Content-Type: application/json

    {"ResArray":[{"type":"date","value": "2016-09-19"},{"type":"datetime","value":"2016-09-19T15:22:35Z"}]}

Method TestApi.TestError - Request:

    POST /api/v1.0/TestApi.TestError HTTP/1.1
    X-KSC-RequestId: 39C49236A51C334C_B382CB21DB5A1605
    Content-Length: 2
    Content-Type: application/json

    {}

Method TestApi.TestError - Response:

    HTTP/1.1 200 OK
    Content-Length: 137
    Content-Type: application/json

    {"PxgError":{"code":1199,"file":".\\klsrvoapi_test\\klsrvoapi_test_impl.cpp","line":314,"message":"Operation canceled","module":"KLSTD"}}

Method SrvView.ResetIterator - Request:

    POST /api/v1.0/SrvView.ResetIterator HTTP/1.1
    X-KSC-RequestId: 39C49236A51C334C_AEF632ED183A4372
    Content-Type: application/json
    Transfer-Encoding: chunked

    b8
    {"wstrViewName":"UmdmDevices","wstrFilter":"(&(Dev_Model=\"*\"))","vecFieldsToReturn":["Dev_Id","Dev_ProtocolId","Dev_Model"],"vecFieldsToOrder":null,"pParams":null,"lifetimeSec":7200}
    0

Method SrvView.ResetIterator - Response:

    HTTP/1.1 200 OK
    Transfer-Encoding: chunked

    2b
    {"wstrIteratorId":"adevrrPQ9BKk9XI4amr0k3"}
    0

Method SrvView.GetRecordCount - Request:

    POST /api/v1.0/SrvView.GetRecordCount HTTP/1.1
    X-KSC-RequestId: 39C49236A51C334C_BCF89A84E34BDD9F
    Content-Type: application/json
    Transfer-Encoding: chunked

    2b
    {"wstrIteratorId":"adevrrPQ9BKk9XI4amr0k3"}
    0

Method "SrvView.GetRecordCount" - Response:

    HTTP/1.1 200 OK
    Transfer-Encoding: chunked

    11
    {"PxgRetVal":177}
    0

Method SrvView.GetRecordRange - Request:

    POST /api/v1.0/SrvView.GetRecordRange HTTP/1.1
    X-KSC-RequestId: 39C49236A51C334C_83E4966196918669
    Content-Type: application/json
    Transfer-Encoding: chunked

    41
    {"wstrIteratorId":"adevrrPQ9BKk9XI4amr0k3","nStart":0,"nEnd":177}
    0

Method SrvView.GetRecordRange - Response:

    HTTP/1.1 200 OK
    Transfer-Encoding: chunked

    1000
    {"pRecords":{"KLCSP_ITERATOR_ARRAY":[{"type":"params","value":{"Dev_Id":1,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":2,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":3,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":4,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":5,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":6,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":7,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":8,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":9,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":10,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":11,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":12,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":13,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":14,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":15,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":16,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":17,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":18,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":19,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":20,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":21,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":22,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":23,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":24,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":25,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":26,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":27,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":28,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":29,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":30,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":31,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":32,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":33,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":34,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":35,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":36,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":37,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":38,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":39,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":40,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":41,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":42,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":43,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":44,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":45,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":46,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":47,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":48,"Dev_Model":"ActiveSync Device","Dev_Prot
    1000
    ocolId":4}},{"type":"params","value":{"Dev_Id":49,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":50,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":51,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":52,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":53,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":54,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":55,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":56,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":57,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":58,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":59,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":60,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":61,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":62,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":63,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":64,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":65,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":66,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":67,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":68,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":69,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":70,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":71,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":72,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":73,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":74,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":75,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":76,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":77,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":78,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":79,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":80,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":81,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":82,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":83,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":84,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":85,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":86,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":87,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":88,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":89,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":90,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":91,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":92,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":93,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":94,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":95,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":96,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"ty
    1000
    pe":"params","value":{"Dev_Id":97,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":98,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":99,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":100,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":101,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":102,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":103,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":104,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":105,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":106,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":107,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":108,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":109,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":110,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":111,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":112,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":113,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":114,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":115,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":116,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":117,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":118,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":119,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":120,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":121,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":122,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":123,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":124,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":125,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":126,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":127,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":128,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":129,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":130,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":131,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":132,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":133,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":134,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":135,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":136,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":137,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":138,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":139,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":140,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":141,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":142,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":143,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":144,"Dev_Model":"ActiveSync Devi
    b31
    ce","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":145,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":146,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":147,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":148,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":149,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":150,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":151,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":152,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":153,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":154,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":155,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":156,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":157,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":158,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":159,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":160,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":161,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":162,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":163,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":164,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":165,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":166,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":167,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":168,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":169,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":170,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":171,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":172,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":173,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":174,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}},{"type":"params","value":{"Dev_Id":175,"Dev_Model":"iPhone","Dev_ProtocolId":1}},{"type":"params","value":{"Dev_Id":176,"Dev_Model":"KES Device","Dev_ProtocolId":2}},{"type":"params","value":{"Dev_Id":177,"Dev_Model":"ActiveSync Device","Dev_ProtocolId":4}}]}}
    0

Method SrvView.ReleaseIterator - Request:

    POST /api/v1.0/SrvView.ReleaseIterator HTTP/1.1
    X-KSC-RequestId: 39C49236A51C334C_BA0363FD42D63DB2
    Content-Type: application/json
    Transfer-Encoding: chunked

    2b
    {"wstrIteratorId":"adevrrPQ9BKk9XI4amr0k3"}
    0

Method SrvView.ReleaseIterator - Response:

    HTTP/1.1 200 OK
    Transfer-Encoding: chunked

    2
    {}
    0