All Products
Search
Document Center

Serverless App Engine:ListJobs

Last Updated:Apr 24, 2026

Retrieves a list of job templates.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sae:ListJobs

list

*All Resource

*

None None

Request syntax

GET /pop/v1/sam/job/listJobs HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

CurrentPage

integer

No

The page number. The value starts from 1.

1

PageSize

integer

No

The number of entries per page. Valid values: 0 to 200.

20

AppName

string

No

The name of the job template.

demo-app

NamespaceId

string

No

The namespace ID.

cn-beijing:demo

Tags

string

No

A list of tags. This is a JSON string. The value consists of the following parts:

  • key: The tag key.

  • value: The tag value.

[{"key":"key","value":"value"}]

OrderBy

string

No

The sorting method for the job templates. Valid values:

  • running: Sorts by the number of running instances.

  • instances: Sorts by the number of destination instances.

running

Reverse

boolean

No

Specifies whether to sort the results in ascending or descending order based on the field specified by the OrderBy parameter. Valid values:

  • true: ascending order.

  • false: descending order.

true

FieldType

string

No

The dimension by which to filter job templates. Valid values:

  • appName: The name of the job template.

  • appIds: The ID of the job template.

appName

FieldValue

string

No

The name or ID of the target job template. This value corresponds to the dimension specified by FieldType.

demo-app

Workload

string

No

The workload. Set the value to job.

job

Response elements

Element

Type

Description

Example

object

The returned data.

Message

string

Additional information about the call.

success

RequestId

string

The request ID.

B4D805CA-926D-41B1-8E63-7AD0C1ED****

Data

object

The list of job templates.

CurrentPage

integer

The current page number.

1

TotalSize

integer

The total number of job templates.

2

PageSize

integer

The number of entries per page.

20

Applications

array<object>

The list of job templates.

array<object>

The details of the job template.

AppName

string

The name of the job template.

demo-app

NamespaceId

string

The namespace ID.

cn-beijing:demo

AppId

string

The ID of the job template.

f7730764-d88f-4b9a-8d8e-cd8efbfe****

Tags

array<object>

The tags of the job template.

object

The details of the job template tag.

Key

string

The tag key.

key

Value

string

The tag value.

value

RegionId

string

The region ID.

cn-beijing

AppDescription

string

The description of the job template.

description

TriggerConfig

string

The trigger configuration of the job. The configuration varies based on the job type.

  • Scheduled task: Set the type field to time, the config field to a Cron expression, and the timezone field to a specific time zone. Example: {"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"}

  • One-time job: Set the type field to http and configure the HTTP trigger rule in the config field. For more information, see Request parameter SourceHttpEventParameters. Example: {"type":"http","config":{"type":"HTTPS","method":["GET"],"ip":[],"referer":[],"securityConfig":"none"}}

{"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"}

Suspend

boolean

Indicates whether the job template is paused.

false

Active

integer

The number of running instances.

0

Succeeded

integer

The number of successful instances.

3

Failed

integer

The number of failed instances.

0

LastStartTime

integer

The time when the last job was started.

1657522800

CompletionTime

integer

The time when the last job was completed.

1657522839

LastChangeorderState

string

Indicates whether the last release order was successfully executed. Valid values:

  • 0: The release order failed to be executed.

  • 1: The release order was successfully executed.

1

LastJobState

string

The state of the last job. Valid values:

  • 0: Not executed.

  • 1: Successful.

  • 2: Failed.

  • 3: Running.

0

Cpu

integer

The CPU required for each instance, in millicores. The value cannot be 0. Only the following defined specifications are supported:

  • 500

  • 1000

  • 2000

  • 4000

  • 8000

  • 16000

  • 32000

500

Mem

integer

The memory required for each instance, in MB. The value cannot be 0. This parameter corresponds to the CPU parameter. Only the following defined specifications are supported:

  • 1024: corresponds to 500 and 1,000 millicores of CPU.

  • 2048: corresponds to 500, 1,000, and 2,000 millicores of CPU.

  • 4096: corresponds to 1,000, 2,000, and 4,000 millicores of CPU.

  • 8192: corresponds to 2,000, 4,000, and 8,000 millicores of CPU.

  • 12288: corresponds to 12,000 millicores of CPU.

  • 16384: corresponds to 4,000, 8,000, and 16,000 millicores of CPU.

  • 24576: corresponds to 12,000 millicores of CPU.

  • 32768: corresponds to 16,000 millicores of CPU.

  • 65536: corresponds to 8,000, 16,000, and 32,000 millicores of CPU.

  • 131072: corresponds to 32,000 millicores of CPU.

1024

Message

string

Additional information about the call.

success

ImageUrl

string

The image URL.

ErrorCode

string

The error code.

  • If the request is successful, this parameter is not returned.

  • If the request fails, this parameter is returned. For more information, see the Error codes section of this topic.

Code

string

The status of the interface or the POP error code. Valid values:

  • 2xx: The request was successful.

  • 3xx: Redirection.

  • 4xx: A request error occurred.

  • 5xx: A server error occurred.

200

Success

boolean

Indicates whether the list of job templates was obtained. Valid values:

  • true: The list was obtained.

  • false: The list failed to be obtained.

true

CurrentPage

integer

The current page number.

1

TotalSize

integer

The total number of job templates.

2

PageSize

integer

The number of entries per page.

20

Examples

Success response

JSON format

{
  "Message": "success",
  "RequestId": "B4D805CA-926D-41B1-8E63-7AD0C1ED****",
  "Data": {
    "CurrentPage": 1,
    "TotalSize": 2,
    "PageSize": 20,
    "Applications": [
      {
        "AppName": "demo-app",
        "NamespaceId": "cn-beijing:demo",
        "AppId": "f7730764-d88f-4b9a-8d8e-cd8efbfe****",
        "Tags": [
          {
            "Key": "key",
            "Value": "value"
          }
        ],
        "RegionId": "cn-beijing",
        "AppDescription": "description",
        "TriggerConfig": "{\"type\":\"time\",\"config\":\"0 1 */1 * ?\",\"timezone\":\"GMT+8:00\"}",
        "Suspend": false,
        "Active": 0,
        "Succeeded": 3,
        "Failed": 0,
        "LastStartTime": 1657522800,
        "CompletionTime": 1657522839,
        "LastChangeorderState": "1",
        "LastJobState": "0",
        "Cpu": 500,
        "Mem": 1024,
        "Message": "success",
        "ImageUrl": ""
      }
    ]
  },
  "ErrorCode": "",
  "Code": "200",
  "Success": true,
  "CurrentPage": 1,
  "TotalSize": 2,
  "PageSize": 20
}

Error codes

HTTP status code

Error code

Error message

Description

404 InvalidAppId.NotFound The specified AppId does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.