立即与支持人员聊天
与支持团队交流

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

Query nodes

To list the nodes available in a cluster, complete the following steps.

  1. Query the /api/cluster/nodes endpoint on the Central Management node.
    curl --cookie cookies.txt https://<IP-address-of-Central-Management-node>/api/cluster/nodes

    The following is a sample response received.

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

    {
        "items": [
            {
                "key": "46f97a58-4028-467d-9a22-9cfe78ae3e1c",
                "meta": {
                    "href": "/api/cluster/nodes/46f97a58-4028-467d-9a22-9cfe78ae3e1c",
                    "status": "/api/cluster/status/46f97a58-4028-467d-9a22-9cfe78ae3e1c"
                }
            },
            {
                "key": "b35c54da-b556-4f91-ade5-d26283d68277",
                "meta": {
                    "href": "/api/cluster/nodes/b35c54da-b556-4f91-ade5-d26283d68277",
                    "status": "/api/cluster/status/b35c54da-b556-4f91-ade5-d26283d68277"
                }
            }
        ],
        "meta": {
            "href": "/api/cluster/nodes",
            "parent": "/api/cluster",
            "remaining_seconds": 28800,
            "self": "/api/cluster/nodes/b35c54da-b556-4f91-ade5-d26283d68277",
            "status": "/api/cluster/status"
        }
    }
    Elements Type Description
    items Top-level element (list of JSON objects) List of endpoints (objects) available from the current endpoint.
    key string The ID of the node.
    meta Top-level item (JSON object) Contains links to different parts of the REST service.
    href string (relative path) The path of the node that returned the response.
    status string (relative path) The path to the status of the node that returned the response.

Query one particular node

To query one particular node, complete the following steps.

  1. Query the /api/cluster/nodes/<node-id-of-node-to-be-queried> endpoint on the node that you want to query.
    curl --cookie cookies.txt https://<IP-address-of-node-to-be-queried>/api/cluster/nodes/<node-id-of-node-to-be-queried>

    The following is a sample response received.

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

    {
        "body": {
            "address": "<IP-address-of-node-to-be-queried>",
            "roles": [
                "central-management"
            ]
        },
        "key": "b35c54da-b556-4f91-ade5-d26283d68277",
        "meta": {
            "href": "/api/cluster/nodes/b35c54da-b556-4f91-ade5-d26283d68277",
            "parent": "/api/cluster/nodes",
            "remaining_seconds": 28800,
            "status": "/api/cluster/status/b35c54da-b556-4f91-ade5-d26283d68277"
        }
    }
    Elements Type Description
    body Top-level element (JSON object) Contains the JSON object of the node.
    address string The IP address of the node.
    roles string The role assigned to the node.
    key string The ID of the node.

Query the status of all nodes in the cluster

