Updated on 2025-04-25 GMT+08:00

Exporting kie Configurations

Function

This API is used to export kie configurations.

URI

POST /v1/{project_id}/kie/download

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which must be unique. The value contains 1 to 64 characters.

Table 2 Query parameters

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:

  • exact

Request

Table 3 Request header parameters

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.

Table 4 Request body parameter

Parameter

Mandatory

Type

Description

ids

Yes

Array of strings

Set of configuration item IDs.

Response

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

metadata

metadata object

Description of the exported file.

data

Array of CreateKieReq objects

List of exported configuration items.

Table 6 metadata

Parameter

Type

Description

version

String

Version number of the exported data.

annotations

Object

Other information about the exported file.

Table 7 CreateKieReq

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

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

detail

String

Location details.

Status code: 500

Table 9 Response body parameters

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.