Skip to content

API Usage

The Sicura Console provides a REST API that gives access to the data shown in the Console. This page describes how to authenticate to the API, check the Console's health, and explore the API from inside the Console.

Authentication

API requests authenticate with a personal access token, which carries the permissions of the user who generated it. Generate one under Settings -> API, as described in Generate a Personal Access Token, and send it in an Authorization header:

curl -H "Authorization: Bearer <personal-access-token>" \
  https://<console-url>/api/jaeger/v1/nodes

Note: The Classic Console expects the token in an Auth-Token-Signature: <token> header instead. The Sicura Console still accepts that header on /api/jaeger/v1 but marks those responses deprecated, so use Authorization: Bearer with the Sicura Console.

Health Check and Readiness API

The Console provides health and readiness endpoints for load balancers and container orchestrators such as Kubernetes. Neither endpoint requires authentication.

GET /health

Returns status 200 with the body SicuraConsole OK while the Console is running.

GET /readiness

Returns status 200 when the Console is ready to serve requests and 503 when it is not. The body reports each check as ok, not_ready or failed:

{
  "all_ready": "ok",
  "checks": {
    "core_ready": "ok",
    "db_ready": "ok",
    "system_session_ready": "ok",
    "workers": {
      "supervisor(fork)-b9f7652abb96b975fcbf": "ok",
      "dispatcher-fbf05c795eb60e22c094": "ok",
      "worker-6f4cdd1a0da70a8f22ea": "ok",
      "scheduler-4d135f9863b84f8fba6c": "ok"
    }
  },
  "backend": {
    "name": "rails"
  }
}

The keys under workers name the Console's background processes and change from one start to the next, so check all_ready rather than individual worker names.

Note: The Classic Console returns the same envelope without the backend key, and its workers are named for its own background workers.

API Reference

The API Reference documents the Console's REST API, most of which is under /api/jaeger/v1. To open it, click the user menu at the bottom-left corner of the navigation sidebar and select the API Reference menu item.

User menu showing the API Reference menu item

The reference is the same for every user. Whether a request succeeds depends on the permissions of the token it is sent with.

The API Reference page listing the API collections

The reference lists each API collection. Click one to see the operations available on it. This example uses the nodes collection, /api/jaeger/v1/nodes.

The operations available on the nodes collection

Select Retrieve a list of nodes. This operation returns the whole collection; Retrieve a node returns a single node when you know its ID.

The collection GET operation, showing the attributes and filter parameters

The operation has two query parameters:

Attributes

attributes lists the fields of the object. Select the fields you want the response to include.

Note: Operations differ in how they apply attributes. Some always include a default set of fields in addition to the ones you select, and on the Sicura Console Retrieve a list of nodes returns the same fields whatever you select.

Filter

filter narrows a collection to the objects whose fields match the values you give. On the nodes collection you can filter on name, type, fqdn, ip_address, platform, parent and agent_version. A platform is matched by its platform ID, such as RedHat__9, so to return only Red Hat Enterprise Linux 9 nodes, set the filter to {"platform": "RedHat__9"}. An empty list, [], means no object matched.

Note: The Sicura Console ignores a filter key it does not support, including id, which the reference's example shows. A request with only unsupported keys returns the whole collection rather than an empty list.

Try an Operation

The reference does not use your Console login, so a request sent without a token answers 401. Before you send one, click the lock icon at the top of the operation, or the Authentication entry in the reference's navigation, and enter your personal access token. Then click the Try button to send the request and see the response. The CURL tab shows an equivalent curl command that you can copy into your own tooling.