Exporting Configurations
Function
This API is used to export configurations from the configuration management center.
- This API applies to microservice engine 2.x.
- Replace {Endpoint} with the endpoint in the request URI. For details, see Calling APIs.
URI
POST /v1/{project_id}/kie/download
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant sub-project ID, which must be unique. The value contains 1 to 64 characters. See Obtaining a Project ID. |
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. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
x-engine-id |
Yes |
String |
ID of the engine whose configuration is to be downloaded. See Querying the Exclusive Microservice Engine List. |
X-Enterprise-Project-ID |
No |
String |
Enterprise project ID. If this parameter is not set, the default enterprise project is default and the ID is 0. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
ids |
Yes |
List<String> |
ID list of the configuration items to be exported. See Querying the Configuration List. When ids is empty, this API is called to export all configuration items. |
Response
Status code: 200
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
metadata |
No |
Additional information about a configuration item. |
|
data |
Yes |
List<KVCreateBody> |
List of configuration items to be created. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
Configuration ID. |
key |
Yes |
String |
Configuration key. |
value |
No |
String |
Configuration value. |
labels |
No |
Map<String,String> |
Configuration labels. |
status |
No |
String |
Configuration status. |
value_type |
No |
String |
Type of the configuration value. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
version |
No |
String |
Version information. |
annotations |
No |
Object |
Additional information about a configuration item. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_message |
String |
Error message. |
detail |
String |
Location details. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_message |
String |
Error message. |
detail |
String |
Location details. |
Example Request
Export the configuration whose ID is 0bdfddb8-c4f9-4a88-8360-07a8a616a804.
POST https://{endpoint}/v1/{project_id}/kie/download { "ids":[ "0bdfddb8-c4f9-4a88-8360-07a8a616a804" ] }
Example Response
Successfully queried.
{ "metadata": { "version": "2.0.0" }, "data": [ { "id": "0bdfddb8-c4f9-4a88-8360-07a8a616a804", "key": "2", "labels": { "2": "2" }, "value": "2", "status": "enabled", "value_type": "text" }, { "id": "34befef9-7f3a-4394-85f9-142622a11b1d", "key": "1", "labels": { "1": "1" }, "value": "1", "status": "enabled", "value_type": "text" } ] }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
500 |
Internal Server Error |
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