Update a Resource
API recipe to update an existing resource in a Facets blueprint branch with a PUT request, replacing its JSON content by directory, filename, and type.
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.
Note: If any changes are made to the remote Git repository, please utilize the 'Get Blueprint Resources' API to synchronize and incorporate all the modifications.
API Endpoint
This API processes a PUT request to update the resource in the Blueprint.
https://{YOUR_CP_URL}/cc-ui/v1/designer/{stackName}/branch/{branch}- This API endpoint has two path parameter,
stackNameandbranch.
Path parameters
stackNameof typeStringis the name of the Blueprint.branchof typeStringis the name of the branch where the resource is located.
Body parameters
directory,filename,resourceNameandresourceTypeare variables of typeString.contentis an object that will takekey:valuepairs of typeString.
[
{
"content": {},
"directory": "string",
"filename": "string",
"resourceName": "string",
"resourceType": "string"
}
][
{
"content": {
"flavor": "default",
"metadata": {
"labels": {}
}
},
"directory": "service/instances",
"filename": "billing.json",
"resourceName": "billing",
"resourceType": "service"
}
]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.
Generate a Sample Request ➡️
Create a New Resource
API recipe to create a new resource in a Facets blueprint branch with a POST request, passing the resourceName and resourceType in the request body.
Get Blueprint Resources
API recipe to list every resource within a Facets blueprint branch using a GET request, syncing any changes from the linked Git repository.