Enable/Disable Resources in a Blueprint
API recipe to enable or disable Facets resources at the blueprint level with a PUT request, toggling the disabled flag by stackName for each resource.
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 PUT request to update the status of the resource in a Blueprint.
https://{YOUR_CP_URL}/cc-ui/v1/designer/{stackName}/resource-enable-disable- This API endpoint has one path parameter,
stackName.
Path parameters
stackNameparameter of typeStringis the name of the Blueprint.
Body parameters
resourceNameandresourceTypeare the parameter of typeString.directoryparameter of typeStringis the path of the resource within the Blueprint, for exampleservice/instances.filenameparameter of typeStringis the name of the resource definition file, for exampleaws-crit.json.- Locate the
disabled: trueparameter and set the value totrueorfalse.
Note: Setting disabled to true will disable the resource, while setting it to false will enable the resource.
[
{
"disabled": true,
"resourceName": "string",
"resourceType": "string",
"directory": "string",
"filename": "string"
}
][
{
"disabled": true,
"resourceName": "aws-crit",
"resourceType": "service",
"directory": "service/instances",
"filename": "aws-crit.json"
},
{
"disabled": false,
"resourceName": "default",
"resourceType": "postgres",
"directory": "postgres/instances",
"filename": "default.json"
}
]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.
Bulk Enable/Disable Resources
API recipe to enable or disable multiple Facets resources in bulk, either across an environment by clusterId or across a blueprint by stackName.
Enable/Disable Resources in an Environment
API recipe to enable or disable Facets resources in a specific environment with a PUT request, toggling the disabled flag by clusterId for each resource.