REST API Guide
This section describes the Spring Cloud Data Flow REST API.
43. Overview
Spring Cloud Data Flow provides a REST API that lets you access all aspects of the server. In fact, the Spring Cloud Data Flow shell is a first-class consumer of that API.
If you plan to use the REST API with Java, you should consider using the
provided Java client (DataflowTemplate ) that uses the REST API internally.
|
43.1. HTTP verbs
Spring Cloud Data Flow tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs, as described in the following table:
Verb | Usage |
---|---|
|
Used to retrieve a resource. |
|
Used to create a new resource. |
|
Used to update an existing resource, including partial updates. Also used for
resources that imply the concept of |
|
Used to delete an existing resource. |
43.2. HTTP Status Codes
Spring Cloud Data Flow tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes, as shown in the following table:
Status code | Usage |
---|---|
|
The request completed successfully. |
|
A new resource has been created successfully. The resource’s URI is available from the response’s |
|
An update to an existing resource has been applied successfully. |
|
The request was malformed. The response body includes an error description that provides further information. |
|
The requested resource did not exist. |
|
The requested resource already exists. For example, the task already exists or the stream was already being deployed |
|
Returned in cases where the job execution cannot be stopped or restarted. |
43.3. Headers
Every response has the following headers:
Name | Description |
---|---|
|
The Content-Type of the payload, e.g. |
43.4. Errors
Path | Type | Description |
---|---|---|
|
|
The HTTP error that occurred, e.g. |
|
|
A description of the cause of the error |
|
|
The path to which the request was made |
|
|
The HTTP status code, e.g. |
|
|
The time, in milliseconds, at which the error occurred |
43.5. Hypermedia
Spring Cloud Data Flow uses hypermedia, and resources include links to other resources
in their responses.
Responses are in the Hypertext Application from resource-to-resource Language (HAL) format.
Links can be found beneath the _links
key.
Users of the API should not create URIs themselves.
Instead, they should use the above-described links to navigate.
44. Resources
The API includes the following resources:
44.1. Index
The index provides the entry point into Spring Cloud Data Flow’s REST API. The following topics provide more details:
44.1.1. Accessing the index
Use a GET
request to access the index.
Request Structure
GET / HTTP/1.1
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/' -i -X GET
Response Structure
Path | Type | Description |
---|---|---|
|
|
Links to other resources |
|
|
Incremented each time a change is implemented in this REST API |
|
|
Link to the audit records |
|
|
Link to the dashboard |
|
|
Link to the streams/definitions |
|
|
Link to the streams/definitions/definition |
|
|
Link streams/definitions/definition is templated |
|
|
Link to the runtime/apps |
|
|
Link to the runtime/apps/{appId} |
|
|
Link runtime/apps is templated |
|
|
Link to the runtime/apps/{appId}/instances |
|
|
Link runtime/apps/{appId}/instances is templated |
|
|
Link to the runtime/apps/{appId}/instances/{instanceId} |
|
|
Link runtime/apps/{appId}/instances/{instanceId} is templated |
|
|
Link to the runtime/streams |
|
|
Link runtime/streams is templated |
|
|
Link to the runtime/streams/{streamNames} |
|
|
Link runtime/streams/{streamNames} is templated |
|
|
Link to the streams/logs |
|
|
Link to the streams/logs/{streamName} |
|
|
Link to the streams/logs/{streamName}/{appName} |
|
|
Link streams/logs/{streamName} is templated |
|
|
Link streams/logs/{streamName}/{appName} is templated |
|
|
Link to streams/deployments |
|
|
Link to streams/deployments |
|
|
Link streams/deployments/{name} is templated |
|
|
Link streams/deployments/{name} is templated |
|
|
Link streams/deployments/{name} is templated |
|
|
Link streams/deployments/{name} is templated |
|
|
Link streams/deployments/{name} is templated |
|
|
Link to the streams/deployments/deployment |
|
|
Link streams/deployments/deployment is templated |
|
|
Link to the streams/deployments/manifest/{name}/{version} |
|
|
Link streams/deployments/manifest/{name}/{version} is templated |
|
|
Link to the streams/deployments/history/{name} |
|
|
Link streams/deployments/history is templated |
|
|
Link to the streams/deployments/rollback/{name}/{version} |
|
|
Link streams/deployments/rollback/{name}/{version} is templated |
|
|
Link to the streams/deployments/update/{name} |
|
|
Link streams/deployments/update/{name} is templated |
|
|
Link to the streams/deployments/platform/list |
|
|
Link to the streams/deployments/scale/{streamName}/{appName}/instances/{count} |
|
|
Link streams/deployments/scale/{streamName}/{appName}/instances/{count} is templated |
|
|
Link to the streams/validation |
|
|
Link streams/validation is templated |
|
|
Link to the tasks/platforms |
|
|
Link to the tasks/definitions |
|
|
Link to the tasks/definitions/definition |
|
|
Link tasks/definitions/definition is templated |
|
|
Link to the tasks/executions |
|
|
Link to the tasks/executions/name |
|
|
Link tasks/executions/name is templated |
|
|
Link to the tasks/executions/current |
|
|
Link to the tasks/executions/execution |
|
|
Link tasks/executions/execution is templated |
|
|
Link to the tasks/info/executions |
|
|
Link tasks/info is templated |
|
|
Link to the tasks/logs |
|
|
Link tasks/logs is templated |
|
|
Link to the tasks/executions/schedules |
|
|
Link to the tasks/schedules/instances |
|
|
Link tasks/schedules/instances is templated |
|
|
Link to the tasks/validation |
|
|
Link tasks/validation is templated |
|
|
Link to the jobs/executions |
|
|
Link to the jobs/thinexecutions |
|
|
Link to the jobs/executions/name |
|
|
Link jobs/executions/name is templated |
|
|
Link to the jobs/executions/status |
|
|
Link jobs/executions/status is templated |
|
|
Link to the jobs/thinexecutions/name |
|
|
Link jobs/executions/name is templated |
|
|
Link to the jobs/thinexecutions/jobInstanceId |
|
|
Link jobs/executions/jobInstanceId is templated |
|
|
Link to the jobs/thinexecutions/taskExecutionId |
|
|
Link jobs/executions/taskExecutionId is templated |
|
|
Link to the jobs/executions/execution |
|
|
Link jobs/executions/execution is templated |
|
|
Link to the jobs/executions/execution/steps |
|
|
Link jobs/executions/execution/steps is templated |
|
|
Link to the jobs/executions/execution/steps/step |
|
|
Link jobs/executions/execution/steps/step is templated |
|
|
Link to the jobs/executions/execution/steps/step/progress |
|
|
Link jobs/executions/execution/steps/step/progress is templated |
|
|
Link to the jobs/instances/name |
|
|
Link jobs/instances/name is templated |
|
|
Link to the jobs/instances/instance |
|
|
Link jobs/instances/instance is templated |
|
|
Link to the tools/parseTaskTextToGraph |
|
|
Link to the tools/convertTaskGraphToText |
|
|
Link to the apps |
|
|
Link to the about |
|
|
Link to the completions/stream |
|
|
Link completions/stream is templated |
|
|
Link to the completions/task |
|
|
Link completions/task is templated |
Example Response
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 7064
{
"_links" : {
"dashboard" : {
"href" : "http://localhost:9393/dashboard"
},
"audit-records" : {
"href" : "http://localhost:9393/audit-records"
},
"streams/definitions" : {
"href" : "http://localhost:9393/streams/definitions"
},
"streams/definitions/definition" : {
"href" : "http://localhost:9393/streams/definitions/{name}",
"templated" : true
},
"streams/validation" : {
"href" : "http://localhost:9393/streams/validation/{name}",
"templated" : true
},
"runtime/streams" : {
"href" : "http://localhost:9393/runtime/streams{?names}",
"templated" : true
},
"runtime/streams/{streamNames}" : {
"href" : "http://localhost:9393/runtime/streams/{streamNames}",
"templated" : true
},
"runtime/apps" : {
"href" : "http://localhost:9393/runtime/apps"
},
"runtime/apps/{appId}" : {
"href" : "http://localhost:9393/runtime/apps/{appId}",
"templated" : true
},
"runtime/apps/{appId}/instances" : {
"href" : "http://localhost:9393/runtime/apps/{appId}/instances",
"templated" : true
},
"runtime/apps/{appId}/instances/{instanceId}" : {
"href" : "http://localhost:9393/runtime/apps/{appId}/instances/{instanceId}",
"templated" : true
},
"streams/deployments" : {
"href" : "http://localhost:9393/streams/deployments"
},
"streams/deployments/{name}{?reuse-deployment-properties}" : {
"href" : "http://localhost:9393/streams/deployments/{name}?reuse-deployment-properties=false",
"templated" : true
},
"streams/deployments/{name}" : {
"href" : "http://localhost:9393/streams/deployments/{name}",
"templated" : true
},
"streams/deployments/history/{name}" : {
"href" : "http://localhost:9393/streams/deployments/history/{name}",
"templated" : true
},
"streams/deployments/manifest/{name}/{version}" : {
"href" : "http://localhost:9393/streams/deployments/manifest/{name}/{version}",
"templated" : true
},
"streams/deployments/platform/list" : {
"href" : "http://localhost:9393/streams/deployments/platform/list"
},
"streams/deployments/rollback/{name}/{version}" : {
"href" : "http://localhost:9393/streams/deployments/rollback/{name}/{version}",
"templated" : true
},
"streams/deployments/update/{name}" : {
"href" : "http://localhost:9393/streams/deployments/update/{name}",
"templated" : true
},
"streams/deployments/deployment" : {
"href" : "http://localhost:9393/streams/deployments/{name}",
"templated" : true
},
"streams/deployments/scale/{streamName}/{appName}/instances/{count}" : {
"href" : "http://localhost:9393/streams/deployments/scale/{streamName}/{appName}/instances/{count}",
"templated" : true
},
"streams/logs" : {
"href" : "http://localhost:9393/streams/logs"
},
"streams/logs/{streamName}" : {
"href" : "http://localhost:9393/streams/logs/{streamName}",
"templated" : true
},
"streams/logs/{streamName}/{appName}" : {
"href" : "http://localhost:9393/streams/logs/{streamName}/{appName}",
"templated" : true
},
"tasks/platforms" : {
"href" : "http://localhost:9393/tasks/platforms"
},
"tasks/definitions" : {
"href" : "http://localhost:9393/tasks/definitions"
},
"tasks/definitions/definition" : {
"href" : "http://localhost:9393/tasks/definitions/{name}",
"templated" : true
},
"tasks/executions" : {
"href" : "http://localhost:9393/tasks/executions"
},
"tasks/executions/name" : {
"href" : "http://localhost:9393/tasks/executions{?name}",
"templated" : true
},
"tasks/executions/current" : {
"href" : "http://localhost:9393/tasks/executions/current"
},
"tasks/executions/execution" : {
"href" : "http://localhost:9393/tasks/executions/{id}",
"templated" : true
},
"tasks/validation" : {
"href" : "http://localhost:9393/tasks/validation/{name}",
"templated" : true
},
"tasks/info/executions" : {
"href" : "http://localhost:9393/tasks/info/executions{?completed,name}",
"templated" : true
},
"tasks/logs" : {
"href" : "http://localhost:9393/tasks/logs/{taskExternalExecutionId}{?platformName}",
"templated" : true
},
"tasks/schedules" : {
"href" : "http://localhost:9393/tasks/schedules"
},
"tasks/schedules/instances" : {
"href" : "http://localhost:9393/tasks/schedules/instances/{taskDefinitionName}",
"templated" : true
},
"jobs/executions" : {
"href" : "http://localhost:9393/jobs/executions"
},
"jobs/executions/name" : {
"href" : "http://localhost:9393/jobs/executions{?name}",
"templated" : true
},
"jobs/executions/status" : {
"href" : "http://localhost:9393/jobs/executions{?status}",
"templated" : true
},
"jobs/executions/execution" : {
"href" : "http://localhost:9393/jobs/executions/{id}",
"templated" : true
},
"jobs/executions/execution/steps" : {
"href" : "http://localhost:9393/jobs/executions/{jobExecutionId}/steps",
"templated" : true
},
"jobs/executions/execution/steps/step" : {
"href" : "http://localhost:9393/jobs/executions/{jobExecutionId}/steps/{stepId}",
"templated" : true
},
"jobs/executions/execution/steps/step/progress" : {
"href" : "http://localhost:9393/jobs/executions/{jobExecutionId}/steps/{stepId}/progress",
"templated" : true
},
"jobs/instances/name" : {
"href" : "http://localhost:9393/jobs/instances{?name}",
"templated" : true
},
"jobs/instances/instance" : {
"href" : "http://localhost:9393/jobs/instances/{id}",
"templated" : true
},
"tools/parseTaskTextToGraph" : {
"href" : "http://localhost:9393/tools"
},
"tools/convertTaskGraphToText" : {
"href" : "http://localhost:9393/tools"
},
"jobs/thinexecutions" : {
"href" : "http://localhost:9393/jobs/thinexecutions"
},
"jobs/thinexecutions/name" : {
"href" : "http://localhost:9393/jobs/thinexecutions{?name}",
"templated" : true
},
"jobs/thinexecutions/jobInstanceId" : {
"href" : "http://localhost:9393/jobs/thinexecutions{?jobInstanceId}",
"templated" : true
},
"jobs/thinexecutions/taskExecutionId" : {
"href" : "http://localhost:9393/jobs/thinexecutions{?taskExecutionId}",
"templated" : true
},
"apps" : {
"href" : "http://localhost:9393/apps"
},
"about" : {
"href" : "http://localhost:9393/about"
},
"completions/stream" : {
"href" : "http://localhost:9393/completions/stream{?start,detailLevel}",
"templated" : true
},
"completions/task" : {
"href" : "http://localhost:9393/completions/task{?start,detailLevel}",
"templated" : true
}
},
"api.revision" : 14
}
Links
The main element of the index are the links, as they let you traverse the API and execute the desired functionality:
Relation | Description |
---|---|
|
Access meta information, including enabled features, security info, version information |
|
Access the dashboard UI |
|
Provides audit trail information |
|
Handle registered applications |
|
Exposes the DSL completion features for Stream |
|
Exposes the DSL completion features for Task |
|
Provides the JobExecution resource |
|
Provides the JobExecution thin resource with no step executions included |
|
Provides details for a specific JobExecution |
|
Provides the steps for a JobExecution |
|
Returns the details for a specific step |
|
Provides progress information for a specific step |
|
Retrieve Job Executions by Job name |
|
Retrieve Job Executions by Job status |
|
Retrieve Job Executions by Job name with no step executions included |
|
Retrieve Job Executions by Job Instance Id with no step executions included |
|
Retrieve Job Executions by Task Execution Id with no step executions included |
|
Provides the job instance resource for a specific job instance |
|
Provides the Job instance resource for a specific job name |
|
Exposes stream runtime status |
|
Exposes streams runtime status for a given stream names |
|
Provides the runtime application resource |
|
Exposes the runtime status for a specific app |
|
Provides the status for app instances |
|
Provides the status for specific app instance |
|
Provides the task definition resource |
|
Provides details for a specific task definition |
|
Provides the validation for a task definition |
|
Returns Task executions and allows launching of tasks |
|
Provides the current count of running tasks |
|
Provides the task executions info |
|
Provides schedule information of tasks |
|
Provides schedule information of a specific task |
|
Returns all task executions for a given Task name |
|
Provides details for a specific task execution |
|
Provides platform accounts for launching tasks. The results can be filtered to show the platforms that support scheduling by adding a request parameter of 'schedulesEnabled=true |
|
Retrieve the task application log |
|
Exposes the Streams resource |
|
Handle a specific Stream definition |
|
Provides the validation for a stream definition |
|
Provides Stream deployment operations |
|
Request deployment info for a stream definition |
|
Request deployment info for a stream definition |
|
Request (un-)deployment of an existing stream definition |
|
Return a manifest info of a release version |
|
Get stream’s deployment history as list or Releases for this release |
|
Rollback the stream to the previous or a specific version of the stream |
|
Update the stream. |
|
List of supported deployment platforms |
|
Scale up or down number of application instances for a selected stream |
|
Retrieve application logs of the stream |
|
Retrieve application logs of the stream |
|
Retrieve a specific application log of the stream |
|
Parse a task definition into a graph structure |
|
Convert a graph format into DSL text format |
44.2. Server Meta Information
The server meta information endpoint provides more information about the server itself. The following topics provide more details:
44.2.1. Retrieving information about the server
A GET
request returns meta information for Spring Cloud Data Flow, including:
-
Runtime environment information
-
Information regarding which features are enabled
-
Dependency information of Spring Cloud Data Flow Server
-
Security information
Request Structure
GET /about HTTP/1.1
Accept: application/json
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/about' -i -X GET \
-H 'Accept: application/json'
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2595
{
"featureInfo" : {
"analyticsEnabled" : true,
"streamsEnabled" : true,
"tasksEnabled" : true,
"schedulesEnabled" : true,
"monitoringDashboardType" : "NONE"
},
"versionInfo" : {
"implementation" : {
"name" : "${info.app.name}",
"version" : "${info.app.version}"
},
"core" : {
"name" : "Spring Cloud Data Flow Core",
"version" : "2.8.3"
},
"dashboard" : {
"name" : "Spring Cloud Dataflow UI",
"version" : "3.1.3"
},
"shell" : {
"name" : "Spring Cloud Data Flow Shell",
"version" : "2.8.3",
"url" : "https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-dataflow-shell/2.8.3/spring-cloud-dataflow-shell-2.8.3.jar"
}
},
"securityInfo" : {
"authenticationEnabled" : false,
"authenticated" : false,
"username" : null,
"roles" : [ ]
},
"runtimeEnvironment" : {
"appDeployer" : {
"deployerImplementationVersion" : "Test Version",
"deployerName" : "Test Server",
"deployerSpiVersion" : "2.7.3",
"javaVersion" : "1.8.0_302",
"platformApiVersion" : "",
"platformClientVersion" : "",
"platformHostVersion" : "",
"platformSpecificInfo" : {
"default" : "local"
},
"platformType" : "Skipper Managed",
"springBootVersion" : "2.4.11",
"springVersion" : "5.3.10"
},
"taskLaunchers" : [ {
"deployerImplementationVersion" : "2.6.3",
"deployerName" : "LocalTaskLauncher",
"deployerSpiVersion" : "2.6.3",
"javaVersion" : "1.8.0_302",
"platformApiVersion" : "Linux 5.8.0-1042-azure",
"platformClientVersion" : "5.8.0-1042-azure",
"platformHostVersion" : "5.8.0-1042-azure",
"platformSpecificInfo" : { },
"platformType" : "Local",
"springBootVersion" : "2.4.11",
"springVersion" : "5.3.10"
}, {
"deployerImplementationVersion" : "2.6.3",
"deployerName" : "LocalTaskLauncher",
"deployerSpiVersion" : "2.6.3",
"javaVersion" : "1.8.0_302",
"platformApiVersion" : "Linux 5.8.0-1042-azure",
"platformClientVersion" : "5.8.0-1042-azure",
"platformHostVersion" : "5.8.0-1042-azure",
"platformSpecificInfo" : { },
"platformType" : "Local",
"springBootVersion" : "2.4.11",
"springVersion" : "5.3.10"
} ]
},
"monitoringDashboardInfo" : {
"url" : "",
"refreshInterval" : 15,
"dashboardType" : "NONE",
"source" : "default-scdf-source"
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/about"
}
}
}
44.3. Registered Applications
The registered applications endpoint provides information about the applications that are registered with the Spring Cloud Data Flow server. The following topics provide more details:
44.3.1. Listing Applications
A GET
request lists all of the applications known to Spring Cloud Data Flow.
The following topics provide more details:
Request Structure
GET /apps?search=&type=source&defaultVersion=true&page=0&size=10&sort=name%2CASC HTTP/1.1
Accept: application/json
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The search string performed on the name (optional) |
|
Restrict the returned apps to the type of the app. One of [app, source, processor, sink, task] |
|
The boolean flag to set to retrieve only the apps of the default versions (optional) |
|
The zero-based page number (optional) |
|
The sort on the list (optional) |
|
The requested page size (optional) |
Example Request
$ curl 'http://localhost:9393/apps?search=&type=source&defaultVersion=true&page=0&size=10&sort=name%2CASC' -i -X GET \
-H 'Accept: application/json'
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1097
{
"_embedded" : {
"appRegistrationResourceList" : [ {
"name" : "http",
"type" : "source",
"uri" : "maven://org.springframework.cloud.stream.app:http-source-rabbit:1.2.0.RELEASE",
"version" : "1.2.0.RELEASE",
"defaultVersion" : true,
"versions" : [ "1.2.0.RELEASE" ],
"label" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/apps/source/http/1.2.0.RELEASE"
}
}
}, {
"name" : "time",
"type" : "source",
"uri" : "maven://org.springframework.cloud.stream.app:time-source-rabbit:1.2.0.RELEASE",
"version" : "1.2.0.RELEASE",
"defaultVersion" : true,
"versions" : [ "1.2.0.RELEASE" ],
"label" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/apps/source/time/1.2.0.RELEASE"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/apps?page=0&size=10&sort=name,asc"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.3.2. Getting Information on a Particular Application
A GET
request on /apps/<type>/<name>
gets info on a particular application.
The following topics provide more details:
Request Structure
GET /apps/source/http?exhaustive=false HTTP/1.1
Accept: application/json
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
Return all application properties, including common Spring Boot properties |
Path Parameters
/apps/{type}/{name}
Parameter | Description |
---|---|
|
The type of application to query. One of [app, source, processor, sink, task] |
|
The name of the application to query |
Example Request
$ curl 'http://localhost:9393/apps/source/http?exhaustive=false' -i -X GET \
-H 'Accept: application/json'
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2076
{
"name" : "http",
"type" : "source",
"uri" : "maven://org.springframework.cloud.stream.app:http-source-rabbit:1.2.0.RELEASE",
"version" : "1.2.0.RELEASE",
"defaultVersion" : true,
"versions" : null,
"label" : null,
"options" : [ {
"id" : "http.path-pattern",
"name" : "path-pattern",
"type" : "java.lang.String",
"description" : "An Ant-Style pattern to determine which http requests will be captured.",
"shortDescription" : "An Ant-Style pattern to determine which http requests will be captured.",
"defaultValue" : "/",
"hints" : {
"keyHints" : [ ],
"keyProviders" : [ ],
"valueHints" : [ ],
"valueProviders" : [ ]
},
"deprecation" : null,
"deprecated" : false
}, {
"id" : "http.mapped-request-headers",
"name" : "mapped-request-headers",
"type" : "java.lang.String[]",
"description" : "Headers that will be mapped.",
"shortDescription" : "Headers that will be mapped.",
"defaultValue" : null,
"hints" : {
"keyHints" : [ ],
"keyProviders" : [ ],
"valueHints" : [ ],
"valueProviders" : [ ]
},
"deprecation" : null,
"deprecated" : false
}, {
"id" : "http.secured",
"name" : "secured",
"type" : "java.lang.Boolean",
"description" : "Secure or not HTTP source path.",
"shortDescription" : "Secure or not HTTP source path.",
"defaultValue" : false,
"hints" : {
"keyHints" : [ ],
"keyProviders" : [ ],
"valueHints" : [ ],
"valueProviders" : [ ]
},
"deprecation" : null,
"deprecated" : false
}, {
"id" : "server.port",
"name" : "port",
"type" : "java.lang.Integer",
"description" : "Server HTTP port.",
"shortDescription" : "Server HTTP port.",
"defaultValue" : null,
"hints" : {
"keyHints" : [ ],
"keyProviders" : [ ],
"valueHints" : [ ],
"valueProviders" : [ ]
},
"deprecation" : null,
"deprecated" : false
} ],
"shortDescription" : null,
"inboundPortNames" : [ ],
"outboundPortNames" : [ ]
}
44.3.3. Registering a New Application
A POST
request on /apps/<type>/<name>
allows registration of a new application.
The following topics provide more details:
Request Structure
POST /apps/source/http HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
uri=maven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE
Request Parameters
Parameter | Description |
---|---|
|
URI where the application bits reside |
|
URI where the application metadata jar can be found |
|
Must be true if a registration with the same name and type already exists, otherwise an error will occur |
Path Parameters
/apps/{type}/{name}
Parameter | Description |
---|---|
|
The type of application to register. One of [app, source, processor, sink, task] |
|
The name of the application to register |
Example Request
$ curl 'http://localhost:9393/apps/source/http' -i -X POST \
-d 'uri=maven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE'
Response Structure
HTTP/1.1 201 Created
44.3.4. Registering a New Application with version
A POST
request on /apps/<type>/<name>/<version>
allows registration of a new application.
The following topics provide more details:
Request Structure
POST /apps/source/http/1.1.0.RELEASE HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
uri=maven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE
Request Parameters
Parameter | Description |
---|---|
|
URI where the application bits reside |
|
URI where the application metadata jar can be found |
|
Must be true if a registration with the same name and type already exists, otherwise an error will occur |
Path Parameters
/apps/{type}/{name}/{version:.+}
Parameter | Description |
---|---|
|
The type of application to register. One of [app, source, processor, sink, task] (optional) |
|
The name of the application to register |
|
The version of the application to register |
Example Request
$ curl 'http://localhost:9393/apps/source/http/1.1.0.RELEASE' -i -X POST \
-d 'uri=maven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE'
Response Structure
HTTP/1.1 201 Created
44.3.5. Registering Applications in Bulk
A POST
request on /apps
allows registering multiple applications at once.
The following topics provide more details:
Request Structure
POST /apps HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
apps=source.http%3Dmaven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE&force=false
Request Parameters
Parameter | Description |
---|---|
|
URI where a properties file containing registrations can be fetched. Exclusive with |
|
Inline set of registrations. Exclusive with |
|
Must be true if a registration with the same name and type already exists, otherwise an error will occur |
Example Request
$ curl 'http://localhost:9393/apps' -i -X POST \
-d 'apps=source.http%3Dmaven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE&force=false'
Response Structure
HTTP/1.1 201 Created
Content-Type: application/hal+json
Content-Length: 658
{
"_embedded" : {
"appRegistrationResourceList" : [ {
"name" : "http",
"type" : "source",
"uri" : "maven://org.springframework.cloud.stream.app:http-source-rabbit:1.1.0.RELEASE",
"version" : "1.1.0.RELEASE",
"defaultVersion" : true,
"versions" : null,
"label" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/apps/source/http/1.1.0.RELEASE"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/apps?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.3.6. Set the Default Application Version
For an application with the same name
and type
, you can register multiple versions.
In this case, you can choose one of the versions as the default application.
The following topics provide more details:
Request Structure
PUT /apps/source/http/1.2.0.RELEASE HTTP/1.1
Accept: application/json
Host: localhost:9393
Path Parameters
/apps/{type}/{name}/{version:.+}
Parameter | Description |
---|---|
|
The type of application. One of [app, source, processor, sink, task] |
|
The name of the application |
|
The version of the application |
Example Request
$ curl 'http://localhost:9393/apps/source/http/1.2.0.RELEASE' -i -X PUT \
-H 'Accept: application/json'
Response Structure
HTTP/1.1 202 Accepted
44.3.7. Unregistering an Application
A DELETE
request on /apps/<type>/<name>
unregisters a previously registered application.
The following topics provide more details:
Request Structure
DELETE /apps/source/http/1.2.0.RELEASE HTTP/1.1
Host: localhost:9393
Path Parameters
/apps/{type}/{name}/{version}
Parameter | Description |
---|---|
|
The type of application to unregister. One of [app, source, processor, sink, task] |
|
The name of the application to unregister |
|
The version of the application to unregister (optional) |
Example Request
$ curl 'http://localhost:9393/apps/source/http/1.2.0.RELEASE' -i -X DELETE
Response Structure
HTTP/1.1 200 OK
44.3.8. Unregistering all Applications
A DELETE
request on /apps
unregisters all the applications.
The following topics provide more details:
Request Structure
DELETE /apps HTTP/1.1
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/apps' -i -X DELETE
Response Structure
HTTP/1.1 200 OK
44.4. Audit Records
The audit records endpoint provides information about the audit records. The following topics provide more details:
44.4.1. List All Audit Records
The audit records endpoint lets you retrieve audit trail information.
The following topics provide more details:
Request Structure
GET /audit-records?page=0&size=10&operations=STREAM&actions=CREATE&fromDate=2000-01-01T00%3A00%3A00&toDate=2099-01-01T00%3A00%3A00 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
Comma-separated list of Audit Operations (optional) |
|
Comma-separated list of Audit Actions (optional) |
|
From date filter (ex.: 2019-02-03T00:00:30) (optional) |
|
To date filter (ex.: 2019-02-03T00:00:30) (optional) |
Example Request
$ curl 'http://localhost:9393/audit-records?page=0&size=10&operations=STREAM&actions=CREATE&fromDate=2000-01-01T00%3A00%3A00&toDate=2099-01-01T00%3A00%3A00' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 680
{
"_embedded" : {
"auditRecordResourceList" : [ {
"auditRecordId" : 5,
"createdBy" : null,
"correlationId" : "timelog",
"auditData" : "time --format='YYYY MM DD' | log",
"createdOn" : "2021-10-12T09:26:31.634Z",
"auditAction" : "CREATE",
"auditOperation" : "STREAM",
"platformName" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/audit-records/5"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/audit-records?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.4.2. Retrieve Audit Record Detail
The audit record endpoint lets you get a single audit record. The following topics provide more details:
Request Structure
GET /audit-records/5 HTTP/1.1
Host: localhost:9393
Path Parameters
/audit-records/{id}
Parameter | Description |
---|---|
|
The id of the audit record to query (required) |
Example Request
$ curl 'http://localhost:9393/audit-records/5' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 354
{
"auditRecordId" : 5,
"createdBy" : null,
"correlationId" : "timelog",
"auditData" : "time --format='YYYY MM DD' | log",
"createdOn" : "2021-10-12T09:26:31.634Z",
"auditAction" : "CREATE",
"auditOperation" : "STREAM",
"platformName" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/audit-records/5"
}
}
}
44.4.3. List all the Audit Action Types
The audit record endpoint lets you get the action types. The following topics provide more details:
Request Structure
GET /audit-records/audit-action-types HTTP/1.1
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/audit-records/audit-action-types' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1111
[ {
"id" : 100,
"name" : "Create",
"description" : "Create an Entity",
"key" : "CREATE",
"nameWithDescription" : "Create (Create an Entity)"
}, {
"id" : 200,
"name" : "Delete",
"description" : "Delete an Entity",
"key" : "DELETE",
"nameWithDescription" : "Delete (Delete an Entity)"
}, {
"id" : 300,
"name" : "Deploy",
"description" : "Deploy an Entity",
"key" : "DEPLOY",
"nameWithDescription" : "Deploy (Deploy an Entity)"
}, {
"id" : 400,
"name" : "Rollback",
"description" : "Rollback an Entity",
"key" : "ROLLBACK",
"nameWithDescription" : "Rollback (Rollback an Entity)"
}, {
"id" : 500,
"name" : "Undeploy",
"description" : "Undeploy an Entity",
"key" : "UNDEPLOY",
"nameWithDescription" : "Undeploy (Undeploy an Entity)"
}, {
"id" : 600,
"name" : "Update",
"description" : "Update an Entity",
"key" : "UPDATE",
"nameWithDescription" : "Update (Update an Entity)"
}, {
"id" : 700,
"name" : "SuccessfulLogin",
"description" : "Successful login",
"key" : "LOGIN_SUCCESS",
"nameWithDescription" : "SuccessfulLogin (Successful login)"
} ]
44.4.4. List all the Audit Operation Types
The audit record endpoint lets you get the operation types. The following topics provide more details:
Request Structure
GET /audit-records/audit-operation-types HTTP/1.1
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/audit-records/audit-operation-types' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 315
[ {
"id" : 100,
"name" : "App Registration",
"key" : "APP_REGISTRATION"
}, {
"id" : 200,
"name" : "Schedule",
"key" : "SCHEDULE"
}, {
"id" : 300,
"name" : "Stream",
"key" : "STREAM"
}, {
"id" : 400,
"name" : "Task",
"key" : "TASK"
}, {
"id" : 500,
"name" : "Login",
"key" : "LOGIN"
} ]
44.5. Stream Definitions
The registered applications endpoint provides information about the stream definitions that are registered with the Spring Cloud Data Flow server. The following topics provide more details:
44.5.1. Creating a New Stream Definition
Creating a stream definition is achieved by creating a POST request to the stream definitions endpoint.
A curl request for a ticktock
stream might resemble the following:
curl -X POST -d "name=ticktock&definition=time | log" localhost:9393/streams/definitions?deploy=false
A stream definition can also contain additional parameters. For instance, in the example shown under “Request Structure”, we also provide the date-time format.
The following topics provide more details:
Request Structure
POST /streams/definitions HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
name=timelog&definition=time+--format%3D%27YYYY+MM+DD%27+%7C+log&description=Demo+stream+for+testing&deploy=false
Request Parameters
Parameter | Description |
---|---|
|
The name for the created task definitions |
|
The definition for the stream, using Data Flow DSL |
|
The description of the stream definition |
|
If true, the stream is deployed upon creation (default is false) |
Example Request
$ curl 'http://localhost:9393/streams/definitions' -i -X POST \
-d 'name=timelog&definition=time+--format%3D%27YYYY+MM+DD%27+%7C+log&description=Demo+stream+for+testing&deploy=false'
Response Structure
HTTP/1.1 201 Created
Content-Type: application/hal+json
Content-Length: 410
{
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | log",
"status" : "undeployed",
"description" : "Demo stream for testing",
"statusDescription" : "The app or group is known to the system, but is not currently deployed",
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/timelog"
}
}
}
44.5.2. List All Stream Definitions
The streams endpoint lets you list all the stream definitions. The following topics provide more details:
Request Structure
GET /streams/definitions?page=0&sort=name%2CASC&search=&size=10 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The search string performed on the name (optional) |
|
The sort on the list (optional) |
|
The requested page size (optional) |
Example Request
$ curl 'http://localhost:9393/streams/definitions?page=0&sort=name%2CASC&search=&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1160
{
"_embedded" : {
"streamDefinitionResourceList" : [ {
"name" : "mysamplestream",
"dslText" : "time | log",
"originalDslText" : "time | log",
"status" : "undeployed",
"description" : "",
"statusDescription" : "The app or group is known to the system, but is not currently deployed",
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/mysamplestream"
}
}
}, {
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | log",
"status" : "undeployed",
"description" : "Demo stream for testing",
"statusDescription" : "The app or group is known to the system, but is not currently deployed",
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/timelog"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions?page=0&size=10&sort=name,asc"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.5.3. List Related Stream Definitions
The streams endpoint lets you list related stream definitions. The following topics provide more details:
Request Structure
GET /streams/definitions/timelog/related?page=0&sort=name%2CASC&search=&size=10&nested=true HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
Should we recursively findByTaskNameContains for related stream definitions (optional) |
|
The zero-based page number (optional) |
|
The search string performed on the name (optional) |
|
The sort on the list (optional) |
|
The requested page size (optional) |
Example Request
$ curl 'http://localhost:9393/streams/definitions/timelog/related?page=0&sort=name%2CASC&search=&size=10&nested=true' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 769
{
"_embedded" : {
"streamDefinitionResourceList" : [ {
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | log",
"status" : "undeployed",
"description" : "Demo stream for testing",
"statusDescription" : "The app or group is known to the system, but is not currently deployed",
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/timelog"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/timelog/related?page=0&size=10&sort=name,asc"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.5.4. Retrieve Stream Definition Detail
The stream definition endpoint lets you get a single stream definition. The following topics provide more details:
Request Structure
GET /streams/definitions/timelog HTTP/1.1
Host: localhost:9393
Path Parameters
/streams/definitions/{name}
Parameter | Description |
---|---|
|
The name of the stream definition to query (required) |
Example Request
$ curl 'http://localhost:9393/streams/definitions/timelog' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 410
{
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | log",
"status" : "undeployed",
"description" : "Demo stream for testing",
"statusDescription" : "The app or group is known to the system, but is not currently deployed",
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/timelog"
}
}
}
44.5.5. Delete a Single Stream Definition
The streams endpoint lets you delete a single stream definition. (See also: Delete All Stream Definitions.) The following topics provide more details:
Request Structure
DELETE /streams/definitions/timelog HTTP/1.1
Host: localhost:9393
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/streams/definitions/timelog' -i -X DELETE
Response Structure
HTTP/1.1 200 OK
44.5.6. Delete All Stream Definitions
The streams endpoint lets you delete all single stream definitions. (See also: Delete a Single Stream Definition.) The following topics provide more details:
Request Structure
DELETE /streams/definitions HTTP/1.1
Host: localhost:9393
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/streams/definitions' -i -X DELETE
Response Structure
HTTP/1.1 200 OK
44.6. Stream Validation
The stream validation endpoint lets you validate the apps in a stream definition. The following topics provide more details:
44.6.1. Request Structure
GET /streams/validation/timelog HTTP/1.1
Host: localhost:9393
44.6.2. Path Parameters
/streams/validation/{name}
Parameter | Description |
---|---|
|
The name of a stream definition to be validated (required) |
44.6.3. Example Request
$ curl 'http://localhost:9393/streams/validation/timelog' -i -X GET
44.6.4. Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 197
{
"appName" : "timelog",
"dsl" : "time --format='YYYY MM DD' | log",
"description" : "Demo stream for testing",
"appStatuses" : {
"source:time" : "valid",
"sink:log" : "valid"
}
}
44.7. Stream Deployments
The deployment definitions endpoint provides information about the deployments that are registered with the Spring Cloud Data Flow server. The following topics provide more details:
44.7.1. Deploying Stream Definition
The stream definition endpoint lets you deploy a single stream definition. Optionally, you can pass application parameters as properties in the request body. The following topics provide more details:
Request Structure
POST /streams/deployments/timelog HTTP/1.1
Content-Type: application/json
Content-Length: 36
Host: localhost:9393
{"app.time.timestamp.format":"YYYY"}
/streams/deployments/{timelog}
Parameter | Description |
---|---|
|
The name of an existing stream definition (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/streams/deployments/timelog' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"app.time.timestamp.format":"YYYY"}'
Response Structure
HTTP/1.1 201 Created
44.7.2. Undeploy Stream Definition
The stream definition endpoint lets you undeploy a single stream definition. The following topics provide more details:
Request Structure
DELETE /streams/deployments/timelog HTTP/1.1
Host: localhost:9393
/streams/deployments/{timelog}
Parameter | Description |
---|---|
|
The name of an existing stream definition (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/streams/deployments/timelog' -i -X DELETE
Response Structure
HTTP/1.1 200 OK
44.7.3. Undeploy All Stream Definitions
The stream definition endpoint lets you undeploy all single stream definitions. The following topics provide more details:
Request Structure
DELETE /streams/deployments HTTP/1.1
Host: localhost:9393
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/streams/deployments' -i -X DELETE
Response Structure
HTTP/1.1 200 OK
44.7.4. Update Deployed Stream
Thanks to Skipper, you can update deployed streams, and provide additional deployment properties.
Request Structure
POST /streams/deployments/update/timelog1 HTTP/1.1
Content-Type: application/json
Content-Length: 196
Host: localhost:9393
{"releaseName":"timelog1","packageIdentifier":{"repositoryName":"test","packageName":"timelog1","packageVersion":"1.0.0"},"updateProperties":{"app.time.timestamp.format":"YYYYMMDD"},"force":false}
/streams/deployments/update/{timelog1}
Parameter | Description |
---|---|
|
The name of an existing stream definition (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/streams/deployments/update/timelog1' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"releaseName":"timelog1","packageIdentifier":{"repositoryName":"test","packageName":"timelog1","packageVersion":"1.0.0"},"updateProperties":{"app.time.timestamp.format":"YYYYMMDD"},"force":false}'
Response Structure
HTTP/1.1 201 Created
44.7.5. Rollback Stream Definition
Rollback the stream to the previous or a specific version of the stream.
Request Structure
POST /streams/deployments/rollback/timelog1/1 HTTP/1.1
Content-Type: application/json
Host: localhost:9393
/streams/deployments/rollback/{name}/{version}
Parameter | Description |
---|---|
|
The name of an existing stream definition (required) |
|
The version to rollback to |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/streams/deployments/rollback/timelog1/1' -i -X POST \
-H 'Content-Type: application/json'
Response Structure
HTTP/1.1 201 Created
44.7.6. Get Manifest
Return a manifest of a released version. For packages with dependencies, the manifest includes the contents of those dependencies.
Request Structure
GET /streams/deployments/manifest/timelog1/1 HTTP/1.1
Content-Type: application/json
Host: localhost:9393
/streams/deployments/manifest/{name}/{version}
Parameter | Description |
---|---|
|
The name of an existing stream definition (required) |
|
The version of the stream |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/streams/deployments/manifest/timelog1/1' -i -X GET \
-H 'Content-Type: application/json'
Response Structure
HTTP/1.1 200 OK
44.7.7. Get Deployment History
Get the stream’s deployment history.
Request Structure
GET /streams/deployments/history/timelog1 HTTP/1.1
Content-Type: application/json
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/streams/deployments/history/timelog1' -i -X GET \
-H 'Content-Type: application/json'
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 162
[ {
"name" : null,
"version" : 0,
"info" : null,
"pkg" : null,
"configValues" : {
"raw" : null
},
"manifest" : null,
"platformName" : null
} ]
44.7.8. Get Deployment Platforms
Retrieve a list of supported deployment platforms.
Request Structure
GET /streams/deployments/platform/list HTTP/1.1
Content-Type: application/json
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/streams/deployments/platform/list' -i -X GET \
-H 'Content-Type: application/json'
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 106
[ {
"id" : null,
"name" : "default",
"type" : "local",
"description" : null,
"options" : [ ]
} ]
44.7.9. Scale Stream Definition
The stream definition endpoint lets you scale a single app in a stream definition. Optionally, you can pass application parameters as properties in the request body. The following topics provide more details:
Request Structure
POST /streams/deployments/scale/timelog/log/instances/1 HTTP/1.1
Content-Type: application/json
Content-Length: 36
Host: localhost:9393
{"app.time.timestamp.format":"YYYY"}
/streams/deployments/scale/{streamName}/{appName}/instances/{count}
Parameter | Description |
---|---|
|
the name of an existing stream definition (required) |
|
in stream application name to scale |
|
number of instances for the selected stream application (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/streams/deployments/scale/timelog/log/instances/1' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"app.time.timestamp.format":"YYYY"}'
Response Structure
HTTP/1.1 201 Created
44.8. Task Definitions
The task definitions endpoint provides information about the task definitions that are registered with the Spring Cloud Data Flow server. The following topics provide more details:
44.8.1. Creating a New Task Definition
The task definition endpoint lets you create a new task definition. The following topics provide more details:
Request Structure
POST /tasks/definitions HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
name=my-task&definition=timestamp+--format%3D%27YYYY+MM+DD%27&description=Demo+task+definition+for+testing
Request Parameters
Parameter | Description |
---|---|
|
The name for the created task definition |
|
The definition for the task, using Data Flow DSL |
|
The description of the task definition |
Example Request
$ curl 'http://localhost:9393/tasks/definitions' -i -X POST \
-d 'name=my-task&definition=timestamp+--format%3D%27YYYY+MM+DD%27&description=Demo+task+definition+for+testing'
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 342
{
"name" : "my-task",
"dslText" : "timestamp --format='YYYY MM DD'",
"description" : "Demo task definition for testing",
"composed" : false,
"composedTaskElement" : false,
"lastTaskExecution" : null,
"status" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/definitions/my-task"
}
}
}
44.8.2. List All Task Definitions
The task definition endpoint lets you get all task definitions. The following topics provide more details:
Request Structure
GET /tasks/definitions?page=0&size=10&sort=taskName%2CASC&search=&manifest=true HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
The search string performed on the name (optional) |
|
The sort on the list (optional) |
|
The flag to include the task manifest into the latest task execution (optional) |
Example Request
$ curl 'http://localhost:9393/tasks/definitions?page=0&size=10&sort=taskName%2CASC&search=&manifest=true' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 689
{
"_embedded" : {
"taskDefinitionResourceList" : [ {
"name" : "my-task",
"dslText" : "timestamp --format='YYYY MM DD'",
"description" : "Demo task definition for testing",
"composed" : false,
"composedTaskElement" : false,
"lastTaskExecution" : null,
"status" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/definitions/my-task"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/definitions?page=0&size=10&sort=taskName,asc"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.8.3. Retrieve Task Definition Detail
The task definition endpoint lets you get a single task definition. The following topics provide more details:
Request Structure
GET /tasks/definitions/my-task?manifest=true HTTP/1.1
Host: localhost:9393
/tasks/definitions/{my-task}
Parameter | Description |
---|---|
|
The name of an existing task definition (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/tasks/definitions/my-task?manifest=true' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 342
{
"name" : "my-task",
"dslText" : "timestamp --format='YYYY MM DD'",
"description" : "Demo task definition for testing",
"composed" : false,
"composedTaskElement" : false,
"lastTaskExecution" : null,
"status" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/definitions/my-task"
}
}
}
44.8.4. Delete Task Definition
The task definition endpoint lets you delete a single task definition. The following topics provide more details:
Request Structure
DELETE /tasks/definitions/my-task?cleanup=true HTTP/1.1
Host: localhost:9393
/tasks/definitions/{my-task}
Parameter | Description |
---|---|
|
The name of an existing task definition (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/tasks/definitions/my-task?cleanup=true' -i -X DELETE
Response Structure
HTTP/1.1 200 OK
44.9. Task Scheduler
The task scheduler endpoint provides information about the task schedules that are registered with the Scheduler Implementation. The following topics provide more details:
44.9.1. Creating a New Task Schedule
The task schedule endpoint lets you create a new task schedule. The following topics provide more details:
Request Structure
POST /tasks/schedules HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
scheduleName=myschedule&taskDefinitionName=mytaskname&properties=scheduler.cron.expression%3D00+22+17+%3F+*&arguments=--foo%3Dbar
Request Parameters
Parameter | Description |
---|---|
|
The name for the created schedule |
|
The name of the task definition to be scheduled |
|
the properties that are required to schedule and launch the task |
|
the command line arguments to be used for launching the task |
Example Request
$ curl 'http://localhost:9393/tasks/schedules' -i -X POST \
-d 'scheduleName=myschedule&taskDefinitionName=mytaskname&properties=scheduler.cron.expression%3D00+22+17+%3F+*&arguments=--foo%3Dbar'
Response Structure
HTTP/1.1 201 Created
44.9.2. List All Schedules
The task schedules endpoint lets you get all task schedules. The following topics provide more details:
Request Structure
GET /tasks/schedules?page=0&size=10 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
Example Request
$ curl 'http://localhost:9393/tasks/schedules?page=0&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 587
{
"_embedded" : {
"scheduleInfoResourceList" : [ {
"scheduleName" : "FOO",
"taskDefinitionName" : "BAR",
"scheduleProperties" : {
"scheduler.AAA.spring.cloud.scheduler.cron.expression" : "00 41 17 ? * *"
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/schedules/FOO"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/schedules?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.9.3. List Filtered Schedules
The task schedules endpoint lets you get all task schedules that have the specified task definition name. The following topics provide more details:
Request Structure
GET /tasks/schedules/instances/FOO?page=0&size=10 HTTP/1.1
Host: localhost:9393
/tasks/schedules/instances/{task-definition-name}
Parameter | Description |
---|---|
|
Filter schedules based on the specified task definition (required) |
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
Example Request
$ curl 'http://localhost:9393/tasks/schedules/instances/FOO?page=0&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 599
{
"_embedded" : {
"scheduleInfoResourceList" : [ {
"scheduleName" : "FOO",
"taskDefinitionName" : "BAR",
"scheduleProperties" : {
"scheduler.AAA.spring.cloud.scheduler.cron.expression" : "00 41 17 ? * *"
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/schedules/FOO"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/schedules/instances/FOO?page=0&size=1"
}
},
"page" : {
"size" : 1,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.9.4. Delete Task Schedule
The task schedule endpoint lets you delete a single task schedule. The following topics provide more details:
Request Structure
DELETE /tasks/schedules/mytestschedule HTTP/1.1
Host: localhost:9393
/tasks/schedules/{scheduleName}
Parameter | Description |
---|---|
|
The name of an existing schedule (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/tasks/schedules/mytestschedule' -i -X DELETE
Response Structure
HTTP/1.1 200 OK
44.10. Task Validation
The task validation endpoint lets you validate the apps in a task definition. The following topics provide more details:
44.10.1. Request Structure
GET /tasks/validation/taskC HTTP/1.1
Host: localhost:9393
44.10.2. Path Parameters
/tasks/validation/{name}
Parameter | Description |
---|---|
|
The name of a task definition to be validated (required) |
44.10.3. Example Request
$ curl 'http://localhost:9393/tasks/validation/taskC' -i -X GET
44.10.4. Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 144
{
"appName" : "taskC",
"dsl" : "timestamp --format='yyyy MM dd'",
"description" : "",
"appStatuses" : {
"task:taskC" : "valid"
}
}
44.11. Task Executions
The task executions endpoint provides information about the task executions that are registered with the Spring Cloud Data Flow server. The following topics provide more details:
44.11.1. Launching a Task
Launching a task is done by requesting the creation of a new task execution. The following topics provide more details:
Request Structure
POST /tasks/executions HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
name=taskA&properties=app.my-task.foo%3Dbar%2Cdeployer.my-task.something-else%3D3&arguments=--server.port%3D8080+--foo%3Dbar
Request Parameters
Parameter | Description |
---|---|
|
The name of the task definition to launch |
|
Application and Deployer properties to use while launching |
|
Command line arguments to pass to the task |
Example Request
$ curl 'http://localhost:9393/tasks/executions' -i -X POST \
-d 'name=taskA&properties=app.my-task.foo%3Dbar%2Cdeployer.my-task.something-else%3D3&arguments=--server.port%3D8080+--foo%3Dbar'
Response Structure
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1
1
44.11.2. Stopping a Task
Stopping a task is done by posting the id of an existing task execution. The following topics provide more details:
Request Structure
POST /tasks/executions/1 HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
platform=default
Path Parameters
/tasks/executions/{id}
Parameter | Description |
---|---|
|
The ids of an existing task execution (required) |
Request Parameters
Parameter | Description |
---|---|
|
The platform associated with the task execution(optional) |
Example Request
$ curl 'http://localhost:9393/tasks/executions/1' -i -X POST \
-d 'platform=default'
Response Structure
HTTP/1.1 200 OK
44.11.3. List All Task Executions
The task executions endpoint lets you list all task executions. The following topics provide more details:
Request Structure
GET /tasks/executions?page=0&size=10 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
Example Request
$ curl 'http://localhost:9393/tasks/executions?page=0&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2711
{
"_embedded" : {
"taskExecutionResourceList" : [ {
"executionId" : 2,
"exitCode" : null,
"taskName" : "taskB",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskB-45c8bd1d-7230-4488-9e27-7e94110a193e",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"management.metrics.tags.service" : "task-application",
"timestamp.format" : "yyyy MM dd",
"spring.datasource.username" : null,
"spring.datasource.url" : null,
"spring.datasource.driverClassName" : null,
"management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
"spring.cloud.task.name" : "taskB"
},
"deploymentProperties" : {
"app.my-task.foo" : "bar",
"deployer.my-task.something-else" : "3"
},
"platformName" : "default",
"taskExecutionStatus" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions/2"
}
}
}, {
"executionId" : 1,
"exitCode" : null,
"taskName" : "taskA",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskA-ea1a4c72-1cd6-45df-aa23-570fcc4babf4",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"management.metrics.tags.service" : "task-application",
"timestamp.format" : "yyyy MM dd",
"spring.datasource.username" : null,
"spring.datasource.url" : null,
"spring.datasource.driverClassName" : null,
"management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
"spring.cloud.task.name" : "taskA"
},
"deploymentProperties" : {
"app.my-task.foo" : "bar",
"deployer.my-task.something-else" : "3"
},
"platformName" : "default",
"taskExecutionStatus" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.11.4. List All Task Executions With a Specified Task Name
The task executions endpoint lets you list task executions with a specified task name. The following topics provide more details:
Request Structure
GET /tasks/executions?name=taskB&page=0&size=10 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
The name associated with the task execution |
Example Request
$ curl 'http://localhost:9393/tasks/executions?name=taskB&page=0&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1492
{
"_embedded" : {
"taskExecutionResourceList" : [ {
"executionId" : 2,
"exitCode" : null,
"taskName" : "taskB",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskB-45c8bd1d-7230-4488-9e27-7e94110a193e",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"management.metrics.tags.service" : "task-application",
"timestamp.format" : "yyyy MM dd",
"spring.datasource.username" : null,
"spring.datasource.url" : null,
"spring.datasource.driverClassName" : null,
"management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
"spring.cloud.task.name" : "taskB"
},
"deploymentProperties" : {
"app.my-task.foo" : "bar",
"deployer.my-task.something-else" : "3"
},
"platformName" : "default",
"taskExecutionStatus" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.11.5. Task Execution Detail
The task executions endpoint lets you get the details about a task execution. The following topics provide more details:
Request Structure
GET /tasks/executions/1 HTTP/1.1
Host: localhost:9393
/tasks/executions/{id}
Parameter | Description |
---|---|
|
The id of an existing task execution (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/tasks/executions/1' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1085
{
"executionId" : 1,
"exitCode" : null,
"taskName" : "taskA",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskA-ea1a4c72-1cd6-45df-aa23-570fcc4babf4",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"management.metrics.tags.service" : "task-application",
"timestamp.format" : "yyyy MM dd",
"spring.datasource.username" : null,
"spring.datasource.url" : null,
"spring.datasource.driverClassName" : null,
"management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
"spring.cloud.task.name" : "taskA"
},
"deploymentProperties" : {
"app.my-task.foo" : "bar",
"deployer.my-task.something-else" : "3"
},
"platformName" : "default",
"taskExecutionStatus" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions/1"
}
}
}
44.11.6. Delete Task Execution
The task execution endpoint lets you:
-
Clean up resources used to deploy the task
-
Remove relevant task data as well as possibly associated Spring Batch job data from the persistence store
The cleanup implementation (first option) is platform specific. Both operations can be triggered at once or separately. |
The following topics provide more details:
Please refer to the following section in regards to Deleting Task Execution Data.
Request Structure
DELETE /tasks/executions/1,2?action=CLEANUP,REMOVE_DATA HTTP/1.1
Host: localhost:9393
/tasks/executions/{ids}
Parameter | Description |
---|---|
|
Providing 2 comma separated task execution id values. |
You must provide task execution IDs that actually exist. Otherwise, a |
Request Parameters
This endpoint supports one optional request parameter named action. It is an enumeration and supports the following values:
-
CLEANUP
-
REMOVE_DATA
Parameter | Description |
---|---|
|
Using both actions CLEANUP and REMOVE_DATA simultaneously. |
Example Request
$ curl 'http://localhost:9393/tasks/executions/1,2?action=CLEANUP,REMOVE_DATA' -i -X DELETE
Response Structure
HTTP/1.1 200 OK
44.11.7. Deleting Task Execution Data
Not only can you clean up resources that were used to deploy tasks but you can also delete the data associated with task executions from the underlying persistence store. Also, if a task execution is associated with one or more batch job executions, these are removed as well.
The following example illustrates how a request can be made using multiple task execution IDs and multiple actions:
$ curl 'http://localhost:9393/tasks/executions/1,2?action=CLEANUP,REMOVE_DATA' -i -X DELETE
/tasks/executions/{ids}
Parameter | Description |
---|---|
|
Providing 2 comma separated task execution id values. |
Parameter | Description |
---|---|
|
Using both actions CLEANUP and REMOVE_DATA simultaneously. |
When deleting data from the persistence store by using the REMOVE_DATA action parameter, you must provide
task execution IDs that represent parent task executions. When you provide child task executions (executed as part of a composed task),
a 400 (Bad Request) HTTP status is returned.
|
44.11.8. Task Execution Current Count
The task executions current endpoint lets you retrieve the current number of running executions. The following topics provide more details:
Request Structure
Unresolved directive in api-guide.adoc - include::/home/runner/work/spring-cloud-dataflow/spring-cloud-dataflow/spring-cloud-dataflow-docs/../spring-cloud-dataflow-classic-docs/target/generated-snippets/task-executions-documentation/launch-task-current-count/http-request.adoc[]
Request Parameters
There are no request parameters for this endpoint.
Example Request
Unresolved directive in api-guide.adoc - include::/home/runner/work/spring-cloud-dataflow/spring-cloud-dataflow/spring-cloud-dataflow-docs/../spring-cloud-dataflow-classic-docs/target/generated-snippets/task-executions-documentation/launch-task-current-count/curl-request.adoc[]
Response Structure
Unresolved directive in api-guide.adoc - include::/home/runner/work/spring-cloud-dataflow/spring-cloud-dataflow/spring-cloud-dataflow-docs/../spring-cloud-dataflow-classic-docs/target/generated-snippets/task-executions-documentation/launch-task-current-count/http-response.adoc[]
44.12. Job Executions
The job executions endpoint provides information about the job executions that are registered with the Spring Cloud Data Flow server. The following topics provide more details:
-
List All Job Executions With a Specified Job Name Without Step Executions Included
-
List All Job Executions For A Specified Date Range Without Step Executions Included
-
List All Job Executions For A Specified Job Instance Id Without Step Executions Included
-
List All Job Executions For A Specified Task Execution Id Without Step Executions Included
44.12.1. List All Job Executions
The job executions endpoint lets you list all job executions. The following topics provide more details:
Request Structure
GET /jobs/executions?page=0&size=10 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
Example Request
$ curl 'http://localhost:9393/jobs/executions?page=0&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3379
{
"_embedded" : {
"jobExecutionResourceList" : [ {
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"name" : "DOCJOB1",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 2,
"version" : 1,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 2,
"version" : null,
"jobName" : "DOCJOB1",
"instanceId" : 2
},
"stepExecutions" : [ ],
"status" : "STOPPED",
"startTime" : "2021-10-12T09:26:44.841+0000",
"createTime" : "2021-10-12T09:26:44.840+0000",
"endTime" : null,
"lastUpdated" : "2021-10-12T09:26:44.841+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 2,
"stopping" : false,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/2"
}
}
}, {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 1,
"version" : 2,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 1,
"version" : null,
"jobName" : "DOCJOB",
"instanceId" : 1
},
"stepExecutions" : [ ],
"status" : "STOPPING",
"startTime" : "2021-10-12T09:26:44.837+0000",
"createTime" : "2021-10-12T09:26:44.836+0000",
"endTime" : null,
"lastUpdated" : "2021-10-12T09:26:44.901+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 1,
"stopping" : true,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : true,
"stoppable" : false,
"defined" : false,
"timeZone" : "UTC",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.12.2. List All Job Executions Without Step Executions Included
The job executions endpoint lets you list all job executions without step executions included. The following topics provide more details:
Request Structure
GET /jobs/thinexecutions?page=0&size=10 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
Example Request
$ curl 'http://localhost:9393/jobs/thinexecutions?page=0&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1604
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"instanceId" : 2,
"name" : "DOCJOB1",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"startDateTime" : "2021-10-12T09:26:44.841+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"status" : "STOPPED",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions/2"
}
}
}, {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"startDateTime" : "2021-10-12T09:26:44.837+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : false,
"timeZone" : "UTC",
"status" : "STARTED",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.12.3. List All Job Executions With a Specified Job Name
The job executions endpoint lets you list all job executions. The following topics provide more details:
Request Structure
GET /jobs/executions?name=DOCJOB&page=0&size=10 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
The name associated with the job execution |
Example Request
$ curl 'http://localhost:9393/jobs/executions?name=DOCJOB&page=0&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1825
{
"_embedded" : {
"jobExecutionResourceList" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 1,
"version" : 2,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 1,
"version" : null,
"jobName" : "DOCJOB",
"instanceId" : 1
},
"stepExecutions" : [ ],
"status" : "STOPPING",
"startTime" : "2021-10-12T09:26:44.837+0000",
"createTime" : "2021-10-12T09:26:44.836+0000",
"endTime" : null,
"lastUpdated" : "2021-10-12T09:26:44.901+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 1,
"stopping" : true,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : true,
"stoppable" : false,
"defined" : false,
"timeZone" : "UTC",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.12.4. List All Job Executions With a Specified Job Name Without Step Executions Included
The job executions endpoint lets you list all job executions. The following topics provide more details:
Request Structure
GET /jobs/thinexecutions?name=DOCJOB&page=0&size=10 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
The name associated with the job execution |
Example Request
$ curl 'http://localhost:9393/jobs/thinexecutions?name=DOCJOB&page=0&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 943
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"startDateTime" : "2021-10-12T09:26:44.837+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : true,
"stoppable" : false,
"defined" : false,
"timeZone" : "UTC",
"status" : "STOPPING",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.12.5. List All Job Executions For A Specified Date Range Without Step Executions Included
The job executions endpoint lets you list all job executions. The following topics provide more details:
Request Structure
GET /jobs/thinexecutions?page=0&size=10&fromDate=2000-09-24T17%3A00%3A45%2C000&toDate=2050-09-24T18%3A00%3A45%2C000 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
Filter result from a starting date in the format 'yyyy-MM-dd’T’HH:mm:ss,SSS' |
|
Filter result up to the |
Example Request
$ curl 'http://localhost:9393/jobs/thinexecutions?page=0&size=10&fromDate=2000-09-24T17%3A00%3A45%2C000&toDate=2050-09-24T18%3A00%3A45%2C000' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1605
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"instanceId" : 2,
"name" : "DOCJOB1",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"startDateTime" : "2021-10-12T09:26:44.841+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"status" : "STOPPED",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions/2"
}
}
}, {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"startDateTime" : "2021-10-12T09:26:44.837+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : true,
"stoppable" : false,
"defined" : false,
"timeZone" : "UTC",
"status" : "STOPPING",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.12.6. List All Job Executions For A Specified Job Instance Id Without Step Executions Included
The job executions endpoint lets you list all job executions. The following topics provide more details:
Request Structure
GET /jobs/thinexecutions?page=0&size=10&jobInstanceId=1 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
Filter result by the job instance id |
Example Request
$ curl 'http://localhost:9393/jobs/thinexecutions?page=0&size=10&jobInstanceId=1' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 943
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"startDateTime" : "2021-10-12T09:26:44.837+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : true,
"stoppable" : false,
"defined" : false,
"timeZone" : "UTC",
"status" : "STOPPING",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.12.7. List All Job Executions For A Specified Task Execution Id Without Step Executions Included
The job executions endpoint lets you list all job executions. The following topics provide more details:
Request Structure
GET /jobs/thinexecutions?page=0&size=10&taskExecutionId=1 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
Filter result by the task execution id |
Example Request
$ curl 'http://localhost:9393/jobs/thinexecutions?page=0&size=10&taskExecutionId=1' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 943
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"startDateTime" : "2021-10-12T09:26:44.837+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : true,
"stoppable" : false,
"defined" : false,
"timeZone" : "UTC",
"status" : "STOPPING",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.12.8. Job Execution Detail
The job executions endpoint lets you get the details about a job execution. The following topics provide more details:
Request Structure
GET /jobs/executions/2 HTTP/1.1
Host: localhost:9393
/jobs/executions/{id}
Parameter | Description |
---|---|
|
The id of an existing job execution (required) |
Request Parameters
There are no request parameter for this endpoint.
Example Request
$ curl 'http://localhost:9393/jobs/executions/2' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1321
{
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"name" : "DOCJOB1",
"startDate" : "2021-10-12",
"startTime" : "09:26:44",
"duration" : "00:00:01",
"jobExecution" : {
"id" : 2,
"version" : 1,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 2,
"version" : 0,
"jobName" : "DOCJOB1",
"instanceId" : 2
},
"stepExecutions" : [ ],
"status" : "STOPPED",
"startTime" : "2021-10-12T09:26:44.841+0000",
"createTime" : "2021-10-12T09:26:44.840+0000",
"endTime" : null,
"lastUpdated" : "2021-10-12T09:26:44.841+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 2,
"stopping" : false,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/2"
}
}
}
44.12.9. Stop Job Execution
The job executions endpoint lets you stop a job execution. The following topics provide more details:
Request structure
PUT /jobs/executions/1 HTTP/1.1
Accept: application/json
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
stop=true
/jobs/executions/{id}
Parameter | Description |
---|---|
|
The id of an existing job execution (required) |
Request parameters
Parameter | Description |
---|---|
|
Sends signal to stop the job if set to true |
Example request
$ curl 'http://localhost:9393/jobs/executions/1' -i -X PUT \
-H 'Accept: application/json' \
-d 'stop=true'
Response structure
HTTP/1.1 200 OK
44.12.10. Restart Job Execution
The job executions endpoint lets you restart a job execution. The following topics provide more details:
Request Structure
PUT /jobs/executions/2 HTTP/1.1
Accept: application/json
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
restart=true
/jobs/executions/{id}
Parameter | Description |
---|---|
|
The id of an existing job execution (required) |
Request Parameters
Parameter | Description |
---|---|
|
Sends signal to restart the job if set to true |
Example Request
$ curl 'http://localhost:9393/jobs/executions/2' -i -X PUT \
-H 'Accept: application/json' \
-d 'restart=true'
Response Structure
HTTP/1.1 200 OK
44.13. Job Instances
The job instances endpoint provides information about the job instances that are registered with the Spring Cloud Data Flow server. The following topics provide more details:
44.13.1. List All Job Instances
The job instances endpoint lets you list all job instances. The following topics provide more details:
Request Structure
GET /jobs/instances?name=DOCJOB&page=0&size=10 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
The name associated with the job instance |
Example Request
$ curl 'http://localhost:9393/jobs/instances?name=DOCJOB&page=0&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2014
{
"_embedded" : {
"jobInstanceResourceList" : [ {
"jobName" : "DOCJOB",
"jobInstanceId" : 1,
"jobExecutions" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2021-10-12",
"startTime" : "09:26:42",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 1,
"version" : 1,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 1,
"version" : 0,
"jobName" : "DOCJOB",
"instanceId" : 1
},
"stepExecutions" : [ ],
"status" : "STARTED",
"startTime" : "2021-10-12T09:26:42.981+0000",
"createTime" : "2021-10-12T09:26:42.979+0000",
"endTime" : null,
"lastUpdated" : "2021-10-12T09:26:42.981+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 1,
"stopping" : false,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : false,
"timeZone" : "UTC"
} ],
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/instances/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/instances?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.13.2. Job Instance Detail
The job instances endpoint lets you list all job instances. The following topics provide more details:
Request Structure
GET /jobs/instances/1 HTTP/1.1
Host: localhost:9393
/jobs/instances/{id}
Parameter | Description |
---|---|
|
The id of an existing job instance (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/jobs/instances/1' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1499
{
"jobName" : "DOCJOB",
"jobInstanceId" : 1,
"jobExecutions" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2021-10-12",
"startTime" : "09:26:42",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 1,
"version" : 1,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 1,
"version" : 0,
"jobName" : "DOCJOB",
"instanceId" : 1
},
"stepExecutions" : [ ],
"status" : "STARTED",
"startTime" : "2021-10-12T09:26:42.981+0000",
"createTime" : "2021-10-12T09:26:42.979+0000",
"endTime" : null,
"lastUpdated" : "2021-10-12T09:26:42.981+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 1,
"stopping" : false,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : false,
"timeZone" : "UTC"
} ],
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/instances/1"
}
}
}
44.14. Job Step Executions
The job step executions endpoint provides information about the job step executions that are registered with the Spring Cloud Data Flow server. The following topics provide more details:
44.14.1. List All Step Executions For a Job Execution
The job step executions endpoint lets you list all job step executions. The following topics provide more details:
Request Structure
GET /jobs/executions/1/steps?page=0&size=10 HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
Example Request
$ curl 'http://localhost:9393/jobs/executions/1/steps?page=0&size=10' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1677
{
"_embedded" : {
"stepExecutionResourceList" : [ {
"jobExecutionId" : 1,
"stepExecution" : {
"id" : 1,
"version" : 0,
"stepName" : "DOCJOB_STEP",
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2021-10-12T09:26:27.879+0000",
"endTime" : null,
"lastUpdated" : "2021-10-12T09:26:27.879+0000",
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"exitStatus" : {
"exitCode" : "EXECUTING",
"exitDescription" : "",
"running" : true
},
"terminateOnly" : false,
"filterCount" : 0,
"failureExceptions" : [ ],
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobExecutionId" : 1,
"skipCount" : 0,
"summary" : "StepExecution: id=1, version=0, name=DOCJOB_STEP, status=STARTING, exitStatus=EXECUTING, readCount=0, filterCount=0, writeCount=0 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=0, rollbackCount=0"
},
"stepType" : "",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.14.2. Job Step Execution Detail
The job step executions endpoint lets you get details about a job step execution. The following topics provide more details:
Request Structure
GET /jobs/executions/1/steps/1 HTTP/1.1
Host: localhost:9393
/jobs/executions/{id}/steps/{stepid}
Parameter | Description |
---|---|
|
The id of an existing job execution (required) |
|
The id of an existing step execution for a specific job execution (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/jobs/executions/1/steps/1' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1219
{
"jobExecutionId" : 1,
"stepExecution" : {
"id" : 1,
"version" : 0,
"stepName" : "DOCJOB_STEP",
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2021-10-12T09:26:27.879+0000",
"endTime" : null,
"lastUpdated" : "2021-10-12T09:26:27.879+0000",
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"exitStatus" : {
"exitCode" : "EXECUTING",
"exitDescription" : "",
"running" : true
},
"terminateOnly" : false,
"filterCount" : 0,
"failureExceptions" : [ ],
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobExecutionId" : 1,
"skipCount" : 0,
"summary" : "StepExecution: id=1, version=0, name=DOCJOB_STEP, status=STARTING, exitStatus=EXECUTING, readCount=0, filterCount=0, writeCount=0 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=0, rollbackCount=0"
},
"stepType" : "",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1"
}
}
}
44.14.3. Job Step Execution Progress
The job step executions endpoint lets you get details about the progress of a job step execution. The following topics provide more details:
Request Structure
GET /jobs/executions/1/steps/1/progress HTTP/1.1
Host: localhost:9393
/jobs/executions/{id}/steps/{stepid}/progress
Parameter | Description |
---|---|
|
The id of an existing job execution (required) |
|
The id of an existing step execution for a specific job execution (required) |
Request Parameters
There are no request parameters for this endpoint.
Example Request
$ curl 'http://localhost:9393/jobs/executions/1/steps/1/progress' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2722
{
"stepExecution" : {
"id" : 1,
"version" : 0,
"stepName" : "DOCJOB_STEP",
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2021-10-12T09:26:27.879+0000",
"endTime" : null,
"lastUpdated" : "2021-10-12T09:26:27.879+0000",
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"exitStatus" : {
"exitCode" : "EXECUTING",
"exitDescription" : "",
"running" : true
},
"terminateOnly" : false,
"filterCount" : 0,
"failureExceptions" : [ ],
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobExecutionId" : 1,
"skipCount" : 0,
"summary" : "StepExecution: id=1, version=0, name=DOCJOB_STEP, status=STARTING, exitStatus=EXECUTING, readCount=0, filterCount=0, writeCount=0 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=0, rollbackCount=0"
},
"stepExecutionHistory" : {
"stepName" : "DOCJOB_STEP",
"count" : 0,
"commitCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"rollbackCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"readCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"writeCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"filterCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"readSkipCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"writeSkipCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"processSkipCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"duration" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"durationPerRead" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
}
},
"percentageComplete" : 0.5,
"finished" : false,
"duration" : 208.0,
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1"
}
}
}
44.15. Runtime Information about Applications
You can get information about running apps known to the system, either globally or individually. The following topics provide more details:
44.15.1. Listing All Applications at Runtime
To retrieve information about all instances of all apps, query the /runtime/apps
endpoint by using GET
.
The following topics provide more details:
Request Structure
GET /runtime/apps HTTP/1.1
Accept: application/json
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/runtime/apps' -i -X GET \
-H 'Accept: application/json'
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 209
{
"_links" : {
"self" : {
"href" : "http://localhost:9393/runtime/apps?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0
}
}
44.15.2. Querying All Instances of a Single App
To retrieve information about all instances of a particular app, query the /runtime/apps/<appId>/instances
endpoint by using GET
.
The following topics provide more details:
Request Structure
GET /runtime/apps HTTP/1.1
Accept: application/json
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/runtime/apps' -i -X GET \
-H 'Accept: application/json'
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 209
{
"_links" : {
"self" : {
"href" : "http://localhost:9393/runtime/apps?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0
}
}
44.15.3. Querying a Single Instance of a Single App
To retrieve information about a particular instance of a particular application, query the /runtime/apps/<appId>/instances/<instanceId>
endpoint by using GET
.
The following topics provide more details:
Request Structure
GET /runtime/apps HTTP/1.1
Accept: application/json
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/runtime/apps' -i -X GET \
-H 'Accept: application/json'
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 209
{
"_links" : {
"self" : {
"href" : "http://localhost:9393/runtime/apps?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0
}
}
44.16. Stream Logs
You can get the application logs of the stream for the entire stream or a specific application inside the stream. The following topics provide more details:
44.16.1. Get the applications' logs by the stream name
Use the HTTP GET
method with the /streams/logs/<streamName>
REST endpoint to retrieve all the applications' logs for the given stream name.
The following topics provide more details:
Request Structure
GET /streams/logs/ticktock HTTP/1.1
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/streams/logs/ticktock' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 93
{
"logs" : {
"ticktock-time-v1" : "Logs-time",
"ticktock-log-v1" : "Logs-log"
}
}
44.16.2. Get the logs of a specific application from the stream
To retrieve the logs of a specific application from the stream, query the /streams/logs/<streamName>/<appName>
endpoint using the GET
HTTP method.
The following topics provide more details:
Request Structure
GET /streams/logs/ticktock/ticktock-log-v1 HTTP/1.1
Host: localhost:9393
Example Request
$ curl 'http://localhost:9393/streams/logs/ticktock/ticktock-log-v1' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 55
{
"logs" : {
"ticktock-log-v1" : "Logs-log"
}
}
44.17. Task Logs
You can get the task execution log for a specific task execution.
The following topic provides more details:
44.17.1. Get the task execution log
To retrieve the logs of the task execution, query the /tasks/logs/<ExternalTaskExecutionId>
endpoint by using the HTTP GET
method..
The following topics provide more details:
Request Structure
GET /tasks/logs/taskA-6a8ed64e-9586-46ba-9a66-13ea51301156?platformName=default HTTP/1.1
Host: localhost:9393
Request Parameters
Parameter | Description |
---|---|
|
The name of the platform the task is launched. |
Example Request
$ curl 'http://localhost:9393/tasks/logs/taskA-6a8ed64e-9586-46ba-9a66-13ea51301156?platformName=default' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 10043
"stdout:\n2021-10-12 09:23:57.730 INFO 3348 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4e515669: startup date [Tue Oct 12 09:23:57 UTC 2021]; root of context hierarchy\n2021-10-12 09:23:58.175 INFO 3348 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b056ca48] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n\n . ____ _ __ _ _\n /\\\\ / ___'_ __ _ _(_)_ __ __ _ \\ \\ \\ \\\n( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\\n \\\\/ ___)| |_)| | | | | || (_| | ) ) ) )\n ' |____| .__|_| |_|_| |_\\__, | / / / /\n =========|_|==============|___/=/_/_/_/\n :: Spring Boot :: (v1.5.2.RELEASE)\n\n2021-10-12 09:23:58.394 INFO 3348 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888\n2021-10-12 09:23:58.464 WARN 3348 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for \"http://localhost:8888/timestamp-task/default\": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)\n2021-10-12 09:23:58.465 INFO 3348 --- [ main] o.s.c.t.a.t.TimestampTaskApplication : No active profile set, falling back to default profiles: default\n2021-10-12 09:23:58.479 INFO 3348 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@445b84c0: startup date [Tue Oct 12 09:23:58 UTC 2021]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@4e515669\n2021-10-12 09:23:59.031 INFO 3348 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=1e36064f-ccbe-3d2f-9196-128427cc78a0\n2021-10-12 09:23:59.122 INFO 3348 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b056ca48] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2021-10-12 09:23:59.133 INFO 3348 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$943cc74b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2021-10-12 09:23:59.718 INFO 3348 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [org/springframework/cloud/task/schema-h2.sql]\n2021-10-12 09:23:59.755 INFO 3348 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [org/springframework/cloud/task/schema-h2.sql] in 37 ms.\n2021-10-12 09:24:00.114 INFO 3348 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup\n2021-10-12 09:24:00.120 INFO 3348 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure\n2021-10-12 09:24:00.121 INFO 3348 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'environmentManager' has been autodetected for JMX exposure\n2021-10-12 09:24:00.122 INFO 3348 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshScope' has been autodetected for JMX exposure\n2021-10-12 09:24:00.123 INFO 3348 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'environmentManager': registering with JMX server as MBean [taskA-6a8ed64e-9586-46ba-9a66-13ea51301156:name=environmentManager,type=EnvironmentManager]\n2021-10-12 09:24:00.134 INFO 3348 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshScope': registering with JMX server as MBean [taskA-6a8ed64e-9586-46ba-9a66-13ea51301156:name=refreshScope,type=RefreshScope]\n2021-10-12 09:24:00.142 INFO 3348 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [taskA-6a8ed64e-9586-46ba-9a66-13ea51301156:name=configurationPropertiesRebinder,context=445b84c0,type=ConfigurationPropertiesRebinder]\n2021-10-12 09:24:00.205 INFO 3348 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0\n2021-10-12 09:24:00.218 WARN 3348 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'taskLifecycleListener'; nested exception is java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\n2021-10-12 09:24:00.219 INFO 3348 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown\n2021-10-12 09:24:00.219 INFO 3348 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans\n2021-10-12 09:24:00.219 ERROR 3348 --- [ main] o.s.c.t.listener.TaskLifecycleListener : An event to end a task has been received for a task that has not yet started.\n2021-10-12 09:24:00.225 INFO 3348 --- [ main] utoConfigurationReportLoggingInitializer : \n\nError starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.\n2021-10-12 09:24:00.231 ERROR 3348 --- [ main] o.s.boot.SpringApplication : Application startup failed\n\norg.springframework.context.ApplicationContextException: Failed to start bean 'taskLifecycleListener'; nested exception is java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\n\tat org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:50) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:348) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:151) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:114) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.cloud.task.app.timestamp.TimestampTaskApplication.main(TimestampTaskApplication.java:29) [classes!/:1.2.0.RELEASE]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_302]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_302]\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_302]\n\tat java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_302]\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\n\tat org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\nCaused by: java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\n\tat org.springframework.util.Assert.notNull(Assert.java:134) ~[spring-core-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.cloud.task.listener.TaskLifecycleListener.doTaskStart(TaskLifecycleListener.java:200) ~[spring-cloud-task-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]\n\tat org.springframework.cloud.task.listener.TaskLifecycleListener.start(TaskLifecycleListener.java:282) ~[spring-cloud-task-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:175) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\t... 20 common frames omitted\n\n"