All Products
Search
Document Center

Batch Compute:ListApps

Last Updated:Aug 21, 2023

Description

Lists Apps, including public and private Apps.

Request

GET /apps?Scope={Scope}&Marker={Marker}&MaxItemCount={MaxItemCount}

Request parameters

Query Parameters

Parameter

Type

Required or not

Description

Scope

String

No

Optional values include Public and Private.If the value is Public, public Apps are queried. If the value is Private or not specified, private Apps are queried.

Marker

String

No

Marker used for paging query.Default value: null

MaxItemCount

Number

No

Maximum number of items queried this time. It must be an integer between 1 and 100.Default value: 50

Response

Note

Response Status Code

HTTP/1.1 200 OK
Note

Response Body

{
    "Items": [
        {
            "Name": string,
            "Description": string,
            "CreationTime": string,
            "InputParameters": {
                string: {
                    "Description": string,
                    "Type": string,
                    "Default": string
                },
                ...
            },
            "OutputParameters": {
                string: {
                    "Description": string,
                    "Type": string,
                    "Default": string
                },
                ...
            },
            // begin union
            // only one of the following can be specified:
            "Docker": {
                "Image": string,
                "RegistryOSSPath": string
            },
            "VM": {
                "ECSImageId": string
            },
            // end union
            "CommandLine": string,
            "EnvVars": {
                string: string,
                ...
            },
            "Daemonize": boolean,
            "Config": {
                "ResourceType": {
                    "Description": string,
                    "Default": string,
                    "Overwritable": boolean
                },
                "InstanceType": {
                    "Description": string,
                    "Default": string,
                    "Overwritable": boolean
                },
                "InstanceCount": {
                    "Description": string,
                    "Default": number,
                    "Overwritable": boolean
                },
                "MinDiskSize": {
                    "Description": string,
                    "Default": number,
                    "Overwritable": boolean
                },
                "DiskType": {
                    "Description": string,
                    "Default": string,
                    "Overwritable": boolean
                },
                "MaxRetryCount": {
                    "Description": string,
                    "Default": number,
                    "Overwritable": boolean
                },
                "Timeout": {
                    "Description": string,
                    "Default": number,
                    "Overwritable": boolean
                }
            }
        }
    ],
    "NextMarker": string
}

Response parameters

Attribute

Type

Description

Items

object[]

List of resources that meet the query conditions

NextMarker

String

Marker used for the next paging query

App

Attribute

Type

Description

Name

string

Name of the App

Description

String

Detailed description about the App

CreationTime

string

Resource creation time

InputParameters

map

Input parameter list of the App

OutputParameters

map

Output parameter list of the App

Docker

object

Configuration related to the Docker image

VM

object

Configuration related to the ECS instance

CommandLine

String

Command line used to run the App

EnvVars

map

Environmental variable

Daemonize

boolean

Whether to restart when the App is executed

Config

object

Runtime parameters when the job is submitted

InputParameter

Attribute

Type

Description

Description

String

Parameter description

Type

String

Parameter type

Default

String

Default value of the parameter

OutputParameter

Attribute

Type

Description

Description

String

Parameter description

Type

String

Parameter type

Default

String

Default value of the parameter

Docker

Attribute

Type

Description

Image

String

Docker image

RegistryOSSPath

String

Root directory of the Docker registry storage in the OSS

VM

Attribute

Type

Description

ECSImageId

String

ECS image ID

Config

Attribute

Type

Description

ResourceType

object

Resource type

InstanceType

object

Instance type

InstanceCount

object

Number of instances

MinDiskSize

object

Minimum disk size (GB)

DiskType

object

Disk type

MaxRetryCount

object

Maximum number of retries after an instance fails

Timeout

object

Timeout of an instance, in seconds

ResourceType

Attribute

Type

Description

Description

String

Detailed description provided for App users

Default

String

Default value of the parameter

Overwritable

Boolean

Specifies whether the default value can be overwritten when a user uses this App to submit a job.

InstanceType

Attribute

Type

Description

Description

String

Detailed description provided for App users

Default

String

Default value of the parameter

Overwritable

Boolean

Specifies whether the default value can be overwritten when a user uses this App to submit a job.

InstanceCount

Attribute

Type

Description

Description

String

Detailed description provided for App users

Default

Number

Default value of the parameter

Overwritable

Boolean

Specifies whether the default value can be overwritten when a user uses this App to submit a job.

MinDiskSize

Attribute

Type

Description

Description

String

Detailed description provided for App users

Default

Number

Default value of the parameter

Overwritable

Boolean

Specifies whether the default value can be overwritten when a user uses this App to submit a job.

DiskType

Attribute

Type

Description

Description

String

Detailed description provided for App users

Default

String

Default value of the parameter

Overwritable

Boolean

Specifies whether the default value can be overwritten when a user uses this App to submit a job.

MaxRetryCount

Attribute

Type

Description

Description

String

Detailed description provided for App users

Default

Number

Default value of the parameter

Overwritable

Boolean

Specifies whether the default value can be overwritten when a user uses this App to submit a job.

Timeout

Attribute

Type

Description

Description

String

Detailed description provided for App users

Default

Number

Default value of the parameter

Overwritable

Boolean

Specifies whether the default value can be overwritten when a user uses this App to submit a job.

Examples

Request example

GET /apps?Scope=Public HTTP/1.1

Response example

HTTP/1.1 200 OK

{
    "Items": [
        {
            "Config": {
                "DiskType": {
                    "Default": "cloud_efficiency",
                    "Description": "",
                    "Overwritable": true},
                "InstanceCount": {
                    "Default": 1,
                    "Description": "",
                    "Overwritable": true},
                "InstanceType": {
                    "Default": "",
                    "Description": "",
                    "Overwritable": true},
                "MaxRetryCount": {
                    "Default": 0,
                    "Description": "",
                    "Overwritable": true},
                "MinDiskSize": {
                    "Default": 40,
                    "Description": "",
                    "Overwritable": true},
                "ResourceType": {
                    "Default": "OnDemand",
                    "Description": "",
                    "Overwritable": true},
                "Timeout": {
                    "Default": 86400,
                    "Description": "",
                    "Overwritable": true}},
            "CreationTime": "2017-08-14T07:10:41.281465Z",
            "Description": "app description",
            "InputParameters": {
                "inputFile": {
                    "Default": null,
                    "Description": "",
                    "Type": "String"}},
            "Name": "myapp",
            "OutputParameters": {
                "outputFile": {
                    "Default": null,
                    "Description": "",
                    "Type": "String"}},
            "OwnerId": 123456
        }
    ],
    "NextMarker": ""
}