Tchater maintenant avec le support
Tchattez avec un ingénieur du support

One Identity Safeguard for Privileged Sessions 6.0.2 - REST API Reference Guide

Introduction Using the SPS REST API Basic settings User management and access control Managing SPS General connection settings HTTP connections Citrix ICA connections RDP connections SSH connections Telnet connections VNC connections Search, download, and index sessions Reporting Health and maintenance Advanced authentication and authorization Completing the Welcome Wizard using REST Enable and configure analytics using REST

Connection statistics subchapters

List of the reporting subchapters created from connection statistics.

URL
GET https://<IP-address-of-SPS>/api/configuration/reporting/statistics_subchapters
Cookies
Cookie name Description Required Values
session_id Contains the authentication token of the user Required

The value of the session ID cookie received from the REST server in the authentication response, for example, a1f71d030e657634730b9e887cb59a5e56162860. For details on authentication, see Authenticate to the SPS REST API.

Note that this session ID refers to the connection between the REST client and the SPS REST API. It is not related to the sessions that SPS records (and which also have a session ID, but in a different format).

Sample request

The following command lists the available subchapters.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/reporting/statistics_subchapters

The following command retrieves the properties of a specific subchapter.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/reporting/statistics_subchapters/<subchapter-id>
Response

The following is a sample response received when listing connection statistics subchapters.

For details of the meta object, see Message format.

{
  "meta": {
    "first": "/api/configuration/reporting/content_subchapters",
    "href": "/api/configuration/reporting/statistics_subchapters",
    "last": "/api/configuration/reporting/statistics_subchapters",
    "next": null,
    "parent": "/api/configuration/reporting",
    "previous": "/api/configuration/reporting/reports",
    "transaction": "/api/transaction"
  },
  "items": [
    {
      "key": "21111736175707f1df8bea1",
      "meta": {
        "href": "/api/configuration/reporting/statistics_subchapters/21111736175707f1df8bea1"
      }
    }
  ]
}

When retrieving the endpoint of a specific subchapter, the response is the following.

{
  "body": {
    "access": [
      "search",
      "reporting"
    ],
    "chart": {
      "type": "list"
    },
    "name": "stats_simple",
    "query": {
      "column": "username",
      "filter": [
        {
          "column": "protocol",
          "is_exact": false,
          "is_inverted": false,
          "value": "ssh"
        },
        {
          "column": "username",
          "is_exact": false,
          "is_inverted": false,
          "value": "admin"
        }
      ],
      "limit": 15,
      "order": "top"
    }
  },
  "key": "496444806570e9c7e32c30",
  "meta": {
    "first": "/api/configuration/reporting/statistics_subchapters/21111736175707f1df8bea1",
    "href": "/api/configuration/reporting/statistics_subchapters/496444806570e9c7e32c30",
    "last": "/api/configuration/reporting/statistics_subchapters/496444806570e9c7e32c30",
    "next": null,
    "parent": "/api/configuration/reporting/statistics_subchapters",
    "previous": "/api/configuration/reporting/statistics_subchapters/1539306268570e9442cab6c",
    "transaction": "/api/transaction"
  }
}
Element Type Description
key string Top level element, contains the ID of the subchapter.
body Top level element (string) The elements of the subchapter.
access list

Required. List of access control groups whose members can access the subchapter.

To deny access to the subchapter, use "admin" as the only value for the element.

chart Top level element Defines the properties of the chart generated from the database query.
type string

Defines the chart type.

  • Use bar to generate a bar chart.

  • Use pie to generate pie a chart.

  • Use list to generate a list.

name string The name of the subchapter.
query string The search query that defines the connections to use for creating statistics. For details on using the search, see Searching in the session database.
Examples:

