Retrieves 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 |
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":"key","value":"value"}] |
| OrderBy |
string |
No |
The sorting method for the job templates. Valid values:
|
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 |
| FieldType |
string |
No |
The dimension by which to filter job templates. Valid values:
|
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 |
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.
|
{"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:
|
1 |
| LastJobState |
string |
The state of the last job. Valid values:
|
0 |
| Cpu |
integer |
The CPU required for each instance, in millicores. The value cannot be 0. Only the following defined specifications are supported:
|
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 |
| Message |
string |
Additional information about the call. |
success |
| ImageUrl |
string |
The image URL. |
|
| ErrorCode |
string |
The error code.
|
|
| Code |
string |
The status of the interface or the POP error code. Valid values:
|
200 |
| Success |
boolean |
Indicates whether the list of job templates was obtained. Valid values:
|
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.