Endpoints for System Metrics
You can use the Lucidum API to query Lucidum about:
the number of assets and the number of users
the current license and its expiration date
all active Connectors
data ingestion jobs
Action 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.
Query the Lucidum Database about Metrics: /CMDB/v2/system/metrics/data
This endpoint allows you to query Lucidum for metrics about users and assets, specifically:
number of assets
number of users
30-day average number of assets
30-day average number of users
Endpoint | Method |
---|---|
/CMDB/v2/system/metrics/data | GET |
/CMDB/v2/system/metrics/data?date=yyyy-mm-dd To query for a specific date, you can append the date string to the URL | GET |
Example cURL Query
curl --location 'https://Company.Lucidum.cloud/CMDB/v2/system/metrics/data?date=2023-07-01' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer quoVnYQeDNicAOywkOKq'
Line 1. The cURL call. The method defaults to GET. The URL is host name plus the endpoint for the metrics API. We included the string “date=2023-07-01”.
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.
Example Response
{
"assetCount": 5488,
"userCount": 292,
"date": "2023-07-01",
"avg30DaysAssetCount": 5118,
"avg30DaysUserCount": 292
}
Query the Lucidum Database about Licensing: /CMDB/v2/system/metrics/license
This endpoint allows you to query Lucidum for licensing information.
Endpoint | Method |
---|---|
/CMDB/v2/system/metrics/license | GET |
Example cURL Query
curl --location 'https://Company.Lucidum.cloud/CMDB/v2/system/metrics/license
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer quoVnYQeDNicAOywkOKq'
Line 1. The cURL call. The method defaults to GET. The URL is host name plus the endpoint for the license 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.
Example Response
{
"licenseType": "FULL",
"expireDate": "2023-12-31",
"customerName": "dogfood"
}
Query the Lucidum Database about Connector Data: /CMDB/v2/system/metrics/connector
This endpoint allows you to query Lucidum and get a list of each connector used by Lucidum and the data retrieved by each connector.
Endpoint | Method |
---|---|
/CMDB/v2/system/metrics/connector | GET |
/CMDB/v2/system/metrics/connector?sort=display_name%2Cdesc To sort the results by one of the fields, you can append the sort string to the URL. In this example, we sort by the field “display_name” and sort in descending order (z - a) | GET |
Example cURL Query
curl --location 'https://Company.Lucidum.cloud/CMDB/v2/system/metrics/connector?sort=display_name%2Cdesc
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer quoVnYQeDNicAOywkOKq'
Line 1. The cURL call. The method defaults to GET. 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.
Example Response
Because the response is thousands of lines long, this example response includes only the first entry:
{
"content": [
{
"_utc": "2023-08-08T01:06:14.488+00:00",
"bridge_name": "rumble_user",
"display_name": "runZero User",
"profile": {
"mongo_id": {
"timestamp": 1658260353,
"date": "2022-07-19T19:52:33.000+00:00"
},
"profile_name": "Default profile",
"display_name": "runZero User",
"error_msg": "HTTPError:401 Client Error: Unauthorized for url: https://console.rumble.run/api/v1.0/account/users"
},
"platform": "api",
"_time": 1691456774,
"version": "1.0.0",
"status": "Error",
"source_settings": "{\"platform\": \"api\", \"type\": \"user_info\", \"technology\": \"rumble_user\", \"display_name\": \"runZero User\", \"output\": \"mysql\"}",
"start_time": 1691456774,
"end_time": 1691456774,
"duration_minutes": 0.0,
"input_records": 0,
"output_records": 0,
"expected_input_fields": [
"displayName",
"Owner_Email",
"Source_User_Name",
"Is_Admin",
"Role_Name",
"First_Discovered_Datetime",
"Last_Discovered_Datetime"
],
"raw_data_fields": [
"join('', [first_name, ' ', last_name])",
"email",
"email",
"client_admin",
"org_default_role",
"created_at",
"last_login_at"
],
"actual_input_fields": [],
"output_fields": [],
"event_messages": [
{
"ERROR": "2023-08-08 01:06:14.462 | ERROR | loguru._logger:exception:1992 - run-adhoc error: HTTPError:401 Client Error: Unauthorized for url: https://console.rumble.run/api/v1.0/account/users\nTraceback (most recent call last):\n\n> File \"lucidum_api.py\", line 113, in lucidum_api.run_adhoc._ingest_data\n data_frame = pd.DataFrame(technology_service.get_data(source_config))\n │ └ <class 'pandas.core.frame.DataFrame'>\n └ <module 'pandas' from '/usr/local/lib/python3.9/site-packages/pandas/__init__.py'>\n\n File \"/usr/local/lib/python3.9/site-packages/pandas/core/frame.py\", line 502, in __init__\n data = list(data)\n └ <generator object at 0x7efc48228180>\n\n File \"rumble_user.py\", line 22, in get_data\n\n File \"data_base.py\", line 74, in tmp.app.data.data_base.DataBase.do_request\n\n File \"/usr/local/lib/python3.9/site-packages/requests/models.py\", line 1021, in raise_for_status\n raise HTTPError(http_error_msg, response=self)\n │ │ └ <Response [401]>\n │ └ '401 Client Error: Unauthorized for url: https://console.rumble.run/api/v1.0/account/users'\n └ <class 'requests.exceptions.HTTPError'>\n\nrequests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://console.rumble.run/api/v1.0/account/users\n"
}
],
"data_qa_info": []
},
Query the Lucidum Database about Ingestion Jobs: /CMDB/v2/system/metrics/data-ingestion
This endpoint allows you to query Lucidum for a list of data ingestion job. The response lists each job, its start time, end time, and status.
Endpoint | Method |
---|---|
/CMDB/v2/system/metrics/data-ingestion | GET |
Example cURL Query
curl --location 'https://Company.Lucidum.cloud/CMDB/v2/system/metrics/data-ingestion
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer quoVnYQeDNicAOywkOKq'
Line 1. The cURL call. The method defaults to GET. The URL is host name plus the endpoint for the data ingestion 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.
Example Response
This example includes the first three entries in the response.
{
"data_ingestion_runs": [
{
"run_type": "scheduled",
"id": "scheduled__2023-08-09T01:05:00+00:00",
"status": "running",
"start_date": "2023-08-10T01:05:01.000353+00:00"
},
{
"end_date": "2023-08-10T00:56:32.720895+00:00",
"run_type": "scheduled",
"id": "scheduled__2023-08-08T01:05:00+00:00",
"status": "success",
"start_date": "2023-08-09T01:05:00.376324+00:00"
},
{
"end_date": "2023-08-09T01:04:28.194523+00:00",
"run_type": "scheduled",
"id": "scheduled__2023-08-07T01:05:00+00:00",
"status": "success",
"start_date": "2023-08-08T01:05:01.135442+00:00"
},
Query the Lucidum Database about the Next Ingestion Job: /CMDB/v2/system/metrics/data-ingestion/next
This endpoint allows you to query Lucidum for information about the next data ingestion job. The response tells when the next ingestion job will run and the scheduled interval.
Endpoint | Method |
---|---|
/CMDB/v2/system/metrics/data-ingestion | GET |
Example cURL Query
curl --location 'https://Company.Lucidum.cloud/CMDB/v2/system/metrics/data-ingestion/next
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer quoVnYQeDNicAOywkOKq'
Line 1. The cURL call. The method defaults to GET. The URL is host name plus the endpoint for the API for the next data ingestion.
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.
Example Response
{
"next_run_at": "data-ingestion running now. Get next run time after current data-ingestion finishes.",
"schedule_interval_value": "5 1 * * *",
"schedule_interval_type": "CronExpression"
}
Query the Lucidum Database for Details about Ingestion Job by Date and Time: /CMDB/v2/system/metrics/data-ingestion/details
This endpoint allows you to query Lucidum for details about a specific data ingestion job.
Endpoint | Method |
---|---|
/CMDB/v2/system/metrics/data-ingestion/detail/scheduled_yyyy-mm-dd'T'HH:mm:ss+or-hh:mm For example: This example provides details about the ingestion job scheduled for July 27, 2023, at 1:05:00 AM, with no time adjustment from UTC time (+00:00). | GET |
Example cURL Query
curl --location 'https://Company.Lucidum.cloud/CMDB/v2/system/metrics/data-ingestion/detailscheduled__2023-07-27T01:05:00+00:00
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer quoVnYQeDNicAOywkOKq'
Line 1. The cURL call. The method defaults to GET. The URL is host name plus the endpoint for API for detailed data ingestion.
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.
Example Response
Because the response is over 500 lines, this example provides only the first two jobs scheduled for ingestion on July 27, 2023, at 1:05:00 AM UTC.
{
"task_list": [
{
"end_date": "2023-07-28T01:14:32.655826+00:00",
"docker_cmd": "/tmp/app/lucidum_aws run-adhoc aws_eip",
"task_id": "run_aws_aws_eip",
"operator": "DockerOperator",
"status": "success",
"start_date": "2023-07-27T01:05:00+00:00",
"docker_image": "connector-aws:V3.3.2.23"
},
{
"end_date": "2023-07-28T01:16:11.150260+00:00",
"docker_cmd": "/tmp/app/lucidum_aws run-adhoc aws_eks",
"task_id": "run_aws_aws_eks",
"operator": "DockerOperator",
"status": "success",
"start_date": "2023-07-27T01:05:00+00:00",
"docker_image": "connector-aws:V3.3.2.23"
},
Query the Lucidum Database for Details about Scheduled Action Jobs: /CMDB/v2/system/metrics/actions
Lucidum automatically executes Actions at the time and recurrence defined in the action. This endpoint allows you to query Lucidum for details about all Actions jobs that have been scheduled.
Endpoint | Method |
---|---|
/CMDB/v2/system/metrics/action | GET |
Example cURL Query
curl --location 'https://Company.Lucidum.cloud/CMDB/v2/system/metrics/action
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer quoVnYQeDNicAOywkOKq'
Line 1. The cURL call. The method defaults to GET. The URL is host name plus the endpoint for the action 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.
Example Response
Because the response is over 200 lines, this example provides only the first two action jobs scheduled for execution.
{
"last": true,
"numberOfElements": 13,
"totalPages": 1,
"pageable": {
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"pageNumber": 0,
"pageSize": 20,
"offset": 0,
"paged": true,
"unpaged": false
},
"actions": [
{
"lastRunAt": "2023-08-09T17:24:51.779Z",
"actionTypeDisplayName": "Email",
"description": "",
"createdAt": "2023-08-09T17:24:33.626Z",
"actionType": "email",
"scheduleType": "SCHEDULE_BATCH_DATA",
"createdBy": "kai",
"scheduleCronExpression": "0 0 00 ? 1/1 MON#1 *",
"actionId": "64d3cbd11d1c032e20fb922e",
"actionGroup": "General",
"nextRunAt": "2023-09-04T00:00:00Z",
"actionName": "lucidum user",
"status": "RUNNING"
},
{
"lastRunAt": "2023-08-14T01:56:39.657Z",
"actionTypeDisplayName": "Amazon Web Services",
"description": "",
"createdAt": "2023-08-08T18:29:12.710Z",
"actionType": "aws",
"scheduleType": "AFTER_DATA_INGESTION",
"createdBy": "admin",
"scheduleCronExpression": "",
"actionId": "64d289781d1c032e20fb90c8",
"actionGroup": "Amazon",
"nextRunAt": "After Next Data Ingestion",
"actionName": "AWS S3 Test",
"status": "RUNNING"
},
Query the Lucidum Database for Details about a Single Scheduled Action Job: /CMDB/v2/system/metrics/action-jobs/action_id
Lucidum automatically executes Actions at the time and recurrence defined in the action. This endpoint allows you to query Lucidum for details about all the scheduled jobs for a specific action.
Endpoint | Method |
---|---|
/CMDB/v2/system/metrics/action-jobs/action_id To find the action ID, use the API endpoint /CMDB/v2/system/metrics/actions. The response includes the action ID for each scheduled job. For example, using the response in the previous section, we could use the endpoint: /CMDB/v2/system/metrics/action-jobs/64d289781d1c032e20fb90c8 | GET |
Example cURL Query
curl --location 'https://Company.Lucidum.cloud/CMDB/v2/system/metrics/action-jobs/64d289781d1c032e20fb90c8
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer quoVnYQeDNicAOywkOKq'
Line 1. The cURL call. The method defaults to GET. The URL is host name plus the endpoint for the action job 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.
Example Response
Because the response is over 100 lines, this example provides only the first two scheduled jobs are included in this example response.
[
{
"id": "64d989d7cceefc43465c7649",
"action_run_date": "2023-08-14 01:56:39",
"action_status": "SUCCESS",
"action_status_msg": null,
"action_result_number": 15,
"action_result_log_id": "64d989d7cceefc43465c7639"
},
{
"id": "64d8379dcceefc43465c758c",
"action_run_date": "2023-08-13 01:53:33",
"action_status": "SUCCESS",
"action_status_msg": null,
"action_result_number": 15,
"action_result_log_id": "64d8379dcceefc43465c757c"
},