Create statistics about the 15 most common usernames used in SSH connections.

  • Create a bar chart.

    {
      "access": [
        "reporting",
        "search"
      ],
      "chart": {
        "type": "bar"
      },
      "name": "stats_bar",
      "query": {
        "column": "username",
        "filter": [
          {
            "column": "protocol",
            "is_exact": false,
            "is_inverted": false,
            "value": "ssh"
          }
        ],
        "limit": 15,
        "order": "top"
      }
    }
  • Create a pie chart.

    {
      "access": [
        "reporting",
        "search"
      ],
      "chart": {
        "type": "pie"
      },
      "name": "stats_pie",
      "query": {
        "column": "username",
        "filter": [
          {
            "column": "protocol",
            "is_exact": false,
            "is_inverted": false,
            "value": "ssh"
          }
        ],
        "limit": 15,
        "order": "top"
      }
    }
  • Create a list.

    {
        "access": [
          "reporting",
          "search"
        ],
        "chart": {
          "type": "list"
        },
        "name": "stats_list",
        "query": {
          "column": "username",
          "filter": [
            {
              "column": "protocol",
              "is_exact": false,
              "is_inverted": false,
              "value": "ssh"
            }
          ],
          "limit": 15,
          "order": "top"
        }
      }
Status and error codes

The following table lists the typical status and error codes for this request. For a complete list of error codes, see Application level error codes.

Code Description Notes
201 Created The new resource was successfully created.
400 InvalidQuery The requested filter or its value is invalid.
401 Unauthenticated The requested resource cannot be retrieved because the client is not authenticated and the resource requires authorization to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved.
401 AuthenticationFailure Authenticating the user with the given credentials has failed.
404 NotFound The requested object does not exist.
Add a connection statistics subchapter

To add a connection statistics subchapter, you have to:

  1. Open a transaction.

    For details, see Open a transaction.

  2. Create the JSON object for the new subchapter.

    POST the JSON object to the https://<IP-address-of-SPS>/api/configuration/reporting/statistics_subchapters/ endpoint. You can find a detailed description of the available parameters listed in Element .

    If the POST request is successful, the response includes the key of the new subchapter. For example:

    {
      "key": "769e627d-515d-4d26-a03e-cb2ed0bbee04",
      "meta": {
        "href": "/api/configuration/reporting/statistics_subchapters/769e627d-515d-4d26-a03e-cb2ed0bbee04",
        "parent": "/api/configuration/reporting/statistics_subchapters",
        "transaction": "/api/transaction"
      }
    }
  3. Commit your changes.

    For details, see Commit a transaction.

Modify a connection statistics subchapter

To modify a subchapter, you have to:

  1. Open a transaction.

    For details, see Open a transaction.

  2. Modify the JSON object of the subchapter.

    PUT the modified JSON object to the https://<IP-address-of-SPS>/api/configuration/reporting/statistics_subchapters//<key-of-the-subchapter> endpoint. You can find a detailed description of the available parameters listed in Element .

  3. Commit your changes.

    For details, see Commit a transaction.

Health and maintenance

Topics:

Monitor appliance health status

To monitor the health status of an appliance, complete the following steps.

  1. Query the /api/health-status endpoint.
    curl --cookie cookies https://<IP-address-of-SPS>/api/health-status

    The following is a sample response received.

    For details of the meta object, see Message format.

    For details of the other objects, see tables Cluster status details and "issues" object details.

    {
        "health_status": {
            "memory": 62.5,
            "disk": 1.9,
            "swap": 0,
            "load1": 0.53,
            "load5": 0.68,
            "load15": 0.37,
            "sessions": {
                "ssh": 3,
                "rdp": 4
            },
            "total_sessions": 7
        }
    }
    Elements Type Description

    health_status

     

    null or object

    The health status of a node. If the node is down, the value is null. Otherwise, the health-related data is listed.

    memory floating point integer (percent) Memory use
    disk floating point integer (percent) Hard disk use
    swap floating point integer (percent) Swap use
    load1 floating point integer

    The average system load during the last one minute. The values mean the following:

    • < 1: low system load
    • 1-5: high system load
    • > 5: extremely high system load
    load5 floating point integer

    The average system load during the last five-minute period. The values mean the following:

    • < 1: low system load
    • 1-5: high system load
    • > 5: extremely high system load
    load15 floating point integer

    The average system load during the last fifteen-minute period. The values mean the following:

    • < 1: low system load
    • 1-5: high system load
    • > 5: extremely high system load
    sessions string

    The protocol type and the number of ongoing sessions. For example:

    "sessions": {
      "ssh": 3,
      "rdp": 4
    },
    total_sessions integer (number of) The total number of ongoing sessions.

Advanced authentication and authorization

Topics:
Documents connexes

The document was helpful.

Sélectionner une évaluation

I easily found the information I needed.

Sélectionner une évaluation