REST API
Unravel's REST API allows you to query and collect data from your cluster, using either HTTP or HTTPS protocol. The API returns information similar to what you see in Unravel UI. All requests and responses are in JSON format.
To test the REST API, navigate to the Manage | API tab in Unravel UI.
Authentication
Log into Unravel UI.
Authenticate from your command line. Your access level is determined by your role. Unravel Server returns a session token which you use for all subsequent requests.
Base URL
All endpoints are relative to the base URL, http://
or unravel-host
:3000/api/v1https://
unravel-host
:3000/api/v1
Methods
The API adheres to the standard create-read-update-delete (CRUD) semantics in which the request path defines the endpoint, and the method specifies the action to perform on the resource.
Method | Action |
---|---|
POST | Creates a resource. |
GET | Retrieves a resource. |
PUT | Updates or edits a resource. |
DELETE | Deletes a resource. |
Endpoints
Resource | Method | Endpoint | Description |
---|---|---|---|
POST | To use the REST API, log into Unravel UI and send the POST /signIn request. | ||
apps | POST | Gets all apps filtered by app type, status, username, queue, and tags. | |
GET | Gets average number of jobs by type. | ||
GET | Gets tags for a given app. | ||
GET | Gets total job count per status in a given time window (at one hour intervals). | ||
GET | Gets a time series for CPU allocattions by app type. | ||
GET | Gets a time series for allocated memory by app type. | ||
GET | Gets a time series of finished apps. | ||
GET | Gets a list of running apps. | ||
yarn_rm | GET | Gets the status code for a killed YARN app. | |
GET | Gets the status code for a moved YARN app. | ||
common | GET | Gets a summary of a given application. | |
GET | Gets the errors associated with a given application. | ||
GET | Under construction. | ||
GET | Gets the logs associated with a given application. | ||
GET | Gets Unravel's recommendations for the given application. | ||
GET | Gets the status of a given application. | ||
reports | GET | ||
GET | Under construction. | ||
GET | Under construction. | ||
GET | /reports/data/diskusage/get_latest_reports?task_name=capacity_prediction_task | ||
GET | /reports/data/diskusage/get_latest_reports?task_name=cloud_mappings_grouped_reports_task | ||
GET | /reports/data/diskusage/get_latest_reports?task_name=cloud_reports_task | ||
GET | /reports/data/diskusage/get_latest_reports?task_name=cluster_discovery_task | ||
GET | /reports/data/diskusage/get_latest_reports?task_name=queue_analysis_task | ||
GET | /reports/data/diskusage/get_latest_reports?task_name=small_files_report | ||
GET | /reports/data/diskusage/get_latest_reports?task_name=topx_report | ||
GET | /reports/data/diskusage/get_latest_success_reports?task_name=cloud_mappings_grouped_reports_task | ||
GET | /reports/data/diskusage/get_latest_success_reports?task_name=cloud_reports_task | ||
GET | /reports/data/diskusage/get_latest_success_reports?task_name=cluster_discovery_task | ||
GET | /reports/data/diskusage/get_latest_success_reports?task_name=queue_analysis_task | ||
GET | /reports/data/diskusage/get_latest_success_reports?task_name=topx_report | ||
GET | Under construction. | ||
GET | Gets details about the small file report. | ||
GET | Under construction. | ||
GET | Under construction. | ||
GET | Under construction. | ||
GET | |||
GET | |||
GET | |||
GET | /reports/operational/clusterstats?st={timestamp}&et={timestamp}&mode={summary_type} | ||
GET | /reports/operational/clusterworkload?gte={timestamp}<e={timestamp}&reportBy={interval} | ||
GET | |||
GET | |||
GET | Under construction. | ||
chargeback | GET | Gets chargeback reports by application type. Gives the count of all applications in all queues for all users across all clusters. | |
GET | Gets chargeback reports by queue. | ||
GET | Gets chargeback reports by user. | ||
celery | GET | Under construction. | |
GET | Under construction. | ||
GET | Under construction. | ||
GET | Under construction. | ||
GET | Under construction. | ||
GET | Under construction. | ||
GET | Under construction. | ||
GET | Gets the small file report. | ||
autoactions | GET | Gets a list of active and inactive auto actions. | |
GET | Gets a list of auto action metrics. | ||
GET | Gets a list of recent auto action violations. | ||
jobs | GET | Gets total job count, at one hour intervals. | |
GET | Gets the number of jobs in a given timeframe, grouped by state, application type, user, or queue. | ||
GET | Gets the total job count per job type, at one hour intervals, in a given time window. | ||
GET | Gets the total job count per job type, at one hour intervals, in a given time window. | ||
clusters | GET | Gets a list of clusters. | |
GET | Gets a summary of cluster nodes. | ||
GET | Gets a time series of CPU allocations across all clusters. | ||
GET | Gets a time series of memory allocations across all clusters. | ||
GET | Gets total CPU usage across all clusters. | ||
GET | Gets total memory usage across all clusters. | ||
GET | Gets a time series for allocated CPU in a given cluster. | ||
GET | Gets a time series for allocated memory in a given cluster. | ||
GET | Gets a time series for total CPU usage in a given cluster. | ||
GET | Gets a time series for total memory usage in a given cluster. | ||
GET | Gets a time series of all the nodes of given cluster grouped by node state. | ||
kafka | GET | /kafka/brokers?cluster_id={cluster_name}&start_time={timestamp}&end_time={timestamp} | Gets a list of Kafka brokers active on a given cluster during a given timeframe. |
GET | Gets KPIs for a given Kafka broker. | ||
GET | Gets KPIs for a given Kafka cluster. | ||
GET | Gets KPIs for a given Kafka topic. | ||
GET | Gets Kafka cluster metrics. | ||
GET | Gets details about a given partition. | ||
search | GET | Gets chargeback reports by application type. Gives the count of all applications in all queues for all users across all clusters. | |
GET | Gets chargeback reports by user. | ||
GET | Gets chargeback reports by queue. | ||
workflows | GET | Lists all workflows. | |
GET | Lists workflows with missed SLA. |
Error Codes
Unravel Server returns these HTTP error codes:
Error Code | Description |
---|---|
400 | Invalid request parameters or malformed requests. |
401 | Authentication failure. |
403 | Authorization failure. |
404 | Object not found. |
500 | Internal API error. |
503 | Response is temporarily unavailable; try again later. |