Data Provider API


The Data Provider API uses Representational State Transfer (REST) web services that enable you to import and export a specific capacity view in the TrueSight Capacity Optimization Dashboard. You can integrate the API with your other business applications. 

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. For more information, see Adding and managing roles.
  • Valid user credentials or a bearer token is available for authentication. For more information, see  Accessing the public APIs.

API methods

The following table provides the details of the Data Provider API methods:

Method

URI pattern

Description

Required Activity

Sample response

GET

/v2/viewdefinition/view

Retrieve a list of all capacity views in the Helix Capacity Optimization Dashboard.

  • Read access to Capacity views API
  • Enable access to Data Provider API
Sample response

[

   {

      "domainFilter":true,
       "tagFilter":false,
       "timeFilter":true,
       "type":"view",
       "creationdate":"2017-03-16 09:19:09",
       "package":"[Custom]",
       "accessmod":0,
       "rbacEnabled":true,
       "accountid":0,
       "viewgroupname":"Corporate views",
       "tabs":[

         {

            "type":"page",
             "id":10518,
             "templateid":"enterpriseDataExplorer",
             "label":"Costs by target",
             "error":false

         },

         {

            "type":"page",
             "id":10519,
             "templateid":"enterpriseDataExplorer",
             "label":"Costs by service",
             "error":false

         },

         {

            "type":"page",
             "id":10520,
             "templateid":"enterpriseDataExplorer",
             "label":"Costs by chargeable item",
             "error":false

         }

      ],

      "home":10518,
       "fullscreen":[

    ],

      "domainFilters":{

         "default.domain":[      

]     

},
       "defaultDomainSelection":true,
       "domainFilterDisable":false,
       "id":1142,
       "label":"ABC Company",
       "label.key":"ABC Company",
       "href":"https://xxx.bmc.com:8280/dh-services/data-prv/v2/viewdefinition/view/1142",
       "ownership":1,
       "editable":true,
       "idparent":1008,
       "position":99

}

]

GET

/v2/viewdefinition/view/{viewid}
/export

Export the configuration of the selected view in file format (.viewpkg).

  • Write access to Capacity views API
  • Enable access to Data Provider API

<view name_date of export>.viewpkg file

POST


/v2/viewdefinition/view/import

Import a capacity view from another environment.

The request includes the name of the export file in the format: <view name_date of export>.viewpkg.

  • Write access to Capacity views API
  • Enable access to Data Provider API
Sample response

{

   "href":"https://xxx.bmc.com:8280/dh-services/data-prv/v2/viewdefinition/view/import",
    "viewid":8763,
    "path":"https://xxx.bmc.com:8280/dh-services/data-prv/v2/viewdefinition/view/8763",
    "importViewDetails":{

      "successfullyCompleted":true,
       "path":null,
       "viewdid":8763,
       "viewName":"ACME Business Details",
       "touchedDataMartByStatus":null,
       "backupName":"ACME Business Details_bak2"

  }

}

 

 

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

BMC TrueSight Capacity Optimization 20.02