Adding an Application to the Application Repository
Function
Adds an application to the application repository.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:appWarehouse:createApp
Write
-
-
-
-
URI
POST /v1/{project_id}/app-warehouse/apps
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | No | String | User token It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| app_name | Yes | String | Application name. Requirements: |
| app_category | Yes | String | Application category. |
| os_type | Yes | String | OS type. |
| version_id | Yes | String | Version number. Requirements: |
| app_description | No | String | Application description in the application repository. |
| version_name | Yes | String | Version description. Requirements: |
| appfile_store_path | Yes | String | Storage path of the application in the OBS bucket. |
| app_icon | No | String | |
| app_file_size | No | Integer | Application file size, in KB. |
| app_extended_info | No | AppExtendedInfo object | Extended information about the custom application service. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| id | String | Application record ID. |
| app_id | String | Application ID. |
| tenant_id | String | Tenant ID. |
| app_name | String | Application name. |
| app_category | String | Application category. |
| os_type | String | OS type. |
| version_id | String | Version number. |
| version_name | String | Version name. |
| appfile_store_path | String | Storage path of application files. |
| app_file_size | String | Size of the application file, in KB. |
| app_description | String | Application description. |
| appicon_store_path | String | Storage path of application files. |
| create_time | String | Application creation time. |
| modify_time | String | Application modification time. |
| verify_time | String | Application verification time. |
| verify_status | String | Verification status. |
| verify_comment | String | Verification comments. |
| app_icon | String | Application icon file. |
| app_extended_info | AppExtendedInfo object | Extended information about the custom application service. |
| Parameter | Type | Description |
|---|---|---|
| extended_info | Map<String,String> | Key-value pair mapping of extended information |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 405
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 415
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 503
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Example Requests
POST /v1/a4da8115c9d8464ead3a38309130523f/app-warehouse/apps
{
"app_name" : "Postman",
"app_category" : "PRODUCTIVITY_AND_COLLABORATION",
"os_type" : "Windows",
"version_name" : "Canary",
"version_id" : "7.9.0.0",
"appfile_store_path" : "file/Postman.exe",
"app_description" : "A postman setup exe.",
"app_icon" : "data:image/png;base64,iVBORw0KGWBUwmyIgfBRgjsA88DJ9OxpLdgbbFDuB+Pt***********w59LFEQHa+0QrAJNBfiSUVORK5CYII=",
"app_file_size" : 401
} Example Responses
Status code: 200
Response to a successful request.
{
"id" : "694648268272959491",
"app_id" : "694648268205850627",
"tenant_id" : "26a0420e9e284569a23f1b2f7d9b5011",
"app_name" : "Postman",
"app_category" : "PRODUCTIVITY_AND_COLLABORATION",
"os_type" : "Windows",
"version_id" : "7.9.0.0",
"version_name" : "Canary",
"appfile_store_path" : "file/Postman.exe",
"app_file_size" : "401",
"app_description" : "A postman setup exe.",
"create_time" : "2024-05-07T07:16:27.791729999Z",
"modify_time" : "2024-05-07T07:16:27.791729999Z",
"verify_status" : "VERIFYING",
"app_icon" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDP*************ABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAAC"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Response to a successful request. |
| 400 | The request cannot be understood by the server due to malformed syntax. |
| 401 | Authentication failed. |
| 403 | Permissions required. |
| 404 | No resources found. |
| 405 | The request method is not allowed. |
| 415 | The requested resource format is not supported. |
| 500 | An internal service error occurred. For details, see the error code description. |
| 503 | Service unavailable. |
Error Codes
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