Cost & Assets Management Platform (CAM)
contains sets of APIs that you can use to work with Generic Provider Data (GPD) files, providers, Dynamic Resource Groups, reports and budgets.
CAM supports the following APIs:
To access the APIs, click your
User
icon in the top-left of the Kyndryl Modern Operations Applications page and select
Developer Console
. For the application select
ecam
GPD upload
Users authorized to set up providers and upload files can manually upload GPD files so that CAM can analyze any provider's files. The purpose of the GPD upload APIs is to enable these authorized users to upload the GPD files.
“
GET /api/ecam/v1/gpd - To return a list of uploaded GPD files
POST /api/ecam/v1/gpd - To start the GPD file upload
POST /api/ecam/v1/gpd/enrich - To start enrichment for the uploaded GPD file
POST /api/ecam/v1/gpd/retry - To retry validation for an uploaded GPD file
POST /api/ecam/v1/gpd/cleanup - To clean up the uploaded GPD file
”
Returns a list of uploaded GPD files.
Query parameters
Name | Required | Description | Type | Sample values |
providername | Yes | Provider Name for which GPD is being uploaded | String | |
Response
200: List of uploaded GPD files
Starts the GPD file upload.
Query parameters
Name | Required | Description | Type | Sample values |
providername | Yes | Provider name for which GPD is being uploaded | string | |
Response
202: GPD Upload submitted successfully. Returns GPD upload reference Id.
Starts enrichment for the uploaded GPD file.
Example value
{
"GPDUploadRefId": [
"123"
],
"provider": [
"aws"
],
"retry": "true"
}
Response
200: Enrichment started successfully
400: Uploaded file is not ready to be enriched. Please wait
500: Failed to start enrichment
Retries the validation for an uploaded GPD file.
Example value
/api/ecam/v1/gpd/retry
Cleans up the uploaded GPD file.
Query parameters
Name | Required | Description | Type | Sample values |
providername | Yes | Provider name for which GPD is being cleaned | string | |
Example value
{
"GPDUploadRefId": "string"
}
Response
200: Clean up started successfully
500: Failed to cleanup GPD data
Uploading specific raw data to create GPD files
Users can customize GPD data that is required to be shown by adding API information:
Check the connection to the tenant
/api/ecam/extensions/test
Response
200 Lists the profile id of the user
500 Internal server error
Create a signed URL to the AWS S3 to upload the extension file
/api/ecam/extensions/S3ExtensionRepo
Query Parameters
Filename: name_of_the_extensionFile_to_be_uploaded
ProviderCode: providerName
Response
200 Returns the preSignedUrl to upload the extension file to AWS S3
500 Internal server error
Upload the compressed extension file.
This is the same API received in the response of the POST API above.
QueryParams
Request payload: Select type as Binary and upload the required extension file
Response
500 Internal server error
Validate the uploaded extension file
/api/ecam/extensions/S3ExtensionRepo/validate
QueryParams
Filename = name_of_the_extensionFile_to_be_uploaded ProviderCode = providerName
Response
200 Returns the validation result
500 Internal server error
Create a signed URL to the AWS S3 to upload the compressed raw data file
/api/ecam/extensions/S3InputHandler
Query parameters
Filename: name_of_the_rawData_to_be_uploaded>
ProviderCode: providerName
Response
200: Returns the preSignedUrl to upload the raw data file to AWS S3
500: Internal server error
Upload the compressed raw data file.
This is the same API received in the response of the POST API above.
QueryParams
Auto-populated Request payload – Select type as Binary and upload the required raw data zip file
Response
500 Internal server error
To expand the contents of the compressed raw data file
/api/ecam/extensions/notify/S3InputHandler
Query Params
Filename: name_of_the_rawData_to_be_uploaded
ProviderCode: providerName
Response
500: Internal server error
To transform the raw data into GPD format
/api/ecam/extensions/flow
QueryParams
Request payload – { “vars”: {“providerCode”:” ”}}
Response
200 Returns the status and message along with the transformation job id
500 Internal server error
To list all the files (uploaded and transformed) on the S3 repository
/api/ecam/extensions/data/list
To delete any file on the S3 repository
/api/ecam/extensions/data/delete
Query Parameters
List of files to be deleted in the below format (The key and size can be obtained from the List API mentioned above [ {“key” : “ ”, “Size”:” ”} ]
Response
200 Returns the status along with count of files deleted
500 Internal server error
To download/view any file on the S3 repository
/api/ecam/extensions/data/download
Response
200 Returns the file contents
500 Internal server error
Currency
The purpose of the currency APIs is to allow you to view the corporate currency set in Core. You must use Core APIs to set the corporate currency.
“
GET /api/ecam/v1/currency/instanceCurrencies - To return the instance currency from Core
GET /api/ecam/v1/currency/defaultCurrency - To return the default currency from Core
”
/api/ecam/v1/currency/instanceCurrencies
Returns the instance currency from CORE.
Response
200: Get instance currency from core
/api/ecam/v1/currency/defaultCurrency
Returns the default currency from CORE.
Response
200: Get Default currency from core
/api/ecam/v1/providermetadata/service_categories
Returns the service category mapping.
Query parameters
Name | Required | Description | Type | Sample values |
providerName | Yes | Provider Name of the service category mapping entry | string | |
assetType | No | Asset Type of the service category mapping entry. If empty, returns a list of service categories for given providerName | string | |
/api/ecam/v1/providermetadata/service_categories
Adds a new service category mapping.
Query parameters
Name | Required | Description | Type | Sample values |
providerName | Yes | Provider Name of the service category mapping entry | string | |
Example value
[
{
"providerName": "string",
"serviceCategory": "string",
"assetType": "string"
}
]
/api/ecam/v1/providermetadata/service_categories
Updates the service category mapping.
Query parameters
Name | Required | Description | Type | Sample values |
providerName | Yes | Provider Name of the service category mapping entry | string | |
Example value
{
"serviceCategory": "string"
}
/api/ecam/v1/providermetadata/locations
Returns the location mapping.
Query parameters
Name | Required | Description | Type | Sample values |
providerName | No | Provider Name of the service category mapping entry | string | |
assetType | No | Asset Type of the service category mapping entry. If empty, returns a list of service categories for given providerName | string | |
/api/ecam/v1/providermetadata/locations
Adds a new location mapping.
Query parameters
Name | Required | Description | Type | Sample values |
providerName | No | Provider Name of the location mapping entry | string | |
Example value
[
{
"providerName": "string",
"dataCenter": "string",
"providerRegionCode": "string",
"url": "string",
"region": "string",
"subregion": "string",
"location": "string",
"state": "string",
"country": "string"
}
]
/api/ecam/v1/providermetadata/locations
Updates the location mapping.
Query parameters
Name | Required | Description | Type | Sample values |
providerName | Yes | Provider Name of the location mapping entry | string | |
providerRegionCode | No | Provider Region Code of the location mapping entry. If empty, returns a list of locations for given providerName | string | |
Example value
{
"dataCenter": "string",
"url": "string",
"region": "string",
"subregion": "string",
"location": "string",
"state": "string",
"country": "string"
}
Migration
The purpose of the migration APIs is to enable the user to work with accounts.
“
GET /api/ecam/v1/migrationController/accounts/status - To return a list of account records
POST /api/ecam/v1/migrationController/accounts/ - To initiate ingestion on the accounts
”
/api/ecam/v1/migrationController/accounts/status
Returns a list of account records.
Query parameters
Name | Required | Description | Type | Sample values |
Response
200: List of records both succeeded and failed
/api/ecam/v1/migrationController/accounts/
To initiate ingestion on the accounts.
Example value
{
"apiToken": "xsxxxx",
"userName": "xxxx",
"bcamURL": "https://xx/xx"
}
Dynamic Resource Groups
With Dynamic Resource Groups, you can find cost and asset resources and tag them for inclusion in a group. The purpose of the Dynamic Resource Group APIs is to enable the user to work with Dynamic Resource Groups.
“
GET /api/ecam/v1/dynamicResourceGroups - To return a list of all Dynamic Resource Groups
POST /api/ecam/v1/dynamicResourceGroups - To create Dynamic Resource Groups
PUT /api/ecam/v1/dynamicResourceGroups - To update a Dynamic Resource Group
PATCH /api/ecam/v1/dynamicResourceGroups - To update a Dynamic Resource Group
DELETE /api/ecam/v1/dynamicResourceGroups/{id} - To delete a Dynamic Resource Group
”
/api/ecam/v1/dynamicResourceGroups
Returns a list of all Dynamic Resource Groups.
Response
200: Operation successful
204: No authorized Dynamic Resource Groups found
/api/ecam/v1/dynamicResourceGroups
Creates Dynamic Resource Groups.
Example value
{
"_id": "VTag",
"type": "visibility",
"version": "1",
"expr": "((providerName==\"aws\")&&(billingAccountName==\"1234\")&&(assetAccountId==\"1234\")&&(category==\"Compute\"))",
"context": {
"department": [
"HR"
]
}
}
/api/ecam/v1/dynamicResourceGroups
Updates a Dynamic Resource Group.
Example value
{
"_id": "VTag",
"type": "visibility",
"version": 1,
"expr": "((providerName==\"aws\")&&(billingAccountName==\"1234\")&&(assetAccountId==\"1234\")&&(category==\"Compute\"))",
"context": {
"department": [
"HR"
]
}
}
PATCH
/api/ecam/v1/dynamicResourceGroups
Updates a Dynamic Resource Group.
Example value
{
"_id": "VTag",
"type": "visibility",
"version": 1,
"expr": "((providerName==\"aws\")&&(billingAccountName==\"1234\")&&(assetAccountId==\"1234\")&&(category==\"Compute\"))",
"context": {
"department": [
"HR"
]
}
}
/api/ecam/v1/dynamicResourceGroups/{id}
Deletes a Dynamic Resource Group.
Query parameters
Name | Required | Description | Type | Sample values |
Response
200: Operation successful
Report models
The purpose of the report model APIs is to enable users to persist data that has been filtered and sorted from all the data to which a user has access.
“
GET /api/ecam/v1/reportModels/{reportModelID}/execution - To run a report model
GET /api/ecam/v1/reportModels - To return a list of all report models
GET /api/ecam/v1/reportModels/{reportModelID} - To return a list of all report model IDs
POST /api/ecam/v1/reportModels/{reportModelID} - To create a report model
PUT /api/ecam/v1/reportModels/{reportModelID} - To delete and replace a specific report model
PATCH /api/ecam/v1/reportModels/{reportModelID} - To delete and replace a specific report model
DELETE /api/ecam/v1/reportModels/{reportModelID} - To delete a specific report model
”
/api/ecam/v1/reportModels/{reportModelID}/execution
Query parameters
Name | Required | Description | Type | Sample values |
Response
200: Successful operation
400: Invalid request errors
/api/ecam/v1/reportModels
Returns a list of all report models.
Response
200: Successful operation
/api/ecam/v1/reportModels/{reportModelID}
Returns a list of all report model IDs.
Query parameters
Name | Required | Description | Type | Sample values |
reportModelId | Yes | ID for report model | string | |
Response
200: Successful operation
400: Invalid request errors
/api/ecam/v1/reportModels/{reportModelID}
Query parameters
Name | Required | Description | Type | Sample values |
reportModelId | Yes | ID for report model | string | |
templateId | Yes | ID for template | string | |
Example value
{
"append": true,
"type": "v1",
"vtags": [
"SonyVtag"
],
"expr": "(period == 201911) && (providerName == \"aws\") && $tag(\"allTags\",cmapplication == \"sonyapp\")"
}
Response
200: Successful operation
400: Invalid request errors
/api/ecam/v1/reportModels/{reportModelID}
Deletes and replaces a specific report model.
Query parameters
Name | Required | Description | Type | Sample values |
reportModelId | Yes | ID of report model | string | |
Example value
{
"append": true,
"type": "v1",
"scope": "public",
"vtags": [
"SonyVtag"
],
"expr": "(period == 201911) && (providerName == \"aws\") && $tag(\"allTags\",cmapplication == \"sonyapp\")"
}
Response
200: Successful operation
400: Invalid request errors
/api/ecam/v1/reportModels/{reportModelID}
Deletes and replaces a specific report model.
Query parameters
Name | Required | Description | Type | Sample values |
reportModelId | Yes | ID for report model | string | |
Example value
{
"append": true,
"type": "v1",
"scope": "public",
"vtags": [
"SonyVtag"
],
"expr": "(period == 201911) && (providerName == \"aws\") && $tag(\"allTags\",cmapplication == \"sonyapp\")"
}
Response
200: Successful operation
400: Invalid request errors
/api/ecam/v1/reportModels/{reportModelID}
Deletes a specific report model.
Query parameters
Name | Required | Description | Type | Sample values |
Response
200: Successful operation
400: Invalid request Data
Budgets
Budgetary units and budgets are features in Kyndryl Modern Operations Applications allows you to help track financial outlays and maintain financial control of the services that your customers provision. The purpose of the budget API is to enable users to work with budgets and budgetary units.
“
GET /api/ecam/v1/budgetController/budgetaryUnits - To return the budget aggregation amount per period
”
/api/ecam/v1/budgetController/budgetaryUnits
Returns the budget aggregation amount per period.
Response
200: Budget aggregation amount per period
204: No budgets available
Object Storage
It will create/list provider(s) for Object storage.
/api/ecam/v1/providers/object-storage
Example value
{
"providerName": "providername",
"providerCode": "providername"
}
/api/ecam/v1/providers/object-storage/:
Will return specific provider
Housekeeping
Cleans up the temporary collections
/orc/ecam/v1/housekeeping/clean
Cleans up all enriched data
/orc/ecam/v1/housekeeping/cleanupoutdateddata
Cleans up data older than period limit
Ingestion
/api/ecam/v1/enrichmentController/ingestion
Start orchestartor from job service
/api/ecam/v1/enrichmentController/ingestion/retry
Retry failed injestion job
/api/ecam/v1/enrichmentController/jobs/terminate
Terminates the running ingestion job
/api/ecam/v2/enrichmentController/ingestion
consolidate ingestion api
/api/ecam/v1/dataManagement
/api/ecam/v1/dataManagement
Get all deletion requests
/api/ecam/v1/dataManagement/{id}
/api/ecam/v1/dataManagement /accounts
/api/ecam/v1/dataManagement/filters
ECAM Wrapper API Feature Flag
Wrapper to POST API of /core/featureflagmanagement/v1/featureflag to create feature flag. Payload -
{ "
configurationkey
": "
COSAMetering
", "
configurationvalue
": "true/false" }
Response
Return the same response as returned by the CORE API.
/api/ecam/v1/featureflag Wrapper to GET API of /core/featureflagmanagement/v1/featureflag to get all the feature flags.
Response
Return the same response as returned by the CORE API.
Wrapper API to PUT API of /core/featureflagmanagement/v1/featureflag/{configurationKey}
{ "
configurationkey
": "
COSAMetering
", "
configurationvalue
": "true/false" }
Response:
Return the same response as returned by the CORE API.
Common Discovery Feature Flag
To set up Common Discovery tenant, go to
Tenant Manager
and click
Edit Tenant
. Then, select
Common Discovery
.
Then, click the Feature & Logging Flags for all the providers( AWS, Azure, GCP, IBMCloud, Alicloud and its metrics) under the
Feature Flag
sections in tenant manager and then click
Apply Flags
. If the flags are not enabled, data will not be ingested.
Submit the Update the Tenant Request.
Set the
COMMON_DISCOVERY
Feature Flag to
true
in
cb-core-configuration-service
in Swagger.
/core/featureflagmanagement/v1/featureflag
Use the following payload to the feature flag:
{ "flag_key": "COMMON_DISCOVERY", "flag_value": "true" }
(To check available entries)
/core/configuration/v1/configvalues/SUPPORTED_CD_PROVIDERS
/core/configuration/v1/configvalues
Use the following payload for the feature flag:
{
"configurationkey": "SUPPORTED_CD_PROVIDERS",
"configurationvalue": [
"alicloud",
"aws",
"gcp",
"azure",
"ibmcloud"
]
}
CAM Insights Feature Flag
To set up the Feature Flag, navigate to the
Developer Console
page from the
Main Menu
, located at the top right of your Kyndryl Modern Operations Applications
A new window displays. Select
CORE
application and then, on Service, select
cb-core-configuration-service
POST
/core/featureflagmanagement/v1/featureflag under Feature Flag Management section to Add the Feature Flag.
Payload
Use the following payload to the feature flag:
{ "flag_key": "BCM_3243_InsightsNewLayout", "flag_value": "true" }