curl --request GET \
--url http://{host}:{port}/{contextPath}/job \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/job"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://{host}:{port}/{contextPath}/job', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/{contextPath}/job",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/job"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://{host}:{port}/{contextPath}/job")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/job")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"id": "aJobId",
"jobDefinitionId": "aJobDefinitionId",
"dueDate": "2018-07-17T17:05:00.000+0200",
"processInstanceId": "aProcessInstanceId",
"processDefinitionId": "aProcessDefinitionId",
"processDefinitionKey": "aPDKey",
"executionId": "anExecutionId",
"retries": 0,
"exceptionMessage": "An exception Message",
"failedActivityId": "anActivityId",
"suspended": false,
"priority": 10,
"tenantId": null,
"createTime": "2018-05-05T17:00:00+0200",
"batchId": "aBatchId"
},
{
"id": "anotherJobId",
"jobDefinitionId": "anotherJobDefinitionId",
"dueDate": "2018-07-17T17:55:00.000+0200",
"processInstanceId": "aProcessInstanceId",
"processDefinitionId": "anotherPDId",
"processDefinitionKey": "anotherPDKey",
"executionId": "anotherExecutionId",
"retries": 0,
"exceptionMessage": "Another exception Message",
"failedActivityId": "anotherActivityId",
"suspended": true,
"priority": 8,
"tenantId": null,
"createTime": "2018-05-05T17:00:00+0200",
"batchId": null
}
]{
"type": "<string>",
"message": "<string>",
"code": 123
}获取列表
Queries for jobs that fulfill given parameters. The size of the result set can be retrieved by using the Get Job Count method.
curl --request GET \
--url http://{host}:{port}/{contextPath}/job \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/job"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://{host}:{port}/{contextPath}/job', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/{contextPath}/job",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/job"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://{host}:{port}/{contextPath}/job")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/job")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"id": "aJobId",
"jobDefinitionId": "aJobDefinitionId",
"dueDate": "2018-07-17T17:05:00.000+0200",
"processInstanceId": "aProcessInstanceId",
"processDefinitionId": "aProcessDefinitionId",
"processDefinitionKey": "aPDKey",
"executionId": "anExecutionId",
"retries": 0,
"exceptionMessage": "An exception Message",
"failedActivityId": "anActivityId",
"suspended": false,
"priority": 10,
"tenantId": null,
"createTime": "2018-05-05T17:00:00+0200",
"batchId": "aBatchId"
},
{
"id": "anotherJobId",
"jobDefinitionId": "anotherJobDefinitionId",
"dueDate": "2018-07-17T17:55:00.000+0200",
"processInstanceId": "aProcessInstanceId",
"processDefinitionId": "anotherPDId",
"processDefinitionKey": "anotherPDKey",
"executionId": "anotherExecutionId",
"retries": 0,
"exceptionMessage": "Another exception Message",
"failedActivityId": "anotherActivityId",
"suspended": true,
"priority": 8,
"tenantId": null,
"createTime": "2018-05-05T17:00:00+0200",
"batchId": null
}
]{
"type": "<string>",
"message": "<string>",
"code": 123
}Authorizations
Query Parameters
Only select jobs where the due date is lower or higher than the given date. Due date expressions are comma-separated and are structured as follows:
A valid condition value has the form operator_value.
operator is the comparison operator to be used and value the date value
as string.
Valid operator values are: gt - greater than; lt - lower than.
value may not contain underscore or comma characters.
Only select jobs created before or after the given date.
Create time expressions are comma-separated and are structured as follows:
A valid condition value has the form operator_value.
operator is the comparison operator to be used and value the date value
as string.
Valid operator values are: gt - greater than; lt - lower than.
value may not contain underscore or comma characters.
Response
Request successful.