All Products
Search
Document Center

Serverless App Engine:ListJobs

Last Updated:Dec 26, 2025

Queries the information about job templates.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
sae:ListJobslist
*All Resources
*
    none
none

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample
CurrentPageintegerNo

The number of the page to return. The parameter value is a positive integer that is greater than or equal to 1.

1
PageSizeintegerNo

The number of entries to return on each page. Valid value: 0 to 200.

20
AppNamestringNo

The name of the job template.

demo-app
NamespaceIdstringNo

The namespace ID.

cn-beijing:demo
TagsstringNo

The tags that are displayed in a JSON string. Valid values:

  • key: the tag key
  • value: the tag value
[{"key":"key","value":"value"}]
OrderBystringNo

Specifies how applications are sorted. Valid values:

  • running: The applications are sorted based on the number of running instances.
  • instances: The applications are sorted based on the number of destination instances.
running
ReversebooleanNo

Specifies whether to sort the field names that are passed by OrderBy in ascending order. Valid values:

  • true: in ascending order
  • false: in descending order
true
FieldTypestringNo

The dimension by which applications are filtered. Valid values:

  • appName: Applications are filtered by job template name.
  • appIds: Applications are filtered by job template ID.
appName
FieldValuestringNo

Enter the name and ID of the job template.

demo-app
WorkloadstringNo

Set the value to job.

job

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

Messagestring

The returned message.

success
RequestIdstring

The request ID.

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

The job templates.

CurrentPageinteger

The page number of the returned page.

1
TotalSizeinteger

The total number of job templates.

2
PageSizeinteger

The number of entries returned on each page.

20
Applicationsarray<object>

The job templates.

Applicationobject
AppNamestring

The name of the job template.

demo-app
NamespaceIdstring

The ID of the namespace.

cn-beijing:demo
AppIdstring

The ID of the job template.

f7730764-d88f-4b9a-8d8e-cd8efbfe****
Tagsarray<object>

The tags of the job template.

Tagsobject
Keystring

The key of the tag.

key
Valuestring

The value of the tag.

value
RegionIdstring

The region ID.

cn-beijing
AppDescriptionstring

The description of the job template.

description
TriggerConfigstring

The trigger configuration. This parameter is configured based on the job type.

  • Scheduled job: Set type to time, config to a CRON expression, and timezone to a specific time zone. Configuration example: {"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"}.
  • One-time job: Set type to http and configure an HTTP trigger rule for config. For more information, see SourceHttpEventParameters . Configuration example: {"type":"http","config":{"type":"HTTPS","method",["GET"],"ip":[],"referer":[],"securityConfig":"none"}}.
{"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"}
Suspendboolean

Indicates whether the job template is suspended.

false
Activelong

The number of running instances.

0
Succeededlong

The number of instances that were successfully run.

3
Failedlong

The number of instances that failed to run.

0
LastStartTimelong

The time when the job was last started.

1657522800
CompletionTimelong

The time when the job was last completed.

1657522839
LastChangeorderStatestring

Indicates whether the latest change order was executed. Valid values:

  • 0: The latest change order failed to be executed.
  • 1: The latest change order was executed.
1
LastJobStatestring

The status of the latest job. Valid values:

  • 0: The job is not executed.
  • 1: The job was executed.
  • 2: The job failed to be executed.
  • 3: The job is being executed.
0
Cpuinteger

The CPU specifications that are required for each instance. Unit: millicores. This parameter cannot be set to 0. Valid values:

  • 500
  • 1000
  • 2000
  • 4000
  • 8000
  • 16000
  • 32000
500
Meminteger

The size of memory that is required by each instance. Unit: MB. This parameter cannot be set to 0. The values of this parameter correspond to the values of the Cpu parameter:

  • This parameter is set to 1024 if the Cpu parameter is set to 500 or 1000.
  • This parameter is set to 2048 if the Cpu parameter is set to 500, 1000, or 2000.
  • This parameter is set to 4096 if the Cpu parameter is set to 1000, 2000, or 4000.
  • This parameter is set to 8192 if the Cpu parameter is set to 2000, 4000, or 8000.
  • This parameter is set to 12288 if the Cpu parameter is set to 12000.
  • This parameter is set to 16384 if the Cpu parameter is set to 4000, 8000, or 16000.
  • This parameter is set to 24576 if the Cpu parameter is set to 12000.
  • This parameter is set to 32768 if the Cpu parameter is set to 16000.
  • This parameter is set to 65536 if the Cpu parameter is set to 8000, 16000, or 32000.
  • This parameter is set to 131072 if the Cpu parameter is set to 32000.
1024
Messagestring

The returned message.

success
ErrorCodestring

The error code returned. Take note of the following rules:

  • If the call is successful, ErrorCode is not returned.
  • If the call fails, ErrorCode is returned. For more information, see the "Error codes" section in this topic.
Null
Codestring

The HTTP status code. Valid values:

  • 2xx: The call was successful.
  • 3xx: The call was redirected.
  • 4xx: The call failed.
  • 5xx: A server error occurred.
200
Successboolean

Indicates whether the applications were obtained. Valid values:

  • true
  • false
true
CurrentPageinteger

The page number of the returned page.

1
TotalSizeinteger

The total number of job templates.

2
PageSizeinteger

The number of entries returned on each page.

20

Examples

Sample success responses

JSONformat

{
  "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"
      }
    ]
  },
  "ErrorCode": "Null\n",
  "Code": 200,
  "Success": true,
  "CurrentPage": 1,
  "TotalSize": 2,
  "PageSize": 20
}

Error codes

HTTP status codeError codeError message
404InvalidAppId.NotFoundThe specified AppId does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-07-10The Error code has changed. The response structure of the API has changedView Change Details
2023-03-30The Error code has changed. The response structure of the API has changedView Change Details