Chat now with support
Chat with Support

One Identity Safeguard for Privileged Sessions 8.0 LTS - 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 MSSQL connections RDP connections SSH connections Telnet connections VNC connections Search, retrieve, download, and index sessions Reporting Health and maintenance Advanced authentication and authorization Completing the Welcome Wizard using REST Enable and configure analytics using REST REST API examples

Enable One Identity Safeguard for Privileged Analytics

This endpoint allows you to enable One Identity Safeguard for Privileged Analytics.

To enable One Identity Safeguard for Privileged Analytics and analyze the behavior of your users, One Identity Safeguard for Privileged Sessions (SPS) requires a special license. Also, depending on the number of your users and sessions, the performance and sizing of SPS must be considered. If you are interested in One Identity Safeguard for Privileged Analytics, contact our Sales Team, or your One Identity representative. For details on One Identity Safeguard for Privileged Analytics, see the One Identity One Identity Safeguard for Privileged Analytics website. For details on enabling One Identity Safeguard for Privileged Analytics, see Safeguard for Privileged Analytics Configuration Guide.

URL
GET https://<IP-address-of-SPS>/api/configuration/local_services/analytics/

Querying this endpoint returns the true if One Identity Safeguard for Privileged Analytics is enabled, false otherwise. For example:

{
    "body": {
        "enabled": false
    },
    "key": "analytics",
    "meta": {
        "first": "/api/configuration/local_services/admin_web",
        "href": "/api/configuration/local_services/analytics",
        "last": "/api/configuration/local_services/user_web",
        "next": "/api/configuration/local_services/indexer",
        "parent": "/api/configuration/local_services",
        "previous": "/api/configuration/local_services/admin_web",
        "remaining_seconds": 600,
        "transaction": "/api/transaction"
    }
}

To modify enable One Identity Safeguard for Privileged Analytics, you have to complete the following.

Prerequisites

To enable One Identity Safeguard for Privileged Analytics and analyze the behavior of your users, One Identity Safeguard for Privileged Sessions (SPS) requires a special license. Also, depending on the number of your users and sessions, the performance and sizing of SPS must be considered. If you are interested in One Identity Safeguard for Privileged Analytics, contact our Sales Team, or your One Identity representative. For details on One Identity Safeguard for Privileged Analytics, see the One Identity One Identity Safeguard for Privileged Analytics website. For details on enabling One Identity Safeguard for Privileged Analytics, see Safeguard for Privileged Analytics Configuration Guide.

For details on uploading a license, see Upload a new license.

  1. Open a transaction.

    For more information, see Open a transaction.

  2. Change the enabled option to true.

    PUT the enabled option with the true value as a JSON object to the https://<IP-address-of-SPS>/api/configuration/local_services/analytics/ endpoint. For example:

    curl -H "Content-Type: application/json" -d '{ "enabled": true}' -X PUT https://<IP-address-of-SPS>/api/configuration/local_services/analytics/
  3. Commit your changes.

    For more information, see Commit a transaction.

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
200 OK Updating the resource was successful
201 Created The new resource was successfully created.
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.
403 Unauthorized The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved.
404 NotFound The requested object does not exist.

Configure One Identity Safeguard for Privileged Analytics

The /api/configuration/policies/analytics endpoint allows you to configure One Identity Safeguard for Privileged Analytics by adding and removing analytics policies.

URL
GET https://<IP-address-of-SPS>/api/configuration/policies/analytics/
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 more information on authentication, see Authenticate to the SPS REST API.

NOTE: 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 analytics policies configured.

curl --cookie cookies.txt https://<IP-address-of-SPS>/api/configuration/policies/analytics/

The following command retrieves the properties of a specific policy.

curl --cookie cookies.txt https://<IP-address-of-SPS>/api/configuration/policies/analytics/<policy-key>
Response

The following is a sample response received when listing analytics policies.

For more information on the meta object, see Message format.

{
  "items": [
    {
      "key": "9316362595a747b24d295e",
      "meta": {"href": "/api/configuration/policies/analytics/9316362595a747b24d295e"}
    }, {
      "key": "9316362595a747b24d295f",
      "meta": {"href": "/api/configuration/policies/analytics/9316362595a747b24d295f"}
    }
  ]
}
  "meta": {
    "first": "/api/configuration/policies/aa_plugin_instances",
    "href": "/api/configuration/policies/analytics",
    "last": "/api/configuration/policies/usermapping_policies",
    "next": "/api/configuration/policies/audit_policies",
    "parent": "/api/configuration/policies",
    "previous": "/api/configuration/policies/aa_plugin_instances",
    "remaining_seconds": 599,
    "transaction": "/api/transaction"
  }

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

