サポートと今すぐチャット
サポートとのチャット

One Identity Safeguard for Privileged Sessions 7.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, download, and index sessions Reporting Health and maintenance Advanced authentication and authorization Completing the Welcome Wizard using REST Enable and configure analytics using REST

Monitor appliance health status

To monitor the health status of an appliance, query the /api/health_status endpoint.

URL
curl --cookie cookies https://<IP-address-of-SPS>/api/health_status
Response

The following is a sample response received.

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

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

{
              "health_status": {
                  "cpu": 1.0,
                  "disk": 2.0,
                  "firmware": {
                      "tainted_files": {
                          "boot": 1,
                          "core": 2,
                          "ha_other": 0
                      },
                      "integrity": {
                          "boot": "OK",
                          "core": "CORRUPTED"
                      }
                  },
                  "indexer": {
                      "indexer_status": [
                          {
                              "capabilities": ["index"],
                              "idle_workers_count": 1,
                              "indexer_jobs": 0,
                              "ip": "127.0.0.1",
                              "screenshot_jobs": 0,
                              "video_jobs": 0,
                              "workers_count": 1
                          },
                          {
                              "capabilities": ["screenshot", "video"],
                              "idle_workers_count": 1,
                              "indexer_jobs": 0,
                              "ip": "127.0.0.1",
                              "screenshot_jobs": 0,
                              "video_jobs": 0,
                              "workers_count": 1
                          },
                          {
                              "capabilities": ["video"],
                              "idle_workers_count": 1,
                              "indexer_jobs": 0,
                              "ip": "127.0.0.1",
                              "screenshot_jobs": 0,
                              "video_jobs": 0,
                              "workers_count": 1
                          }
                      ],
                      "processing_tasks": [],
                      "remaining_tasks": [],
                      "worker_warnings": []
                  },
                  "load1": 3.0,
                  "load15": 4.0,
                  "load5": 5.0,
                  "memory": 7.0,
                  "pipeline_queues": {
                      "session_events": 64.3,
                      "indexer_events": 40.0
                  },
                  "raid": {
                      "disks": {
                          "252:0": {"status": "OK"},
                          "252:1": {"status": "OK"},
                          "252:2": {"status": "OK"},
                          "252:3": {"status": "OK"}
                      },
                      "status": {
                          "detailed_status": "OK",
                          "operation_progress": 0,
                          "status": "OK"
                      }
                  },
                  "sessions": {
                      "http": 1,
                      "ica": 2,
                      "mssql": 3,
                      "rdp": 4,
                      "ssh": 5,
                      "telnet": 6,
                      "vnc": 7
                  },
                  "sessions_total": 28,
                  "swap": 8.0,
                  "system_details": {
                      "cpu": {
                          "guest": 0.0,
                          "guest_nice": 0.0,
                          "idle": 97.0,
                          "iowait": 0.0,
                          "irq": 0.0,
                          "nice": 0.0,
                          "softirq": 0.0,
                          "steal": 0.0,
                          "system": 2.0,
                          "user": 1.0
                      },
                      "disk": {
                          "free": 200000000,
                          "percent": 2.0,
                          "total": 10000000000,
                          "used": 9800000000
                      },
                      "memory": {
                          "active": 5523861504,
                          "available": 3288555520,
                          "buffers": 265920512,
                          "cached": 3269304320,
                          "free": 1188810752,
                          "inactive": 1109909504,
                          "percent": 60.6,
                          "shared": 1117671424,
                          "slab": 325619712,
                          "total": 8344498176,
                          "used": 3620462592
                      },
                      "swap": {
                          "free": 0,
                          "percent": 0.0,
                          "sin": 0,
                          "sout": 0,
                          "total": 0,
                          "used": 0
                      }
                  }
              }
          }

Elements of the response message include:

Elements

Type Description

health_status

null or object

The health status of a node. When queried, it lists data related to the given node's health (in the case of HA, this means the current master node).

health_status.memory

floating point number

Memory usage (percent)

health_status.disk

floating point number Hard disk usage (percent)

health_status.swap

floating point number Swap usage (percent)

health_status.cpu

floating point number Overall CPU usage (percent)

health_status.load1

floating point number

The average system load during the last one minute.

health_status.load5

floating point number

The average system load during the last five-minute period.

health_status.load15

floating point number

The average system load during the last fifteen-minute period.

health_status.sessions

string

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

"sessions": {
  "ssh": 3,
  "rdp": 4
}

health_status.total_sessions

integer (number of) The total number of ongoing sessions.

health_status.system_details

