# How To Modify Cluster Properties Using API Calls.

## Problem

At times there will be requirements to edit clusters properties which are supported \[listed below] via API calls:

`customAmi, numSpotWorkers, numMaxSpotWorkers, numWorkers, numMinWorkers, numMaxWorkers, spotPrice, spotWorkerFlavor, tags, etcdBackup, enableProfileAgent, enableCatapultMonitoring.`

## Environment

* Platform9 Managed Kubernetes - v5.5 and Higher.

## Procedure

**Syntax**: The syntax for the API call to update the cluster property is shown below:

{% tabs %}
{% tab title="Syntax" %}

```javascript
curl --request PUT --url https://<FQDN>/qbert/v4/<PROJECT_UUID>/clusters/<CLUSTER_UUID>  --header "X-Auth-Token: $TOKEN" --header "content-type: application/json" --data '{"<CLUSTER_PROPERTY>":"<VALUE>"}'
```

{% endtab %}
{% endtabs %}

**Example**: Here the API call will modify the `numMinWorkers` value to 5 for the cluster UUID `664afad3-ff7c-4184-bbaa-452622fe1f3b` in tenant/project UUID `d6af700ab0c848dbae1108309a7871ee` is shown below:

{% tabs %}
{% tab title="Example" %}

```javascript
curl --request PUT --url https://test.platform9.horse/qbert/v4/d6af700ab0c848dbae1108309a7871ee/clusters/664afad3-ff7c-4184-bbaa-452622fe1f3b --header "X-Auth-Token: $TOKEN" --header "content-type: application/json"  --data '{"numMinWorkers": 5 }'
OK#
```

{% endtab %}
{% endtabs %}

## Additional Information

{% hint style="info" %}
**Info**

It is very important to note that the type of value passed for each cluster property is crucial, the **numSpotWorkers**, **numMaxSpotWorkers**, **numWorkers**, **numMinWorkers**, **numMaxWorkers** are expected to have **integer** value \[**without** double quotes\*\*" "\*\*], for other properties, the values has to be mentioned as **strings** \[**within** double quotes **" "**].
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmk/how-to/how-to-modify-cluster-properties-using-api-calls.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
