Archiving and restoring logs by using REST APIs


Archive and restore logs.

GET/indices
Get a list of indices
Request URL
/logs-service/api/v1.0/logs/archive/indices
Example request URL
https://HostA.bmc.com/logs-service/api/v1.0/logs/archive/indices
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>

Paameter details


Example request body

{
 "indices": [
   {
     "indexName": "string",
     "status": "string",
     "size": "string",
     "start_time": "string",
     "end_time": "string",
     "creation_date": "string"
   }
  ]
}


Response codes

Code

Description

200

List of indices is returned successfully.

400

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

401

Authorization failure. Verify roles assigned to you and JWT.

415

Incorrect request format. Ensure that the request format is JSON.

500

Unexpected condition encountered. Contact BMC Support.

Back to top

POST/indices/migrate
Migrate indices from cold to ultrwarm or ultrawarm to cold
Request URL
/logs-service/api/v1.0/logs/archive/indices/migrate
Example request URL
https://HostA.bmc.com/logs-service/api/v1.0/logs/policies
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>

Parameter details


Example request body

{
 "indexNames": [
   "string"
  ]
}


Response codes

Code

Description

201

The index is migrated successfully. 

400

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

401

Authorization failure. Verify roles assigned to you and JWT.

415

Incorrect request format. Ensure that the request format is JSON.

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 22.4