Docs

Override Resource Definition in an Environment

API recipe: override resource definitions for a specific environment.

Your Control Plane URL will vary

The Control Plane URL, denoted as YOUR_CP_URL for this API reference document is https://facetsdemo.console.facets.cloud.
Replace that with the Control Plane URL unique to your account.

API Endpoint

This API processes a POST request to override current configuration for resources across an environment.

https://{YOUR_CP_URL}/cc-ui/v1/clusters/{clusterId}/resourceType/{resourceType}/resourceName/{resourceName}/overrides
  • This API endpoint has three path parameters: clusterId, resourceType, and resourceName.
  • There is also a body parameter, overrides.

Path parameters

  • clusterId of type String.
    This is the unique ID for the environment where you want to override values in a defined resource. You can find this ID in the Environment Overview screen in Facets UI.
  • resourceTypeof type String.
    This is the type of resource you want to override.
  • resourceNameof type String.
    This is the name of the resource you want to override.

️ Validate your API request

Ensure that the blueprint contains a defined resourceName.json file for the resource in the path resourceType/instances/resourceName where you want to override values.

Body parameters

overrides is an object that will take key:value pairs of type String.

  • The data in the overrides object will be merged with the existing definition in the resourceName.json file defined in the blueprint.
  • Ensure that thekey:value pairs match the keys and values in the resourceName.json file defined in the blueprint.
{
"overrides": {
   "key1": "value1",
   "key2": "value2"
}
}

To override cpuThreshold to 60 in application/instances/backend.json:

{
"overrides": {
   "cpuThreshold": "60"
}
}

Authenticate your API request

To learn more about how to generate a basic authentication token for use with Facets API requests, check Authentication Setup.

Facets API uses Basic Authentication.