Log archival and retrieval endpoints in the REST API


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

PATCH/archive/<tenantnameOrID>?idtype=<id/name>
(For on-premises users only, run as curl command) Enable or disable archive and restore
Request URL
log-mgmt-service:8093/logs-service/ingestion/control/api/v1.0/archive/<tenantnameOrID>?idtype=<id/name>
Example request URL
http://log-mgmt-service:8093/logs-service/ingestion/control/api/v1.0/archive/a00a0a00-a000-00a0-a000-0a000aa0a0a0?idtype=name
Request Header
Content-Type: application/json
x-bmc-ops-api-key: Ops API key
(You get the Ops API key from secrets. Run the following command in your pod: env |grep OPS_API_KEY.)


Parameter details



Example request body

{
 "log_limit": "string",
 "retention_days": "string",
 "retention_days_hot": "string",
 "archive": true,
 "retentation_days_cold": "string"
 "snapshot_endpoint":"http://hostA.bmc.com:9000",
 "snapshot_bucket":"log-analytics-hostA"
}

Response codes

Code

Description

200

The feature is enabled successfully.

400

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

401

Authorization failure. Verify that the API key is correct.

415

The tenant ID or name is not found.

500

Unexpected condition encountered. Contact BMC Support.

GET/metadata-info/{tenantIdOrName}
(For on-premises users only, run as curl command) Get archive metadata information about a tenant
Request URL
log-mgmt-service:8093/logs-service/ingestion/control/api/v1.0/archive/<tenantnameOrID>?idtype=<id/name>
Example request URL
http://log-mgmt-service:8093/logs-service/ingestion/control/api/v1.0/archive/a00a0a00-a000-00a0-a000-0a000aa0a0a0?idtype=name
Request Header
x-bmc-ops-api-key: Ops API key
(You get the Ops API key from secrets. Run the following command in your pod: env |grep OPS_API_KEY.)


Parameter details



Response codes

Code

Description

200

Tenant details are returned successfully.

401

Authorization failure. Verify that the API key is correct.

415

The tenant ID or name 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*