Call the ListJobs API to retrieve a list of job templates.
Try it now
Test
RAM authorization
|
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 |
Current page number. Starts from 1. |
1 |
| PageSize |
integer |
No |
Page size. Value range: [0, 200]. |
20 |
| AppName |
string |
No |
Job template name. |
demo-app |
| NamespaceId |
string |
No |
Namespace ID. |
cn-beijing:demo |
| Tags |
string |
No |
List of tags, JSON string. Values are described as follows:
|
[{"key":"key","value":"value"}] |
| OrderBy |
string |
No |
Sort job templates. Values are described as follows:
|
running |
| Reverse |
boolean |
No |
Sort by the field name passed in the OrderBy parameter. Values are described as follows:
|
true |
| FieldType |
string |
No |
Set the dimension for filtering job templates. Values are described as follows:
|
appName |
| FieldValue |
string |
No |
Based on the filtering dimension set by FieldType, enter the job template name or job template ID of the target job template. |
demo-app |
| Workload |
string |
No |
Workload must be set to |
job |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response data. |
||
| Message |
string |
Additional information about the call result. |
success |
| RequestId |
string |
Request ID. |
B4D805CA-926D-41B1-8E63-7AD0C1ED**** |
| Data |
object |
List of job templates. |
|
| CurrentPage |
integer |
Current page number. |
1 |
| TotalSize |
integer |
Total number of job templates. |
2 |
| PageSize |
integer |
Page size. |
20 |
| Applications |
array<object> |
List of job templates. |
|
|
array<object> |
Job template details. |
||
| AppName |
string |
Job template name. |
demo-app |
| NamespaceId |
string |
Namespace ID. |
cn-beijing:demo |
| AppId |
string |
Job template ID. |
f7730764-d88f-4b9a-8d8e-cd8efbfe**** |
| Tags |
array<object> |
Job template tags. |
|
|
object |
Job template tag details. |
||
| Key |
string |
Tag key. |
key |
| Value |
string |
Tag value. |
value |
| RegionId |
string |
Region ID. |
cn-beijing |
| AppDescription |
string |
Job template description. |
description |
| TriggerConfig |
string |
The trigger configuration for the job. Configure the trigger based on the job type.
|
{"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"} |
| Suspend |
boolean |
Whether to pause the job template. |
false |
| Active |
integer |
Number of running instances. |
0 |
| Succeeded |
integer |
Number of successfully run instances. |
3 |
| Failed |
integer |
Number of failed instances. |
0 |
| LastStartTime |
integer |
Last job start time. |
1657522800 |
| CompletionTime |
integer |
Last job completion time. |
1657522839 |
| LastChangeorderState |
string |
Whether the last release order executed successfully. Values are described as follows:
|
1 |
| LastJobState |
string |
Last job running status. Values are described as follows:
|
0 |
| Cpu |
integer |
CPU required for each instance, in millicores. Cannot be 0. Currently, only the following defined specifications are supported:
|
500 |
| Mem |
integer |
Memory required for each instance, in MB. Cannot be 0. It has a one-to-one correspondence with CPU. Currently, only the following defined specifications are supported:
|
1024 |
| Message |
string |
Additional information about the call result. |
success |
| ImageUrl |
string |
||
| ErrorCode |
string |
Error code. Values are described as follows:
|
空 |
| Code |
string |
API status or POP error code. Values are described as follows:
|
200 |
| Success |
boolean |
Whether the list of job templates was retrieved successfully. Values are described as follows:
|
true |
| CurrentPage |
integer |
Current page number. |
1 |
| TotalSize |
integer |
Total number of job templates. |
2 |
| PageSize |
integer |
Page size. |
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.