Querying Configurations
Function
This API is used to query configurations in the configuration center.
URI
GET /v3/{project_id}/configuration/items
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Fixed value: default. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
dimensionsInfo |
String |
Yes |
Service information, which consists of the service name (mandatory), application (mandatory), and version (optional). The combination format is as follows (note that @ and # must be escaped when being added to the HTTP URL. @ is escaped to %40, and # is escaped to %23): {serviceName}@{appId}#{version} or {serviceName}@{appId} The value cannot contain spaces or the following special characters: $%^&+/\ |
keyFilter |
String |
No |
key filter criteria. A regular expression is supported. If special characters are contained, escape them. |
revision |
String |
No |
Version of a configuration item. 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. |
Request
Request parameters
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
x-environment |
String |
No |
Environment whose configurations need to be queried. Value: development, testing, acceptance, or production. Other values are regarded as null. |
Response
Response parameters
Table 4 describes the parameters. (If the input revision value is the same as the current revision value, no response message is returned.)
Example
Example request
GET /v3/default/configuration/items?dimensionsInfo=service%40app%231.0.0
Example response
{ "service@app": { "k1": "v1" }, "service@app#1.0.0": { "k2": "v2" } }
Status Code
See Status Codes.
Error Code
See CSE Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot