# Dynamic Configuration

## Get

<mark style="color:blue;">`GET`</mark> `/values`

#### Query Parameters

| Name | Type      | Description                         |
| ---- | --------- | ----------------------------------- |
| keys | String\[] | Configuration key, empty return all |

{% tabs %}
{% tab title="200: OK " %}
```
- Body `object` Configurations
```
{% endtab %}

{% tab title="400: Bad Request " %}
```
- Body
    - **message** `string`
```
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Simple" %}
```http
GET /values HTTP/1.1
Host: api-x.kainonly.com:8443

# Response

HTTP/1.1 200 OK
Alt-Svc: h3=":8443"; ma=2592000,h3-29=":8443"; ma=2592000
Server: hertz

{"Cloud":"tencent",...,"TencentSecretKey":"*"}
```
{% endtab %}

{% tab title="Specify Key" %}
```http
GET /values?keys=IpLoginFailures&keys=LoginFailures HTTP/1.1
Host: api-x.kainonly.com:8443

# Response

HTTP/1.1 200 OK
Alt-Svc: h3=":8443"; ma=2592000,h3-29=":8443"; ma=2592000
Server: hertz

{"IpLoginFailures":10,"LoginFailures":5}
```
{% endtab %}
{% endtabs %}

## Set

<mark style="color:purple;">`PATCH`</mark> `/values`

#### Request Body

| Name                                     | Type   | Description   |
| ---------------------------------------- | ------ | ------------- |
| update<mark style="color:red;">\*</mark> | Object | keyValue data |

{% tabs %}
{% tab title="204: No Content " %}

{% endtab %}

{% tab title="400: Bad Request " %}
```
- Body
    - **message** `string`
```
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Simple" %}
```http
PATCH /values HTTP/1.1
Host: api-x.kainonly.com:8443
Content-Type: application/json

{
    "update": {
        "mytest": "hi"
    }
}

# Response

HTTP/1.1 204 No Content
Alt-Svc: h3=":8443"; ma=2592000,h3-29=":8443"; ma=2592000
Server: hertz
```
{% endtab %}
{% endtabs %}

## Remove

<mark style="color:red;">`DELETE`</mark> `/values/:key`

#### Path Parameters

| Name                                  | Type   | Description       |
| ------------------------------------- | ------ | ----------------- |
| key<mark style="color:red;">\*</mark> | String | Configuration key |

{% tabs %}
{% tab title="204: No Content " %}

{% endtab %}

{% tab title="400: Bad Request " %}
```
- Body
  - **message** `string`
```
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Simple" %}
```http
DELETE /values/mytest HTTP/1.1
Host: api-x.kainonly.com:8443

# Response

HTTP/1.1 204 No Content
Alt-Svc: h3=":8443"; ma=2592000,h3-29=":8443"; ma=2592000
Server: hertz
```
{% endtab %}
{% endtabs %}
