Using REST APIs
The Application Programming Interfaces (APIs) are provided as Representational State Transfer (RESTful) web services. You can access these services using clients implemented in any programming language that supports the HTTP protocol. BMC Helix Continuous Optimization provides REST API endpoints to perform all tasks that are currently supported by the application. These REST API endpoints are documented in the OpenAPI UI.
Accessing the OpenAPI host for APIs
- In BMC Helix Portal,
Create an API user
.
Use the secret key to authenticate yourself before you run an endpoint. - From a supported browser, enter the following URL to access the API documentation in OpenAPI:
https://<host name>/opt/api/<service-name>/openapi.yaml
For example, to access the catalog API, enter https://<host name>/opt/api/catalog/openapi.yaml
- In the OpenAPI UI, you can access, test, and execute any APIs supported by the service.
To see example parameters for any of the following endpoints, click Try it out. Retain the example values for the parameters, or replace them with any valid value. Then click Execute to see the Curl command, request URL, and the response body for the request.
Agent Data endpoints
URL to access: https://
<host name>/opt/api/agentdata/openapi.yaml
Analysis endpoints
URL to access: https://
<host name>/opt/api/analysis/openapi.yaml
Catalog endpoints
URL to access: https://
<host name>/opt/api/catalog/openapi.yaml
This table lists the endpoints for catalog. Use the Catalog REST API to view the status of the tenants and the lookup fields.
API endpoint | Description |
---|---|
Endpoints for Tenants | |
GET/opt/api/v1/catalog/about | Returns the status of the catalog service. |
POST | Creates the required index and index mapping for the tenant activation. |
DELETE | Deactivates the tenant and removes the associated mappings and documents. |
Endpoints for Lookup | |
GET/opt/api/v1/catalog/lookup/{entityId} | Retrieves all lookup entries for the specified entity. |
PATCH | Adds the specified set of lookup fields. |
DELETE | Deletes the specified set of lookup fields |
POST | Creates a shared lookup catalog with filtering options by provider_id. |
POST | Creates an entity in the catalog, if the entity does not exist. |
POST | Searches for lookup sequences based on the specified set of mandatory filters on entity IDs and lookup sequences. |
Endpoints for Entities | |
POST | Creates a new entity. |
GET/opt/api/v1/catalog/entities/{entityId} | Retrieves all entities by their entity ID. |
PUT | Updates an entity for the specified entity ID. |
DELETE | Deletes the entity for the specified ID. |
POST | Creates a resource for the specified entity ID. |
PATCH | Adds a resource. |
GET /opt/api/v1/catalog/entities/{entityId}/resources | Retrieves all resources for the entity ID. |
DELETE | Deletes all resources and metrics for the specified entity ID. |
POST | Updates the resources. |
GET /opt/api/v1/catalog/entities/{entityId}/resources/{resourceId} | Retrieves all resources for the resource ID. |
PUT | Updates the resource by ID. |
DELETE | Deletes all resources for a resource ID. |
POST | Retrieves the metric activity details for the specified set of metrics. |
POST | Updates the metric activity for a resource. |
POST | Updates the metric activity for a resource in bulk. |
POST | Retrieves the parent/child relations linked to a set of entities. |
POST | Creates a relation. |
GET /opt/api/v1/catalog/entities/{entityId}/relations | Retrieves all relations for an entity ID. |
DELETE | Deletes all relations for an entity ID in bulk. |
Endpoints for Explore | |
GET /opt/api/v1/catalog/explore/domains/{domainId}/tree | Explores domain relations for a specific domain. |
GET /opt/api/v1/catalog/explore/entities/{entityId}/tree | Explores entities relations for a specific domain. |
POST | Explores entities relations for a specific domain by applying filters. |
Endpoints for Metrics | |
POST | Retrieves configuration data for last (current) values. |
DELETE | Deletes configuration data for last (current) values. |
POST | Deletes configuration data for last (current) values in bulk. |
Search API | |
POST | Searches the catalog resources. |
POST | Searches the catalog resources with free search text capabilities. |
POST | Searches the catalog resources and lists IDs associated with a given search. |
POST | Searches the catalog resources with free search text capabilities and lists IDs associated with a given search. |
Endpoints for RBAC | |
| Updates the groups for the specified domains. |
PUT | Adds the groups to the specified domains. |
DELETE | Deletes the groups from the specified domains. |
GET/opt/api/v1/catalog/rbac/domains/configuration | Retrieves the list of domains on which visibility privileges are set for the specified group. |
GET /opt/api/v1/catalog/rbac/domains/configuration/{requestId}/status | Retrieves the status of the RBAC configuration request. |
Endpoints for Entity tag | |
GET /opt/api/v1/catalog/entities/tags/types | Retrieves the list of available tag types. |
POST | Retrieves the list of available tag types by entity ID. |
POST | Retrieves the list of available tag types and entity IDs. |
POST/ | Adds tags to the specified entities |
PATCH/ | Updates the specified set of tags for given entity. |
DELETE/ | Deletes the specified set of tags for given entity. |
Forecast endpoints
URL to access: https://
<host name>/opt/api/forecast/openapi.yaml
This table lists the endpoints for forecast.
API endpoint | Description |
---|---|
GET /opt/api/forecast/about | Returns the status of the forecast service. |
POST /opt/api/v2/forecast/prediction | Uploads the data series prediction values. |
POST /opt/api/v2/forecast/time_prediction | Uploads the time series prediction values. |
POST /opt/api/v2/forecast/regression | Uploads the data series regression values. |
POST/opt/api/v2/forecast/time_regression | Uploads the time series regression values. |
POST/opt/api/v2/forecast/correlation | Uploads the correlation analysis values. |
POST/opt/api/v2/forecast/extrapolation | Uploads the data series extrapolation values. |
POST/opt/api/v2/forecast/cost | Uploads the forecast costs for the next 12 months based on the aggregated data series. |
Historical Time Series Ingestion endpoints
URL to access: https://
<host name>/opt/api/htsingest/openapi.yaml
This table lists the endpoints for historical time series ingestion.
API endpoint | Description |
---|---|
GET/opt/api/htsingest/about | Returns the status of the historical time series ingestion service. |
POST/opt/api/v1/htsingest/relations | Uploads an object relation file archive for processing. |
POST /opt/api/v1/htsingest/tags | Uploads object tags for processing. |
POST /opt/api/v1/htsingest/timeseries | Uploads time series for the specified entity. |
POST/opt/api/v1/htsingest/timeseries/bulk | Uploads time series for the specified entity in bulk. |
POST /opt/api/v1/htsingest/timeseries/{resid} | Uploads time series for a specified resource ID. |
Recommendation endpoints
URL to access: https://
<host name>/opt/api/optimizer/openapi.yaml
This table lists the endpoints for recommendation
API endpoint | Description |
---|---|
GET/opt/api/optimizer/about | Returns the status of the recommendation service. |
POST/opt/api/v1/optimizer/recommendations | Generates recommendations. |
POST/opt/api/v1/optimizer/rules/process | Processes the rules. |
GET/opt/api/v1/optimizer/recommendations/entities/{entity_id} | Retrieves the recommendations that are generated for a specific entity. |
POST/opt/api/v1/optimizer/recommendations/search | Returns the recommendations that match the search criteria. |
Simulation endpoints
URL to access: https://
<host name>/opt/api/simulation/openapi.yaml
This table lists the endpoints for What-if simulation.
API endpoint | Description |
---|---|
POST /opt/api/v1/simulation/whatif/execute | Executes a what-if simulation. |
POST /opt/api/v1/simulation/whatif/data | Executes the what-if simulation for an entity and returns the series data. |
POST /opt/api/v1/simulation/whatif/simulations | Saves the simulation. |
GET/opt/api/v1/simulation/whatif/simulations/{id} | Retrieves the saved simulation for the specified ID. |
Data Provider endpoints
https://<host name>/openapi/datamart
https://<host name>//openapi/view
The table lists the endpoints for data mart and view definition:
API endpoint | Description |
---|---|
Endpoints for Data mart | |
GET/opt/api/datamarts/about | Status of the datamart service. |
GET/opt/api/v1/datamartservice/datamarts | Retrieves the list of data mart definitions according to the specified ownership. |
POST /opt/api/v1/datamartservice/datamarts/{erid}/data | Creates a datamart with data for the specified datamart ID. |
GET/opt/api/v1/datamartservice/datamarts/{erid}/metadata | Retrieves the list of data marts for the specific datamart ID. |
POST /opt/api/v1/datamartservice/datamarts/exports/excel | Exports the data marts to Excel. |
POST /opt/api/v1/datamartservice/datamarts/{erid}/aggregatedata | Creates a datamart with aggregated data for the specified datamart ID. |
POST /opt/api/v1/datamartservice/datamarts/{erid} | Creates a datamart for the specified datamart ID. |
POST /opt/api/v1/datamartservice/datamarts/{erid}/filters/{filtername} | Creates a datamart for the specified filter name. |
Endpoints for View definition | |
GET/opt/api/v1/viewdefinition/view | Retrieves a list of all capacity views in BMC Helix Continuous Optimization. |
GET/opt/api/v1/viewdefinition/view/{viewid}/export | Exports the configuration of the selected view in file format (.viewpkg). |
POST | Imports a capacity view from another environment. The request includes the name of the export file in the format: <view name_date of export>.viewpkg. |
Pricing endpoints
https://<host name>/openapi/pricing
This table lists the endpoints for pricing.
API endpoint | Description |
---|---|
Endpoints for AWS Reserved Price Controller | |
GET /api/about | Retrieves the status of the Pricing service. |
GET /api/v1/providers/1/regions/{region_code}/reserved_instance | Returns the on-demand and effective hourly rate for standard EC2 reserved instances. |
GET/api/v1/providers/1/ri_eligible_hours | Retrieves the eligible usage hours for AWS reserved instances. |
GET /api/v1/providers/1/ri_normalization_factors | Retrieves the normalization factors for reserved instances for a specific provider. |
GET /api/v1/providers/1/sku_os_map | Retrieves the SKU to OS mappings. |
Endpoint for Instances Size Pricing | |
GET /api/v1/providers/{providerid}/regions/{region_code}/instance_size/{instance_type} | Retrieves the instances size for a specific instance type. |
Endpoints for Instances Pricing Controller | |
GET/api/v1/providers/{providerid}/regions/{region_code}/cheapest_instance | Retrieves the cheapest compute and storage instances in a specific region that matches the given resources. |
GET /api/v1/providers/{providerid}/regions/{region_code}/instance_families | Retrieves the available instance families for a specific provider within a region. |
GET /api/v1/providers/{providerid}/regions/{region_code}/instance_types | Retrieves a list of instance types for a specific provider within a region. |
GET/api/v1/providers/{providerid}/regions/{region_code}/instance_types/{instance_type_id} | Retrieves the 30 days instance type price for a monthly usage on-demand and for each reservation period (1 year, 3 years) where reservation payment option is standard, All, Upfront. |
GET /api/v1/providers/{providerid}/regions/{region_code}/instance_types/{instance_type_id}/license_types | Retrieves the list of license types available for a specific instance type within a region. |
Endpoint for License Types Pricing | |
GET /api/v1/providers/{providerid}/license_type | Retrieves a license type that matches either a list of SKUs or a product description. |
Endpoint for Normalization Factors Pricing | |
GET/api/v1/providers/{providerid}/normalization_factors | Retrieves the compute normalization factors for a specific provider for all the instance types. |
Endpoints for regions | |
GET/api/v1/providers/{providerid}/default_region | Retrieves the default region for the specified provider. |
GET /api/v1/providers/{providerid}/regions | Retrieves the available regions for the specified provider. |
GET /api/v1/providers/{providerid}/regions/{region_code} | Retrieves the details of a region for the specified provider. |
Endpoint for Simulation Pricing | |
POST/api/v1/simulation | Retrieves the cheapest compute and storage instances in a specific region that matches the given resources. |
Endpoints for Storage Pricing | |
GET/api/v1/providers/{providerid}/regions/{region_code}/storage_types | Retrieves the storage types for the specified provider ID and the region code. |
GET/api/v1/providers/{providerid}/regions/{region_code}/storage_types/{storage_id} | Retrieves the storage types for the specified provider ID, region code, and storage ID. |
POST /api/v1/providers/{providerid}/regions/{region_code}/storage_types/{storage_id}/cost | Retrieves the 30 days cost for the specified storage type. |
GET/api/v1/providers/{providerid}/storage/default_transaction_units | Retrieves the default transaction units for the specified provider. |
Backend Control API
The Backend Control API enables you to remotely manage and control the interactions with the backend components of BMC Helix Continuous Optimization.
Comments
Log in or register to comment.