Creating an Application

Function Description

  • API Name

    CreateApp

  • Function

    Create an application. An application is created at a time. A maximum of 10,000 applications can be created in total.

URI

POST /v1/{project_id}/cloud-phone/apps

For details, see Table 1.
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

Request

  • Request parameters

    Parameter

    Mandatory

    Type

    Description

    name

    Yes

    String

    Specifies the application name.

    The value can contain a maximum of 64 characters, including letters, digits, hyphens (-), periods (.), and underscores (_).

    package_name

    Yes

    String

    Specifies the application package name.

    The value can contain a maximum of 128 characters, including uppercase letters, lowercase letters, digits, hyphens (-), periods (.), and underscores (_).

    description

    No

    String

    Provides supplementary information about the application.

    The value can contain a maximum of 256 characters.

  • Example request
    1
    2
    3
    4
    5
    6
    POST https://{CPH Endpoint}/v1/{project_id}/cloud-phone/apps
    {
        "name": "app_name",
        "package_name": "com.game.package",
        "description": "app_description"
    }
    

Response

  • Response parameters

    Parameter

    Type

    Description

    request_id

    String

    Specifies the request ID, which is unique.

    app_id

    String

    Specifies the unique ID of an application.

  • Example response
    {  
        "request_id": "6837531fd3f54550927b930180a706bf",
        "app_id": "1564567b8bab40f34711234cb80d0123"
    }

Returned Values

See Returned Values.

Error Codes

See Error Codes.