JSON object Various details about the CPU, disk, memory and swap usage of the appliance. Note that the exact set of metrics is determined by the underlying kernel and system libraries, therefore it might change between different versions of One Identity Safeguard for Privileged Sessions without notice.

health_status.pipeline_queues

JSON object

Represents the fullness of the processing pipelines in percentages.

health_status.indexer

JSON object

 

health_status.indexer.indexer_status

 

Represents the current status of the indexer service.

health_status.indexer.indexer_status

capabilities

enum

Defines what various tasks the worker nodes of that group can handle.

Possible values: index | screenshot | video

health_status.indexer.indexer_status

idle_workers_count

number

The number of worker nodes without a task.

health_status.indexer.indexer_status

indexer_jobs

number

The number of indexer tasks delegated to worker nodes within that worker group.

health_status.indexer.indexer_status

ip

string

The IPv4 address of the indexer worker nodes.

health_status.indexer.indexer_status

screenshot_jobs

number

The number of screenshot tasks delegated to worker nodes within that worker group.

health_status.indexer.indexer_status

video_jobs

number

The number of video tasks delegated to worker nodes within that worker group.

health_status.indexer.indexer_status

workers_count

number

The number of worker nodes with the same capabilities.

health_status.indexer.processing_tasks

array

The list of tasks in progress based on the connection policy.

health_status.indexer.remaining_tasks

array

The list of tasks queued for processing based on the connection policy. For example:

    [{​​​​​​​
     'processing_tasks': {​​​​​​​​​
         'connection': 'ssh_connection',
         'protocol': 'SSH',
         'indexer_jobs': 1,
         'screenshot_jobs': 3,
         'video_jobs': 0
     }​​​​​​​​​
}​​​​​​​]
 

health_status.indexer.worker_warnings

array

The list of error and warning messages related to the worker nodes.

health_status.raid

JSON object

 

health_status.raid.status

JSON object

 

health_status.raid.status

status

string

Possible values:

  • OK [0] - All disks are functioning properly.

  • WARNING [1] - All disks are functioning properly, however, there is a possibility of data loss, if the values increase further above the threshold.

  • DEGRADED [2] - There is no operation in progress due to disk failure. Data is preserved, but it is not at full redundancy.

  • DEGRADED_SYNCING [3] - Resync/rebuild is in progress due to disk failure. Data is preserved, but it is not at full redundancy.

  • CRITICAL [4] - Data loss occurred.

health_status.raid.status

detailed_status

string

A short description of the type of RAID operation that is in progress (for example, rebuild, background initialization, or consistency check).

health_status.raid.status

operation_progress

number

The progress of the RAID operation in percentages. Typically used if the disk is in a REBUILDING state.

The default value is 0.

 

 

health_status.raid.disks

JSON object

 

 

 

health_status.raid.disks

<disk_id>

JSON object

 

 

 

health_status.raid.disks

<disk_id>.status

string

Possible values:

  • SPARE - The Dedicated Hot Spare (DHS) disk that is on standby to take over, if a disk fails.

  • REBUILDING - Either a new disk has been inserted, or the DHS disk had to take over for a failed disk, and is now building.

  • FAULTY - The failed disk that must be replaced with a new one.

The number of CPUs determine the load a system can handle without causing the processes having to wait. As a generic rule of thumb, if the load is less than the number of processor cores of the appliance, the overall system load can be considered normal, otherwise it might be an indication of performance issues.

Advanced authentication and authorization

Topics:

Usermapping policy

For SSH, RDP, Telnet, and Citrix ICA connections, usermapping policies can be defined. A usermapping policy describes who can use a specific username to access the remote server: only members of the specified local or LDAP usergroups (for example, administrators) can use the specified username (for example, root) on the server.

URL
GET https://<IP-address-of-SPS>/api/configuration/policies/usermapping_policies
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 existing usermapping policies.

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

The following command retrieves the properties of a specific usermapping policy.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/policies/usermapping_policies<object-id>
Response

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

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

{
  "meta": {
    "first": "/api/configuration/policies/audit_policies",
    "href": "/api/configuration/policies/usermapping_policies",
    "last": "/api/configuration/policies/usermapping_policies",
    "next": null,
    "parent": "/api/configuration/policies",
    "previous": "/api/configuration/policies/userlists",
    "transaction": "/api/transaction"
  },
  "items": [
    {
      "key": "11581153055704544883f77",
      "meta": {
        "href": "/api/configuration/policies/usermapping_policies/11581153055704544883f77"
      }
    },
    {
      "key": "9328731525704545f5e3de",
      "meta": {
        "href": "/api/configuration/policies/usermapping_policies/9328731525704545f5e3de"
      }
    }
  ]
}

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

