Retrieval APIs
API Specification
Request Endpoint:
https://<domain>auditlogs.autorabit.com/logs/audit_logs
For example: https://testauditlogs.autorabit.com/logs/audit_logsRequest Type:
GET
Request Query String Parameters:
startTime=YYYY-MM-DDThh:mm:ss (this is optional; if not specified, the current day will be presumed) For example: 2021-03-14T1000:00
maxResults=1000 (optional, default value is 1000)
eventType=event1, event2 (this is optional, however, if not specified it will load all the events) For example: eventType=DEPLOYMENT, DATALOADERPRO will load events for DEPLOYMENT and DATALOADERPRO respectively.
Request Headers:
Content-Type: application/json
Authorization: Your Bearer token
Obtaining your Access Token
To interact with API, you need to have a unique, personal access token. This will be used to authenticate yourself within the API. Please contact the AutoRABIT Team to update the following properties in the config file once the API token gets generated:
/home/ubuntu/.rabit/auditlogs/auditConfig.json
To generate your access token, you should:
Log in to the AutoRABIT account.
Hover your mouse over the Admin module and select the option: API Tokens
Click on the Create API Token button to generate a new token.
Enter the API Token Name on the next screen.
Click Create. Note down your newly generated token - you are going to need it soon.
Point to Note:
For security reasons, it is not possible to view the token after closing the creation dialog. If necessary, create a new token. Max of 10 tokens are permitted for each user license. You should store the token securely, as for any password.
Sample Request
Sample Response
Sample Response (for invalid API Token)
Audit Logs Retrieval API Guide
This guide provides information on how to use the Audit Logs Retrieval API to view and download audit logs. The API offers endpoints for retrieving audit log data and downloading it in a ZIP file format. Follow the instructions below to integrate and use these APIs in your application.
Viewing Audit Logs
Endpoint
GET <https://<domain>>/logs/audit_logs
Example:
<https://testauditlogs.autorabit.com/logs/audit_logs>
Query String Parameters
startTime
(optional): The start time for the audit logs in ISO 8601 format (YYYY-MM-DDThh:mm:ss). If not specified, the current day's logs are presumed.Example:
2021-03-14T10:00:00
maxResults
(optional): The maximum number of results to return. Default value is 1000.Example:
maxResults=1000
eventType
(optional): A comma-separated list of event types to filter the logs. If not specified, all event types are loaded.Example:
eventType=DEPLOYMENT,DATALOADERPRO
Example Request
GET <https://testauditlogs.autorabit.com/logs/audit_logs?startTime=2021-03-14T10:00:00&maxResults=500&eventType=DEPLOYMENT,DATALOADERPRO>
Response
The response will contain the audit logs based on the specified parameters.
Downloading Audit Logs
Endpoint
GET {domain}/logs/audit_logs/download
Parameters
startTime
(required): The start date for the audit logs in ISO 8601 format.endTime
(optional): The end date for the audit logs in ISO 8601 format. If not specified, the logs are provided until the current day, provided the duration is within 90 days from thestartTime
.
Example Request Using Curl
curl --location '<https://<domain>>/logs/audit_logs/download?startTime=2021-03-14T10:00:00&endTime=2021-03-20T10:00:00' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <bearer token>'
Notes:
If only the
startTime
is provided, logs are retrieved up to the current day.The date range (from
startTime
toendTime
or the current day) must be within 90 days.The downloaded logs are provided in a ZIP file.
Example Download Request
GET <https://<domain>>/logs/audit_logs/download?startTime=2021-03-14T10:00:00&endTime=2021-03-20T10:00:00
The logs between March 14, 2021, and March 20, 2021, will be downloaded in a ZIP file.
Authorization
All requests to the API endpoints must include an Authorization
header with a valid Bearer token.
Example:
--header 'Authorization: Bearer <bearer token>'
Ensure your Bearer token is kept secure and is valid for accessing the API.
Last updated