{
    "body": {
        "name": "my_analytics_policy",
        "scoring": {
            "command": "trust",
            "fis": "disable",
            "hostlogin": "use",
            "keystroke": "trust",
            "logintime": "use",
            "mouse": "disable",
            "windowtitle": "disable"
        }
    },
    "key": "9316362595a747b24d295e",
    "meta": {
        "first": "/api/configuration/policies/analytics/9316362595a747b24d295e",
        "href": "/api/configuration/policies/analytics/9316362595a747b24d295e",
        "last": "/api/configuration/policies/analytics/9316362595a747b24d295e",
        "next": null,
        "parent": "/api/configuration/policies/analytics",
        "previous": null,
        "remaining_seconds": 600,
        "transaction": "/api/transaction"
    }
Element Type Description
body, or items when a list is returned Top-level element (string) Contains the properties of the analytics policy.
name string The unique name of the policy. This name is also displayed on the SPS web interface. It cannot contain whitespaces.
scoring Top-level element Scoring settings for analytics.
key string Top-level element, contains the ID of the policy.
Elements of scoring Type Description
command string

Contains one of the following values:

  • disable: The algorithm is not used and is therefore not scoring session data.

  • use: The algorithm is used and is therefore scoring session data. The highest and lowest scores given by this algorithm are ignored when aggregating scores.

  • trust: The algorithm is used and is therefore scoring session data. The highest and lowest scores given by this algorithm are taken into account when aggregating scores.

fis string
hostlogin string
keystroke string
logintime string
mouse string
windowtitle string
Add an analytics policy

To add an analytics policy, complete the following steps.

  1. Open a transaction.

    For more information, see Open a transaction.

  2. Create the JSON object for the new analytics policy.

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

    If the POST request is successful, when querying /api/configuration/policies/analytics, the response includes the key of the new analytics policy. For example:

    {
      "key": "1e089e2a-76b4-4079-94e3-c83ebc74dc2e",
      "meta": {
        "href": "/api/configuration/policies/analytics/1e089e2a-76b4-4079-94e3-c83ebc74dc2e",
        "parent": "/api/configuration/policies/analytics",
        "transaction": "/api/transaction"
      }
    }
  3. Commit your changes.

    For more information, see Commit a transaction.

Modify an analytics policy

To modify an analytics policy, complete the following steps.

  1. Open a transaction.

    For more information, see Open a transaction.

  2. Modify the JSON object of the analytics policy.

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

  3. Commit your changes.

    For more information, see Commit a transaction.

Delete an analytics policy

To delete an analytics policy, complete the following steps.

  1. Open a transaction.

    For more information, see Open a transaction.

  2. DELETE the JSON object of the analytics policy.

    DELETE the JSON object using the ID of the object as the key: https://<IP-address-of-SPS>/api/configuration/policies/analytics/<policy-key>. For details on how to delete an object, see Delete an object.

    If the DELETE request is successful, when querying /api/configuration/policies/analytics, the response includes the key of the deleted analytics policy. For example:

    {
      "meta": {
        "first": "/api/configuration/policies/analytics/9316362595a747b24d295e",
        "href": "/api/configuration/policies/analytics/9316362595a747b24d295e",
        "last": "/api/configuration/policies/analytics/9316362595a747b24d295e",
        "next": "/api/configuration/policies/analytics/9316362595a747b24d295e",
        "parent": "/api/configuration/policies/analytics",
        "previous": null,
        "transaction": "/api/transaction"
      }
    }
  3. Commit your changes to actually delete the object from SPS. For details, see Commit a transaction.

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 SemanticError The request to create an object has failed due to semantic errors in the configuration.
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.
403 Unauthorized The requested resource cannot be retrieved because the client is not authorized to access it. The details section contains the path that was attempted to be accessed, but could not be retrieved.
404 NotFound The requested object does not exist.

REST API examples

This is a collection of examples for the available endpoints of the SPS REST API.

Examples

This is a collection of examples for the available endpoints of the SPS REST API.

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating