CIMPLICITY Configuration REST API
In This Topic
    Introduction to the REST API
    In This Topic
     Overview

    CIMPLICITY REST interfaces provide capabilities to access CIMPLICITY remotely through web interface(https), which allows us to build client applications on any OS, or browser based client applications using the hypermedia provided by CIMPLICITY.

    We provide following capabilities are supported from REST API:

    Configuration capabilities:

    • Points
    • Objects
    • Users
    • Roles
    • SQL connections
    • Historian connections

    Runtime capabilities:

    • Start/Stop project

    Security and Authentication

    Project API: All REST APIs where project is specified are referred as project APIs. We need to acquire sessionId to use these APIs

      Acquiring a session:

    To get the session id we need to use following REST API:

    URL: /cim-config/v1/projects/<PROJECTID>/session

    Headers:

    Authentication: basic auth. (use credentials of any user in the project)

    Response: JSON object

    {

        "inactivityTimeout"1200000,

        "privileges"-1,

        "refreshInterval"900000,

        "sessionId""LCXVttwj5hWX7T/bQpIEbROAq+ZjhUnJtx8oo1zsRaZp8NgN7KPCJCbRHKGVetgIYKt+SBua4uGsmFFlILs0tV0b5nNggPlzI9Nev5UyFKZ5ZwKoGiOS7YQbltOrBR3H/CZhtAeL7ZEQCQIndPbWcWEJVgiRnD57YKh/bITQRQ4wVpN+A8DLgTmtGpJk8b7Bj4FWY6RwtdskNNBLUAKgrgPSuQk58fwrxyfyiOCRorLVYZgbCETyQXit27z3xb7kEedcOa3TGLMz+i5ohob7AnqDHBq/tAWjzwuTHGLGRRZMKnqDJyqaQEYodGpUUF0N"

    }

    SessionId received is valid for 15 minutes by default.

    All project APIs use basic authentication with sessionId as payload.

    Example: If we want to create a point using /cim-config/v1/projects/<PROJECTID>/points, we need to add an authorization header as follows.

             Basic  LCXVttwj5hWX7T/bQpIEbROAq+ZjhUnJtx8oo1zsRaZp8NgN7KPCJCbRHKGVetgIYKt+SBua4uGsmFFlILs0tV0b5nNggPlzI9Nev5UyFKZ5ZwKoGiOS7YQbltOrBR3H/CZhtAeL7ZEQCQIndPbWcWEJVgiRnD57YKh/bITQRQ4wVpN+A8DLgTmtGpJk8b7Bj4FWY6RwtdskNNBLUAKgrgPSuQk58fwrxyfyiOCRorLVYZgbCETyQXit27z3xb7kEedcOa3TGLMz+i5ohob7AnqDHBq/tAWjzwuTHGLGRRZMKnqDJyqaQEYodGpUUF0N 

     

                Refresh a session:

    As the sessionId is valid only for 15 minutes, we need to refresh token before it expires using refreshsession API

    url: /cim-config/v1/projects/<PROJECTID>/refeshsession

    Headers:

    Authentication: Use basic authentication with sessionId as a payload (same as the project API authentication).

    On a viewer machine you must install the SSL certificate for secure communication. For more information, refer Install SSL Certificate on a Viewer topic in the Scada Web Configuration section of Getting Started.

    Computer APIs:

    Following APIs are computer APIs and use basic authentication. These APIs can be used to work with multiple projects on a computer.

    cim-config/v1/user-config

    cim-config/v1/rest-settings

    We need to create a computer user for working with above APIs. We can create a computer user with command line utility RegisterComputerUser.exe, by default we do not create a computer user. Computer user credentials can be used to fill details in Basic Authentication Header.

    REST APIs:

    Following APIs are supported:

    CIMPLICITY REST API Web Service