All Products
Search
Document Center

Serverless App Engine:DescribeJobHistory

Last Updated:Apr 22, 2026

Query the information about jobs.

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:DescribeJobHistory

*All Resource

*

None None

Request syntax

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

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The ID of the job template.

e1a7a07-abcb-4652-a1d3-2d57f415****

CurrentPage

integer

No

The number of the page to return.

1

PageSize

integer

No

The number of entries to return on each page. Valid values: 0 to 10000.

20

State

string

No

The status of the job. Valid values:

  • 0: The job is not executed.

  • 1: The job is executed.

  • 2: The job fails to be executed.

  • 3: The job is being executed.

1

Response elements

Element

Type

Description

Example

object

The returned data.

RequestId

string

The request ID.

53F15A18-8079-5992-810C-0211A5AE****

Message

string

The message returned. Take note of the following rules:

  • If the call is successful, success is returned.

  • If the call fails, an error code is returned.

success

TraceId

string

The trace ID that is used to query the details of the request.

0b1639af16575057857241351e****

Data

object

The returned data.

CurrentPage

integer

The page number of the returned page.

1

TotalSize

integer

The total number of jobs.

20

PageSize

integer

The number of entries to return on each page. Valid values: 0 to 10000.

20

Jobs

array<object>

The jobs.

object

JobId

string

The job ID.

manual-3db7a8fa-5d40-4edc-92e4-49d50eab****

Active

integer

The number of running instances.

0

Succeeded

integer

The number of instances that are successfully run.

3

Failed

integer

The number of instances that failed to run.

0

StartTime

integer

The time when the job was created.

1657522800

CompletionTime

integer

The time when the job was executed.

1657522839

Message

string

The message returned if exceptions occur during job running.

Null

State

string

The status of the job. Valid values:

  • 0: The job was not executed.

  • 1: The job was executed.

  • 2: The job failed to be executed.

  • 3: The job is being executed.

1

ErrorCode

string

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

  • If the call is successful, the ErrorCode parameter is not returned.

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

Null

Code

string

The HTTP status code returned. Valid values:

  • 2xx: The call was successful.

  • 3xx: The call was redirected.

  • 4xx: The call failed.

  • 5xx: A server error occurred.

200

Success

boolean

Indicates whether the call was successful. Valid values:

  • true

  • false

true

Examples

Success response

JSON format

{
  "RequestId": "53F15A18-8079-5992-810C-0211A5AE****",
  "Message": "success",
  "TraceId": "0b1639af16575057857241351e****",
  "Data": {
    "CurrentPage": 1,
    "TotalSize": 20,
    "PageSize": 20,
    "Jobs": [
      {
        "JobId": "manual-3db7a8fa-5d40-4edc-92e4-49d50eab****",
        "Active": 0,
        "Succeeded": 3,
        "Failed": 0,
        "StartTime": 1657522800,
        "CompletionTime": 1657522839,
        "Message": "Null\n",
        "State": "1"
      }
    ]
  },
  "ErrorCode": "Null\n",
  "Code": "200",
  "Success": true
}

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.