To query the status of all nodes in your cluster, complete the following steps.

  1. Query the /api/cluster/status endpoint on the Central Management node.
    curl --cookie cookies.txt https://<IP-address-of-Central-Management-node>/api/cluster/status

    The following is a sample response received.

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

    {
      "items": [
        {
          "key": "b35c54da-b556-4f91-ade5-d26283d68277",
          "fqdn": "sps.example.com",
          "health_status": null,
          "sync_status": "n/a",
          "meta": {
            "configuration": "/api/cluster/nodes/b35c54da-b556-4f91-ade5-d26283d68277",
            "href": "/api/cluster/status/b35c54da-b556-4f91-ade5-d26283d68277"
          }
        },
        {
          "key": "46f97a58-4028-467d-9a22-9cfe78ae3e1c",
          "last_seen": "2018-02-08T10:00:30Z",
          "fqdn": "managed-host.cluster",
          "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
          },
          "sync_status": "pending",
          "configuration_sync": {
            "issues": {
              "warnings": [
               {
                  "message": "Connection 'simple_ssh_connection' and local service 'SSH' conflict on 10.30.42.42:22",
                  "paths": [
                    "/api/configuration/ssh/connections/12345",
                    "/api/configuration/local_services/ssh"
                  ]
                }
              ]
            }
          },
          "meta": {
            "configuration": "/api/cluster/nodes/46f97a58-4028-467d-9a22-9cfe78ae3e1c",
            "href": "/api/cluster/status/46f97a58-4028-467d-9a22-9cfe78ae3e1c"
          }
        }
      ],
      "meta": {
        "href": "/api/cluster/status",
        "parent":  "/api/cluster",
        "self": "/api/cluster/status/b35c54da-b556-4f91-ade5-d26283d68277"
      }
    }
    Elements Type Description
    items Top-level element (list of JSON objects) List of endpoints (objects) available from the current endpoint.
    key string The ID of the node.

     

    fqdn

     

    string

    The address of the node as a fully qualified domain name.

     

    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.
    sync_status string

    Indicates the status of configuration synchronization. It has the following values:

    • up-to-date: The node has fetched the latest configuration from the Central Management node, and has applied it. It is in sync with the Central Management node.
    • pending: There has been a configuration change on the Central Management node, and the change has not been synchronized yet to the node.
    • outdated: There has been some error on the node and therefore it is running an old configuration.
    • not-fetched: The node has not fetched any configuration yet.
    • n/a: The node is the Central Management node, so it is not fetching its configuration from any other node.
    meta Top-level item (JSON object) Contains links to different parts of the REST service.
    configuration string (relative path) The path to the configuration of the node that returned the response.
    href string (relative path) The path to the node that returned the response.
    last_seen string The last time the node sent status information to the Central Management node, in ISO 8601 format.
    configuration_sync Top-level item (JSON object)
    issues Top-level item (JSON object) The issues that occurred during configuration synchronization.
    Elements of issues Type Description
    warning Top-level item (JSON object)
    message string Human-readable text explaining why the warning occurred.
    details array List of additional information about the warning (for example, the path where the warning occurred).
    error Top-level item (JSON object)
    type string The type of the error.
    message string Human-readable text explaining why the error occurred.
    details JSON object List of additional information about the error (for example, the path where the error occurred).

Query the status of one particular node

To query the status of one particular node in your cluster, complete the following steps.

  1. Query the /api/cluster/status/<node-id-of-node-to-be-queried> endpoint on the Central Management node.
    curl --cookie cookies.txt https://<IP-address-of-Central-Management-node>/api/cluster/status/<node-id-of-node-to-be-queried>

    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.

    {
        "fqdn": "managed-host.cluster",
        "key": "46f97a58-4028-467d-9a22-9cfe78ae3e1c",
        "configuration_sync": {
            "issues": {}
        },
        "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
        },
        "sync_status": "up-to-date",
        "last_seen": "2018-02-08T10:00:00Z",
        "meta": {
            "configuration": "/api/cluster/nodes/46f97a58-4028-467d-9a22-9cfe78ae3e1c",
            "href": "/api/cluster/status/46f97a58-4028-467d-9a22-9cfe78ae3e1c"
        }
    }
    Elements Type Description
    items Top-level element (list of JSON objects) List of endpoints (objects) available from the current endpoint.
    key string The ID of the node.

     

    fqdn

     

    string

    The address of the node as a fully qualified domain name.

     

    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.
    sync_status string

    Indicates the status of configuration synchronization. It has the following values:

    • up-to-date: The node has fetched the latest configuration from the Central Management node, and has applied it. It is in sync with the Central Management node.
    • pending: There has been a configuration change on the Central Management node, and the change has not been synchronized yet to the node.
    • outdated: There has been some error on the node and therefore it is running an old configuration.
    • not-fetched: The node has not fetched any configuration yet.
    • n/a: The node is the Central Management node, so it is not fetching its configuration from any other node.
    meta Top-level item (JSON object) Contains links to different parts of the REST service.
    configuration string (relative path) The path to the configuration of the node that returned the response.
    href string (relative path) The path to the node that returned the response.
    last_seen string The last time the node sent status information to the Central Management node, in ISO 8601 format.
    configuration_sync Top-level item (JSON object)
    issues Top-level item (JSON object) The issues that occurred during configuration synchronization.
    Elements of issues Type Description
    warning Top-level item (JSON object)
    message string Human-readable text explaining why the warning occurred.
    details array List of additional information about the warning (for example, the path where the warning occurred).
    error Top-level item (JSON object)
    type string The type of the error.
    message string Human-readable text explaining why the error occurred.
    details JSON object List of additional information about the error (for example, the path where the error occurred).
相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级