You can use the Lucidum API to:
- Trigger data ingestion from all configured connectors
- Retrieve information about data ingestion jobs
The following sections describe the endpoints for these actions.
Headers #
Requests to the endpoints in the Lucidum API v2 must also include a header with:
-
Content-Type of JSON.
Retrieve Information about Data Ingestion: /CMDB/v2/system/data-ingestion/jobs #
This endpoint queries Lucidum for the list of all connectors. This endpoint returns:
-
an entry for each data ingestion job
-
the run ID, the interval start date and time, the interval end date and time, whether there is an external trigger, date and time schedule was created or updated, run type (manual or automatic), latest start date and time, current status
Endpoint | Method | Parameters in URL |
---|---|---|
/CMDB/v2/system/data-ingestion/jobs | GET |
|
Trigger Data Ingestion: /CMDB/v2/system/data-ingestion/run #
This endpoint triggers Lucidum Data Ingestion from all configured connectors.
This endpoint returns the run ID, the interval start date and time, the interval end date and time, whether there is an external trigger, date and time schedule was created or updated, run type (manual or automatic), latest start date and time, current status for the data ingestion job.
Endpoint | Method | Parameters in URL |
---|---|---|
/CMDB/v2/system/data-ingestion/run | GET |
|
Python Example for /CMDB/v2/system/data-ingestion/jobs #
- This code block imports these libraries:
- requests. A library for making HTTP requests.
- json. A library for handling JSON data.
- BASE_URL. A variable that stores the base URL for the API endpoint
- headers. A dictionary containing HTTP headers, including content type and authorization token.
- trigger_data_ingestion. A function that constructs the full URL for the data ingestion endpoint, makes a GET request, and returns the JSON response.
- If the script is run as the main module, it calls the trigger_data_ingstion function and prints the formatted JSON result.
Response #
Here is an abbreviated response, showing two entries (instead of the 35 entries returned):
cURL Example for/CMDB/v2/system/data-ingestion/run #
-
Line 1. The cURL call. If API call uses the GET method. The URL is host name plus the endpoint for the connector API.
- Line 2. The header specifies to return results in JSON.
-
Line 3. The header specifies to use a Bearer Token for authentication and provides the bearer token.
Response #
Here is the response for the newly run data ingestion job: