Importing a Configuration File
Function
This API is used to import a configuration file in .zip format.
URI
POST /v3/{project_id}/cas/configs/import
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant's project ID. See Obtaining a Project ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type or format: multipart/form-data |
X-Auth-Token |
Yes |
String |
API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain the token, see Authentication. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
upload_file |
Yes |
File |
The configuration file to be imported must be compressed into a .zip package, and the package size cannot exceed 500 KB. The package to be imported can contain up to 500 configuration files. The folder name in the compressed package is the configuration group name, and the file name is the configuration name. The file can be in the YAML or properties format. |
repetition_policy |
No |
String |
Policy for processing the configuration file with the same name as the imported configuration file:
|
Response
Parameter |
Type |
Description |
---|---|---|
covered_num |
Integer |
Number of configuration files that are overwritten. |
skip_num |
Integer |
Number of configuration files that are skipped during file import. |
total_num |
Integer |
Number of configuration files that are imported. |
Example Request
POST https://{endpoint}/v3/{project_id}/cas/configs/import {repetition_policy=covered }
Example Response
{ "covered_num" : 0, "total_num" : 1 }
Status Code
Status Code |
Description |
---|---|
204 |
OK |
400 |
Bad Request |
404 |
Not Found |
500 |
Internal Server Error |
Error Code
The error code format is SVCSTG.00100.[Error_ID], for example, SVCSTG.00100400. For details, see ServiceStage 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