Chapter 1. Using APIs for queries
The drift service enables you to compare the system configuration of one system to that of other systems and baselines registered in your Insights for Red Hat Enterprise Linux inventory. It allows you to query system configurations using a REST API, create and manage baselines, and returns fact values as well as comparison states. You can also generate CSV output of the systems and baselines you are comparing.
- For additional Insights for Red Hat Enterprise Linux services for Red Hat Enterprise Linux API documentation, see https://cloud.redhat.com/docs/api-docs.
- For the latest OpenAPI Specification document, see OpenAPI Specification.
1.1. Schema
The API access is over HTTPS, and accessed from the root URL of https://access.redhat.com/documentation/en-us/red_hat_insights/1-latest/html/system_comparison_api_documentation/[System Comparison API Documentation. All data is sent and received as JSON. The JSON files include:
drift-openapi.json historical-system-profiles-openapi.json system-baseline-openapi.json
1.2. Specification
1.2.1. REST API entry point
The REST API is available by using the /api URL prefix. Accessed it on the server as follows:
"/api/drift/v1"
1.2.2. HTTP methods
The HTTP methods currently supported for API requests are GET and POST.
1.2.3. Data types
Data Type | Description |
---|---|
Integer | Integer value |
String | JSON string |
Array |
The |
Boolean | Value resulting in True or False |
Timestamp | Timestamp in ISO8601 format |
1.2.4. HTTP status codes
Code | Text | Description |
---|---|---|
200 | OK | Success. |
400 | Bad Request | The request could not be understood by the server due to incorrect syntax. |
500 | Internal Server Error | The server encountered an unexpected condition which prevented it from fulfilling the request. |