Importing kie Configurations
Function
This API is used to import kie configurations.
Authorization Information
Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the permission listed below is required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependency
cse:config:upload
write
-
cse:config:modify
-
URI
POST /v1/{project_id}/kie/file
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 |
|---|---|---|---|
override | No | String | Overwrite policy. Range:
Default Value: force |
label | No | String | To import a specified label, enter a value in the format of {Label key}:{Label value}. If this parameter is empty, the label of the body is imported. |
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. |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
upload_file | Yes | File | Contents in the file must be in key-value pairs, for example, {"data":[{"key1":"value1","key2":"value2"}]}}. |
Response
Status code: 200
Parameter | Type | Description |
|---|---|---|
OK | Array of GetKieConfigs objects | List of configuration items that are successfully imported. |
failure | Array of failure objects | List of configuration items that fail to be imported and their errors. |
Parameter | Type | Description |
|---|---|---|
id | String | ID of a configuration item. |
key | String | Key of a configuration item. |
labels | Object | Label of a configuration item. |
value | String | Value of a configuration item. |
value_type | String | Type of a configuration item value. Range:
|
status | String | Status of a configuration item. Range:
|
create_time | Integer | Creation time. |
update_time | Integer | Update time. |
create_revision | Long | Version number of the created configuration. |
update_revision | Long | Version number of the updated configuration. |
Parameter | Type | Description |
|---|---|---|
key | String | Key of the configuration item that fails to be imported. |
labels | Object | Label of the configuration item that fails to be imported. |
error_code | String | Error code displayed for an import failure. |
error_message | String | Import failure cause. |
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/file
{
} Example Response
Status code: 200
OK
{
"success" : [ {
"id" : "8a9e6a5d-8d65-48fb-a40c-5150c8479da8",
"key" : "string",
"labels" : {
"key" : "value"
},
"value" : "string",
"value_type" : "text",
"status" : "enabled",
"create_time" : 1623139038,
"update_time" : 1623139038,
"create_revision" : 13,
"update_revision" : 13
} ],
"failure" : [ {
"key" : "string",
"labels" : {
"key" : "value"
},
"error_code" : "SVCSTG.004xxxxx",
"error_message" : "Invalid parameters"
} ]
} Status Code
Status Code | Description |
|---|---|
200 | OK |
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
