Analytics Administration REST APIs

    +

    Overview

    The Analytics Administration REST APIs are provided by the Analytics service. These APIs enables you to manage and monitor the Analytics service.

    The API schemes and host URLs are as follows:

    • http://node:8095/

    • https://node:18095/ (for secure access)

    where node is the host name or IP address of a node running the Analytics service.

    Version information

    Version : 6.6

    Consumes

    • application/x-www-form-urlencoded

    Produces

    • application/json

    Paths

    Table of Contents

    Request Cancellation

    DELETE /analytics/admin/active_requests

    Description

    Cancels an active request.

    Parameters

    Type Name Description Schema

    FormData

    client_context_id
    required

    Identifier passed by the client that is used to identify an active request to be cancelled.

    string

    Responses

    HTTP Code Description Schema

    200

    The operation was successful.

    No Content

    400

    Bad request. Incorrect parameter or missing value.

    No Content

    401

    Unauthorized. The user name or password may be incorrect.

    Returns an object containing an error message. Refer to Error Codes.

    object

    404

    Not found. The path may be incorrect, or there is no active request with the specified identifier.

    No Content

    Security

    Type Name

    basic

    Analytics Manage / Analytics Select

    Example HTTP request

    The example below uses the client_context_id used in the Query Service example to identify the request.

    Curl request

    $ curl -v -u Administrator:password -X DELETE http://localhost:8095/analytics/admin/active_requests -d client_context_id=xyz

    Cluster Restart

    POST /analytics/cluster/restart

    Description

    Restarts all Analytics Service nodes in the cluster.

    Responses

    HTTP Code Description Schema

    202

    Accepted. Returns an object showing the status of the cluster.

    object

    401

    Unauthorized. The user name or password may be incorrect.

    Returns an object containing an error message. Refer to Error Codes.

    object

    404

    Not found. The path may be incorrect.

    No Content

    Security

    Type Name

    basic

    Analytics Manage

    Example HTTP request

    Curl request

    $ curl -v -u Administrator:password -X POST http://localhost:8095/analytics/cluster/restart

    Example HTTP response

    Response 202

    {
      "cluster" : {
        "metadata_node" : "edfb6de9c91d7fb36399fea3ce620c5c",
        "ncs" : [ {
          "node_id" : "edfb6de9c91d7fb36399fea3ce620c5c",
          "partitions" : [ {
            "active" : true,
            "partition_id" : "partition_0"
          } ],
          "pid" : 5763,
          "state" : "ACTIVE"
        } ],
        "state" : "ACTIVE"
      },
      "date" : "Wed Oct 10 15:35:56 BST 2018",
      "status" : "SHUTTING_DOWN"
    }

    Node Restart

    POST /analytics/node/restart

    Description

    Restarts the specified Analytics Service node.

    Responses

    HTTP Code Description Schema

    202

    Accepted. Returns an object showing the status of the node.

    object

    401

    Unauthorized. The user name or password may be incorrect.

    Returns an object containing an error message. Refer to Error Codes.

    object

    404

    Not found. The path may be incorrect.

    No Content

    Security

    Type Name

    basic

    Analytics Manage

    Example HTTP request

    Curl request

    $ curl -v -u Administrator:password -X POST http://localhost:8095/analytics/node/restart

    Example HTTP response

    Response 202

    {"status": "restarting node"}

    Pending Mutations

    GET /analytics/node/agg/stats/remaining

    Description

    Shows the number of mutations in the DCP queue that have not yet been ingested by the Analytics service, for each dataset.

    Responses

    HTTP Code Description Schema

    200

    Success. Returns an object containing one or more nested dataverse objects, one for each available dataverse.

    Dataverses

    401

    Unauthorized. The user name or password may be incorrect.

    Returns an object containing an error message. Refer to Error Codes.

    object

    404

    Not found. The path may be incorrect.

    No Content

    Security

    Type Name

    basic

    Analytics Manage / Analytics Select

    Example HTTP request

    Curl request

    $ curl -v -u Administrator:password http://localhost:8095/analytics/node/agg/stats/remaining

    Example HTTP response

    Response 200

    {
      "Default" : {
        "GleambookMessages" : 0,
        "GleambookUsers" : 0
      }
    }

    Definitions

    Dataverses

    An object containing one or more nested dataverse objects, one for each available dataverse.

    Name Description Schema

    dataverse
    optional

    A nested object containing one or more dataset properties, one for each dataset in the dataverse. The name of the object is the name of the dataverse.

    Datasets

    Datasets

    Name Description Schema

    dataset
    optional

    The number of mutations in the DCP queue that have not yet been ingested. The name of the property is the name of the dataset.

    integer

    Security

    The Analytics Administration REST APIs support HTTP basic authentication. Credentials can be passed via HTTP headers.

    Analytics Manage / Analytics Select

    For the Request Cancellation and Pending Mutations operations, users must have one of the following access roles:

    • Full Admin

    • Cluster Admin

    • Analytics Manager

    • Analytics Reader

    • Analytics Select

    • Analytics Admin

    Type : basic

    Analytics Manage

    For the Cluster Restart and Node Restart operations, users must have one of the following RBAC roles:

    • Full Admin

    • Cluster Admin

    • Analytics Admin

    Type : basic

    Refer to Roles for more details.