Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
entity-group
entity
metric
misc
README.md
expression.md

README.md

Overview

The Meta API lets you query and update metadata about metrics, entities, and entity groups in the Axibase Time Series Database.

Categories

Request Methods

The API uses GET, POST, PUT, PATCH, and DELETE methods to read and write data.

Request Headers

When submitting payload with POST, PUT, and PATCH methods in JSON format, add the header Content-Type: application/json.

For correct Unicode handling, specify the chartset Content-Type: application/json;chartset=UTF-8.

URI Encoding

Requested parameter values and parameterized path segments such as /api/v1/metrics/{metric} should be URL encoded to translate special characters such as : / ? # [ ] @ into a percent format that can be transmitted safely as part of the request URI.

Input Encoded Value URI
jvm/memory(max) jvm%2Fmemory%28max%29 /api/v1/metrics/jvm%2Fmemory%28max%29
name LIKE 'cpu*' name%20LIKE%20%27cpu*%27 /api/v1/metrics?expression=name%20LIKE%20%27cpu*%27

Failure to encode URI components may result in 4xx and 5xx errors:

Status Code: 500
{"error":"...HttpRequestMethodNotSupportedException: Request method 'GET' not supported"}

Response Codes

  • 200 status code if the request is successful.
  • 401 status code in case of an unknown resource.
  • 403 status code in case of access denied error.
  • 4xx status code in case of other client errors.
  • 5xx status code in case of server error.

4xx or 5xx response codes are specific to each API methods.

Errors

Processing errors are returned in JSON format:

{"error":"Empty first row"}

Authentication

  • User authentication is required.
  • All requests must be authenticated using BASIC AUTHENTICATION.
  • The authentication method is HTTP BASIC.
  • The client may enable session cookies to execute multiple requests without re-sending BASIC authentication header.

Authorization

Cross-domain Requests

Cross-domain requests are allowed.

Compression

  • Clients may send compressed data by adding the HTTP header Content-Encoding: gzip to the request.

Troubleshooting

  • Review error logs on the Admin:Server Logs page in case the payload is rejected
  • To validate JSON received from a client, launch the netcat utility in server mode, reconfigure the client to send data to netcat port, and dump the incoming data to file:
nc -lk localhost 20088 > json-in.log &

curl http://localhost:20088/api/v1/metrics/cpu-used-total \
  -v -u {username}:{password} \
  -H "Content-Type: application/json" \
  -X PATCH \
  -d '{ "label": "CPU Busy Average" }'

cat json-in.log