Exporting kie Configurations
Function
This API is used to export kie configurations.
URI
POST /v1/{project_id}/kie/download
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID, which must be unique. The value contains 1 to 64 characters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
label |
No |
String |
Export data filtered by label. Format: {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. Enumerated value:
|
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
X-Enterprise-Project-ID |
No |
String |
If this parameter is not set, the default enterprise project is default and the ID is 0. Default value: 0 |
Content-Type |
Yes |
String |
Set it to application/json;charset=UTF-8. |
Accept |
Yes |
String |
Set it to application/json. |
x_engine_id |
Yes |
String |
ID of an exclusive microservice engine. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
ids |
Yes |
Array of strings |
Set of configuration item IDs. |
Response
Status code: 200
Parameter |
Type |
Description |
---|---|---|
metadata |
metadata object |
Description of the exported file. |
data |
Array of CreateKieReq objects |
List of exported configuration items. |
Parameter |
Type |
Description |
---|---|---|
version |
String |
Version number of the exported data. |
annotations |
Object |
Other information about the exported file. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
ID of a configuration item. |
key |
String |
Key of a configuration item. Default value: $random(6)-$date(yyyy-MM-dd-HH-mm-ss) |
labels |
Object |
Label of a configuration item. |
value |
String |
Value of a configuration item. Default value: $random(20) |
value_type |
String |
Type of a configuration item value. Default value: text |
status |
String |
Status of a configuration item. Default value: enabled |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
detail |
String |
Location details. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
detail |
String |
Location details. |
Example Request
POST https://{endpoint}/v3/{project_id}/kie/download}/jobs/{job_id} { "ids" : [ "8a9e6a5d-8d65-48fb-a40c-5150c8479da8", "8a9e6a5d-8d65-48fb-a40c-5150c8479da8" ] }
Example Response
Status code: 200
Content of the exported file. The file is named based on the value of the environment label. For label=environment:development, the file name is development+timestamp.json. For label=environment:, the file name is default+timestamp.json. If there are no or multiple environments, the file name is custom+timestamp.json.
{ "metadata" : { "version" : "1.0.0", "annotations" : { } }, "data" : [ { "id" : "46f9ae5f0d36c438d5d70392b42a2a1072879e8f7e373af4c021d1155bb5c4ac", "key" : "$random(6)-$date(yyyy-MM-dd-HH-mm-ss)", "labels" : { "key" : "value" }, "value" : "$random(20)", "value_type" : "text", "status" : "enabled" } ] }
Status Code
Status Code |
Description |
---|---|
200 |
Content of the exported file. The file is named based on the value of the environment label. For label=environment:development, the file name is development+timestamp.json. For label=environment:, the file name is default+timestamp.json. If there are no or multiple environments, the file name is custom+timestamp.json. |
400 |
Bad Request |
500 |
Internal Server Error |
Error Code
See 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