Exporting ETL configuration by using API


Use the Export configuration APIs to get the list of all ETL IDs and run configurations, extract the configuration for a specific batch or service ETL, extract the configuration for an ETL with a specific run configuration, and test the extraction of a database extractor.

Before you begin

Ensure that the following requirements are met:

  • The appropriate read or write activity is assigned to your user role to access the API. The user account must have the following permissions (through user roles):
    • READ: capacity_optimization.admin.etls_read or capacity_optimization.admin.admin_section_read
    • WRITE: capacity_optimization.custom_etl.edit or capacity_optimization.admin.admin_section_edit

For information about the user roles and permissions, see Default-user-roles-and-permissions.

Get a list of all ETLs

GET/opt/api/v1/backend/etls/

Retrieves a list of all ETLs with the ETL IDs and run configurations.

Request URL
https://<host_name>/opt/api/v1/backend/etls/
Example request URL
https://hostname.bmc.com/opt/api/v1/backend/etls/
Request Header
Content-Type: application/json
Authorization: Bearer <jwttoken>

Sample response

[
 {
   "name": "VMware - vCenter Extractor Service",
   "etl_id": 53,
   "run_configurations": [
     {
       "name": "Default",
       "active": true,
       "run_configuration_id": 216
     }
    ]
 },
 {
   "name": "Moviri - k8s Prometheus Extractor",
   "etl_id": 60,
   "run_configurations": [
     {
       "name": "Default",
       "active": true,
       "run_configuration_id": 223
     }
    ]
 }
]

Get a list of all ETLs (filtered by custom properties)

GET /opt/api/v1/backend/etls/

Retrieves a list of all ETLs that are filtered by using custom properties. You can add or remove the filter as required.

Request URL
https://<host_name>/opt/api/v1/backend/etls/
Example request URL
https://hostname.bmc.com/opt/api/v1/backend/etls/
Request Header
Content-Type: application/json
Authorization: Bearer <jwttoken>

The filters in the request body can be used selectively.

Request body
{
  "entity_catalog_id": "6",
 "etl_name": "DRCOZ%",
 "etl_description": "%prod%",
  "properties_filter_operator": "OR",
  "properties_filter": {
 "general.log.level": "10"
  }

Extract configuration for a specific batch or service ETL

post/opt/api/v1/backend/etls/<etl-id>/configuration

Extracts the configuration of the specified ETL.

Request URL
https://<host_name>/opt/api/v1/backend/etls/<etl-id>/configuration
Example request URL
https://hostname.bmc.com/opt/api/v1/backend/etls/294/configuration
Request Header
Content-Type: application/json
Authorization: Bearer <jwttoken>
Request body
{
 "encryption_passphrase": "<password>"
}

encryption_passphrase is temporary passphrase that is used to encrypt sensitive content during export (for example, passwords).

Sample response

{
 "scheduling": {
   "scheduled": true,
   "scheduler_id": 1,
   "period_sec": 86400,
   "start_date": "2022-04-27T02:20:00Z"
 },
 "etl": {
   "instance_name": "AWS daily",
   "module_name": "com.bmc.bco.aws.extractor.DMAWSExtractorE",
   "module_description": "Amazon Web Services - AWS API Extractor",
   "module_id": 151,
   "type_id": 24
 },
 "properties": {
   "extract.access.key.id": "AKIAJNKJWEC2TDWDG56A",
   "extract.access.key.secret.password.encrypted": "6xTGNtnBN7cKKwbB5tA81fW3gRgdsOpFZ3YzJV2GjiVMsm3FNrl5REcaHU28CjR5mvL+zwWM0g/KGrqQ4CIGPVAuc+E=",
   "extract.aws.account.options": "SINGLE",
   "extract.aws.us.gov.cloud": "false",
   "extract.database.iscustom": "true",
   "extract.default.region": "us-east-1",
   "extract.module": "com.bmc.bco.aws.extractor.DMAWSExtractorE",
   "extract.prop.bs.tag.key": "Service",
   "general.dataset.idlist": "1;59;103;7;118;30",
   "general.log.level": "1",
   "general.module.selection": "DATASOURCE",
   "general.options.onemptydataset": "WARN",
   "general.simulation": "false",
   "loader.lookup.remove.domain": "false",
   "loader.sysnm.leave.domain": "false",
   "mask.ignorevalidation": "false",
   "test.test": "rraff"
 },
 "object_relationships": {
   "domain_mode": "EXISTING",
   "domain_id": "51931"
 },
 "entity_catalog": {
   "sharing_status": "SHARED",
   "entity_catalog_id": 2
 },
 "metric_profile": {
   "level": 4,
   "metric_profile_id": 0
 }
}

Extract configuration for an ETL with a specific run configuration

post/opt/api/v1/backend/etls/<etl-id>/configuration/<run-configuration-id>

Extracts the configuration for an ETL with a specific run configuration.

Request URL
https://<host_name>/opt/api/v1/backend/etls/<etl-id>/configuration/<run-configuration-id>
Example request URL
https://hostname.bmc.com/opt/api/v1/backend/etls/250/configuration/409
Request Header
Content-Type: application/json
Authorization: Bearer <jwttoken>
Request body
{
 "encryption_passphrase": "<password>"
}

encryption_passphrase is temporary passphrase that is used to encrypt sensitive content during export (for example, passwords).

Sample response

{
 "scheduling": {
   "scheduled": true,
   "scheduler_id": 1,
   "period_sec": 86400,
   "start_date": "2022-04-27T02:20:00Z"
 },
 "etl": {
   "instance_name": "AWS daily",
   "module_name": "com.bmc.bco.aws.extractor.DMAWSExtractorE",
   "module_description": "Amazon Web Services - AWS API Extractor",
   "module_id": 151,
   "type_id": 24
 },
 "properties": {
   "extract.access.key.id": "AKIAJNKJWEC2TDWDG56A",
   "extract.access.key.secret.password.encrypted": "6xTGNtnBN7cKKwbB5tA81fW3gRgdsOpFZ3YzJV2GjiVMsm3FNrl5REcaHU28CjR5mvL+zwWM0g/KGrqQ4CIGPVAuc+E=",
   "extract.aws.account.options": "SINGLE",
   "extract.aws.us.gov.cloud": "false",
   "extract.database.iscustom": "true",
   "extract.default.region": "us-east-1",
   "extract.module": "com.bmc.bco.aws.extractor.DMAWSExtractorE",
   "extract.prop.bs.tag.key": "Service",
   "general.dataset.idlist": "1;59;103;7;118;30",
   "general.log.level": "1",
   "general.module.selection": "DATASOURCE",
   "general.options.onemptydataset": "WARN",
   "general.simulation": "false",
   "loader.lookup.remove.domain": "false",
   "loader.sysnm.leave.domain": "false",
   "mask.ignorevalidation": "false",
   "test.test": "rraff"
 },
 "object_relationships": {
   "domain_mode": "EXISTING",
   "domain_id": "51931"
 },
 "entity_catalog": {
   "sharing_status": "SHARED",
   "entity_catalog_id": 2
 },
 "metric_profile": {
   "level": 4,
   "metric_profile_id": 0
 }
}

Response

HTTP code

Message

Description

200

OK

Request succeeded

400


ETL not found

500


Error

 

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