Mengambil daftar templat pekerjaan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:ListJobs |
list |
*全部资源
|
None | None |
Sintaks permintaan
GET /pop/v1/sam/job/listJobs HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| CurrentPage |
integer |
No |
Nomor halaman. Nilai dimulai dari 1. |
1 |
| PageSize |
integer |
No |
Jumlah entri per halaman. Nilai valid: 0 hingga 200. |
20 |
| AppName |
string |
No |
Nama templat pekerjaan. |
demo-app |
| NamespaceId |
string |
No |
ID namespace. |
cn-beijing:demo |
| Tags |
string |
No |
Daftar tag. Ini adalah string JSON. Nilai terdiri dari bagian berikut:
|
[{"key":"key","value":"value"}] |
| OrderBy |
string |
No |
Metode pengurutan untuk templat pekerjaan. Nilai valid:
|
running |
| Reverse |
boolean |
No |
Apakah akan mengurutkan hasil dalam Pesanan menaik atau menurun berdasarkan bidang yang ditentukan oleh parameter OrderBy. Nilai valid:
|
true |
| FieldType |
string |
No |
Dimensi untuk memfilter templat pekerjaan. Nilai valid:
|
appName |
| FieldValue |
string |
No |
Nama atau ID templat pekerjaan target. Nilai ini sesuai dengan dimensi yang ditentukan oleh FieldType. |
demo-app |
| Workload |
string |
No |
Beban kerja. Atur nilai menjadi |
job |
Elemen respons
|
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 |
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 |
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 |
Contoh
Respons sukses
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",
"ImageUrl": ""
}
]
},
"ErrorCode": "",
"Code": "200",
"Success": true,
"CurrentPage": 1,
"TotalSize": 2,
"PageSize": 20
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | InvalidAppId.NotFound | The specified AppId does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.