Querying the Application List

Function Description

  • API Name

    ListApps

  • Function

    Query the applications by page. The application list is sorted by creation time in descending order. You can specify the values of offset and limit. If no application exists, an empty list is returned. A maximum of 100 records can be returned for each request.

URI

GET /v1/{project_id}/cloud-phone/apps?name=app_name&offset=0&limit=100

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.

name

No

String

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

Fuzzy search is supported.

offset

No

Integer

Offset

If the value is an integer greater than 0 but less than the number of resources, all resources after this offset will be queried. The default value is 0.

limit

No

Integer

Specifies the number of resources returned on each page.

Value range: 1–100 (default value: 100)

Generally, set this parameter to 10, 20, or 50.

Request

  • Request parameters

    None

  • Example request
    1
    GET https://{CPH Endpoint}/v1/{project_id}/cloud-phone/apps?name=app_name&offset=0&limit=100
    

Response

  • Response parameters

    Parameter

    Type

    Description

    request_id

    String

    Specifies the request ID, which is unique.

    apps

    Array of objects

    Specifies the application information. For details, see Table 2.

    Table 2 app field description

    Parameter

    Type

    Description

    package_name

    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 (_).

    name

    String

    Specifies the application name.

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

    launch_activity

    String

    Specifies the application startup path.

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

    app_id

    String

    Specifies the application ID.

    The value can contain a maximum of 32 characters.

    description

    String

    Provides supplementary information about the application.

    The value can contain a maximum of 256 characters.

    create_time

    String

    Specifies the time when the application is created.

    The value is a UTC time.

    update_time

    String

    Specifies the time when the application is updated.

    The value is a UTC time.

  • Example response
    {
        "request_id": "6837531fd3f54550927b930180a706bf",
        "apps": [{
            "name": "app_name",
            "package_name": "com.game.package",
            "launch_activity": "com.game.package.main_activity",
            "app_id":"1564567b8bab40f34711234cb80d0123",
            "description": "app_description",
            "create_time": "2020-01-01T00:00:00Z",
            "update_time": "2020-01-03T00:00:00Z"
        }]
    }

Returned Values

See Returned Values.

Error Codes

See Error Codes.