Updated on 2026-05-21 GMT+08:00

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request header 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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

app_name

Yes

String

Application name. Requirements:

  1. Contains letters, digits, underscores (_), and hyphens (-).

  2. Contains 1 to 64 characters.

app_category

Yes

String

Application category.

os_type

Yes

String

OS type.

version_id

Yes

String

Version number. Requirements:

  1. Consists of visible characters.

  2. Contains 1 to 64 characters.

app_description

No

String

Application description in the application repository.

version_name

Yes

String

Version description. Requirements:

  1. Consists of visible characters.

  2. Contains 1 to 255 characters.

appfile_store_path

Yes

String

Storage path of the application in the OBS bucket.

app_icon

No

String

NOTE:
  • The default size of an image is 8 KB, that is, 1024 x 8 bytes.

  • If the data format is data, image/png, Base64, or iVBORw0KGgoAAAANS, the actual size is original size x 4/3 + 4 bytes.

app_file_size

No

Integer

Application file size, in KB.

app_extended_info

No

AppExtendedInfo object

Extended information about the custom application service.

Table 4 AppExtendedInfo

Parameter

Mandatory

Type

Description

extended_info

No

Map<String,String>

Key-value pair mapping of extended information

Response Parameters

Status code: 200

Table 5 Response body parameters

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.

Table 6 AppExtendedInfo

Parameter

Type

Description

extended_info

Map<String,String>

Key-value pair mapping of extended information

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 404

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 405

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 415

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 500

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error message.

Status code: 503

Table 14 Response body parameters

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.