Updated on 2023-11-08 GMT+08:00

Querying the Configuration List

Function

This API is used to query the configuration list in the configuration center.

URI

GET /v1/{project_id}/kie/kv

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Fixed value: default.

Request

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

Authorization

No

String

This parameter is mandatory if security authentication is enabled for an exclusive ServiceComb engine. Otherwise, this parameter is not required.

The token of an exclusive ServiceComb engine with security authentication enabled is in the following format:

Authorization:Bearer {Token}

For details about how to obtain the token, see Obtaining the User Token of an Exclusive ServiceComb Engine.

Table 3 Query parameters

Parameter

Mandatory

Type

Description

label

No

String

Exports data filtered by label. The format is {Label key}:{Label value}.

match

No

String

Matching option of the filtered items. Value exact indicates exact matching, including the same number of labels. If the value is null, inclusive matching is used.

revision

No

Integer

Configuration version number

This parameter is used to determine the difference between the local cache configuration and the configuration in the configuration center.

  • Input 0 for the first time.
  • If the input revision value is the same as the current revision value, status code 304 is returned, but no body is returned. If they are inconsistent, both revision values are returned.
  • If revision is required in the next request, use the value of update_revision in the response body.

Response

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Number of query results.

data

List<SingleKieInfo>

List of queried kie.

Table 5 SingleKieInfo

Parameter

Type

Description

id

String

Configuration ID.

key

String

Configuration key.

value

String

Configuration value.

value_type

String

Type of the configuration value.

status

String

Configuration status.

create_time

String

Time when the configuration is created.

update_time

String

Time when the configuration is updated.

labels

Map<String,String>

Configuration labels.

create_revision

Integer

Created version number of the configuration.

update_revision

Integer

Updated version number of the configuration.

Status code: 304

None

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_message

String

Error message.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_message

String

Error message.

Example Request

Query the configuration list.

GET https://{endpoint}/v1/{project_id}/kie/kv

Example Response

Status code: 200

Successfully queried.
{   
    "total": 1,   
    "data":[{   
        "id": "8a9e6a5d-8d65-48fb-a40c-5150c8479da8",   
        "key": "string",   
        "labels": {     
            "key1": "value1",
            "key2": "value2"
        },   
        "value": "string",   
        "value_type": "text",   
        "status": "enabled",   
        "create_time": 1623139038,   
        "update_time": 1623139038,
        "create_revision": 13,
        "update_revision": 13
    }]
}

Status Code

Status Code

Description

200

OK

304

Not Modified

400

Bad Request

500

Internal Server Error

Error Code

See ServiceComb Error Codes.