Enrichment source addition and management endpoints in the REST API


Warning

Important

The DNS, GeoIP, and LDAP enrichment sources are not available starting with the 22.2 release. The existing enrichment policies that contain any of these enrichment sources will not enrich logs by using these sources. The CSV enrichment source will continue to enrich the logs. 

Add and manage enrichment sources that are used to enrich logs.




POST/enrichment_sources/upload
Add a CSV enrichment source
Request URL
/logs-service/api/v1.0/logs/enrichment_sources/upload
Example request URL
https://HostA.bmc.com/logs-service/api/v1.0/logs/upload
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>


Example request body

{
 "name": "string",
 "description": "string",
 "enabled": true,
 "enrich_params": "string",
 "file": {},
 "file_name": "string",
 "source_field": "string",
 "state": "ACTIVE",
 "target_field": "string"
}


Response codes

Code

Description

201

Enrichment source of type CSV is created. Returns source details in the payload.

400

Error for invalid data. Check if all input values are valid. 

401

Authorization failure. Verify JWT.

403

Permission denied. Verify the roles assigned to you.

415

Incorrect request format. Ensure that the request format is JSON and enrichment source IDs are correct.

500

Unexpected condition encountered. Contact BMC Support.

Back to top

PUT/enrichment_sources/{id}/upload
Update CSV enrichment source by ID
Request URL
/logs-service/api/v1.0/logs/enrichment_sources/{id}/upload
Example request URL
https://HostA.bmc.com/logs-service/api/v1.0/logs/enrichment_sources/a00a0a00-a000-00a0-a000-0a000aa0a0a0/upload
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>


Parameter details



Example request body

{
 "name": "string",
 "description": "string",
 "enabled": true,
 "enrich_params": "string",
 "file": {},
 "file_name": "string",
 "source_field": "string",
 "state": "ACTIVE",
 "target_field": "string"
}


Response codes

Code

Description

200

Enrichment source of type CSV is updated successfully.

400

Error for invalid data. Check if all input values are valid. 

401

Authorization failure. Verify JWT.

403

Permission denied. Verify the roles assigned to you.

404

The enrichment source ID is not found.

415

Incorrect request format. Ensure that the request format is JSON and enrichment source IDs are correct.

500

Unexpected condition encountered. Contact BMC Support.

Back to top

GET/enrichment_sources/{id}
Get an enrichment source by ID
Request URL
/logs-service/api/v1.0/logs/enrichment_sources/{IDs}
Example request URL
https://HostA.bmc.com/logs-service/api/v1.0/logs/enrichment_sources/00a0a00-a000-00a0-a000-0a000aa0a0a0
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>


Parameter details



Response codes

Code

Description

200

Enrichment sources returned successfully.

401

Authorization failure. Verify JWT.

403

Permission denied. Verify the roles assigned to you.

404

The enrichment source ID is not found.

500

Unexpected condition encountered. Contact BMC Support.

Back to top

POST/enrichment_sources/enable
Enable enrichment sources
Request URL
/logs-service/api/v1.0/logs/enrichment_sources/enable
Example request URL
https://HostA.bmc.com/logs-service/api/v1.0/logs/enrichment_sources/enable
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>


Example request body

{
 "ids": [
   "a00a0a00-a000-00a0-a000-0a000aa0a0a0"
  ]
}


Response codes

Code

Description

200

Enrichment sources are enabled successfully.

207

Some enrichment sources are enabled. IDs of the sources that are not enabled are returned.

400

Error for invalid data. Check if all input values are valid. 

401

Authorization failure. Verify JWT.

403

Permission denied. Verify the roles assigned to you.

415

Incorrect request format. Ensure that the request format is JSON and enrichment source IDs are correct.

500

Unexpected condition encountered. Contact BMC Support.

Back to top

POST/enrichment_sources/disable
Disable enrichment sources
Request URL
/logs-service/api/v1.0/logs/enrichment_sources/disable
Example request URL
https://HostA.bmc.com/logs-service/api/v1.0/logs/enrichment_sources/disable
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>


Example request body

{
 "ids": [
   "a00a0a00-a000-00a0-a000-0a000aa0a0a0"
  ]
}


Response codes

Code

Description

200

Enrichment sources are disabled successfully. 

207

Some enrichment sources are disabled. IDs of the sources that are not disabled are returned.

400

Error for invalid data. Check if all input values are valid. 

401

Authorization failure. Verify JWT.

403

Permission denied. Verify the roles assigned to you.

415

Incorrect request format. Ensure that the request format is JSON and enrichment source IDs are correct.

500

Unexpected condition encountered. Contact BMC Support.

Back to top

POST/enrichment_sources/search
Search enrichment sources
Request URL
/logs-service/api/v1.0/logs/enrichment_sources/search
Example request URL
https://HostA.bmc.com/logs-service/api/v1.0/logs/search
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>


Parameter details



Example request body

{
"page_index": 1,
"page_size": 100,
"search_string": "name = 'CSV Log Enrichment Source' and enabled = true",
"sort_criteria": "name DESC, enabled ASC"
}


Response codes

Code

Description

200

Enrichment sources are found. Returns source details in the payload.

400

Error for invalid data. Check if all input values are valid. 

401

Authorization failure. Verify roles assigned to you and JWT.

403

Permission denied. Verify the roles assigned to you.

415

Incorrect request format. Ensure that the request format is JSON and enrichment source IDs are correct.

500

Unexpected condition encountered. Contact BMC Support.

Back to top

DELETE/enrichment_sources/{id}
Delete an enrichment source by ID
Request URL
 /logs-service/api/v1.0/logs/enrichment_sources/{id}
Example request URL
 https://HostA.bmc.com/logs-service/api/v1.0/logs/enrichment_sources/a00a0a00-a000-00a0-a000-0a000aa0a0a0
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>

For instructions on obtaining the JWT token, see Access and authentication for the REST API..

Parameter details



Response codes

Code

Description

200

Enrichment source is deleted successfully.

401

Authorization failure. Verify roles assigned to you and JWT.

403

Permission denied. Verify the roles assigned to you.

404

The enrichment source ID is not found.

500

Unexpected condition encountered. Contact BMC Support.

Back to top

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Helix Log Analytics 23.1