{
  "body": {
    "allow_other_remote_users_without_mapping": false,
    "mappings": [
      {
        "allowed_groups": [],
        "remote_user": "test"
      },
      {
        "allowed_groups": [
          "admins"
        ],
        "remote_user": "root"
      }
    ],
    "name": "Test"
  },
  "key": "9328731525704545f5e3de",
  "meta": {
    "first": "/api/configuration/policies/usermapping_policies/277736452570454272e157",
    "href": "/api/configuration/policies/usermapping_policies/9328731525704545f5e3de",
    "last": "/api/configuration/policies/usermapping_policies/9328731525704545f5e3de",
    "next": null,
    "parent": "/api/configuration/policies/usermapping_policies",
    "previous": "/api/configuration/policies/usermapping_policies/11581153055704544883f77",
    "transaction": "/api/transaction"
  }
}
Element Type Description
key string Top level element, contains the ID of the policy.
body Top level element (string) The elements of the usermapping policy.
allow_other_remote_users_without_mapping boolean

Default value: true.

To allow access the remote servers for users who are not explicitly listed in the Usermapping Policy, configure true. Note that these users must use the same username on the SPS gateway and the remote server.

mappings Top level list Contains the list of user groups and the corresponding remote usernames the group members can use to log in.
allowed_groups list

The usergroups allowed to log in as the remote_user on the remote server.

Required element. Empty means all users.

remote_user string

The username on the remote server that the users configured in allowed_groups can use to log in.

Required element. Must have a value.

Example mappings:

Anyone can log in to the remote server as the test user:

"mappings": [
  {
    "allowed_groups": [],
    "remote_user": "test"
  }
Only the members of the admin group can log in to the remote server as the root user:
"mappings": [
  {
    "allowed_groups": [
      "admins"
    ],
    "remote_user": "root"
  }
    
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.
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.
Add a usermapping policy

To add a usermapping policy, you have to:

  1. Open a transaction.

    For more information, see Open a transaction.

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

    POST the JSON object to the https://<IP-address-of-SPS>/api/configuration/policies/usermapping 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 usermapping policy. For example:

    {
      "key": "2e8692fa-7fda-4753-8363-37e8244f6b80",
      "meta": {
        "href": "/api/configuration/policies/usermapping_policies/2e8692fa-7fda-4753-8363-37e8244f6b80",
        "parent": "/api/configuration/policies/usermapping_policies",
        "transaction": "/api/transaction"
      }
    }
  3. Commit your changes.

    For more information, see Commit a transaction.

Modify a usermapping policy

To modify a usermapping policy, you have to:

  1. Open a transaction.

    For more information, see Open a transaction.

  2. Modify the JSON object of the usermapping policy.

    PUT the modified JSON object to the https://<IP-address-of-SPS>/api/configuration/policies/usermapping/<key-of-the-object> 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.

Plugins

Contains the endpoints for configuring plugins.

URL
GET https://<IP-address-of-SPS>/api/configuration/plugins
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 endpoints for configuring plugins.

curl --cookie cookies https://<IP-address-of-SPS>/api/configuration/plugins
Response

The following is a sample response received when listing endpoints for configuring plugins.

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

{
    "items": [
        {
            "key": "aa",
            "meta": {
                "href": "/api/configuration/plugins/aa"
            }
        },
        {
            "key": "configuration_sync",
            "meta": {
                "href": "/api/configuration/plugins/configuration_sync"
            }
        },
        {
            "key": "credentialstore",
            "meta": {
                "href": "/api/configuration/plugins/credentialstore"
            }
        },
        {
            "key": "signingca",
            "meta": {
                "href": "/api/configuration/plugins/signingca"
            }
        }
    ],
    "meta": {
        "first": "/api/configuration/aaa",
        "href": "/api/configuration/plugins",
        "last": "/api/configuration/x509",
        "next": "/api/configuration/policies",
        "parent": "/api/configuration",
        "previous": "/api/configuration/passwords",
        "remaining_seconds": 600,
        "transaction": "/api/transaction"
    }
}
Element Description
aa Endpoint for configuring authentication and authorization plugins.
configuration_sync Endpoint for configuring plugins that synchronize the configuration of SPS clusters that receive their configuration from the Central Management node.
credentialstore Endpoint for configuring credential store plugins.
signingca Endpoint for configuring plugins to sign certificates.
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
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.
関連ドキュメント

The document was helpful.

評価を選択

I easily found the information I needed.

評価を選択