REST API Guide
This section describes the Spring Cloud Data Flow REST API.
42. 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.
|
42.1. HTTP Version
Spring Cloud Data Flow establishes a RESTful API version that is updated when there is a breaking change to the API. The API version can be seen at the end of the home page of Spring Cloud Data Flow as shown in the example below:
{
"_links": {
"dashboard": { "href" : "http://localhost:9393/dashboard" },
...
},
"api.revision":15
}
The table below shows the SCDF Release version and its current RESTful API version.
SCDF Version | API Version |
---|---|
2.11.x |
14 |
2.10.x |
14 |
2.9.x |
14 |
2.8.x |
14 |
2.7.x |
14 |
42.2. 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. |
42.3. 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. |
42.4. Headers
Every response has the following headers:
Name | Description |
---|---|
|
The Content-Type of the payload, e.g. |
42.5. 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 |
42.6. 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.
43. Resources
The API includes the following resources:
43.1. Index
The index provides the entry point into Spring Cloud Data Flow’s REST API. The following topics provide more details:
43.1.1. Accessing the index
Use a GET
request to access the index.
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 schema/versions |
|
|
Link to the schema/targets |
|
|
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/apps/{appId}/instances/{instanceId}/post |
|
|
Link runtime/apps/{appId}/instances/{instanceId}/post is templated |
|
|
Link to the runtime/apps/{appId}/instances/{instanceId}/actuator |
|
|
Link runtime/apps/{appId}/instances/{instanceId}/actuator 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 tasks/executions/launch |
|
|
Indicates that Link tasks/executions/launch is templated |
|
|
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/executions/external |
|
|
Link tasks/executions/external 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/thinexecutions |
|
|
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: 8220
{
"_links" : {
"dashboard" : {
"href" : "http://localhost:9393/dashboard"
},
"audit-records" : {
"href" : "http://localhost:9393/audit-records"
},
"schema/versions" : {
"href" : "http://localhost:9393/schema/versions"
},
"schema/targets" : {
"href" : "http://localhost:9393/schema/targets"
},
"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
},
"runtime/apps/{appId}/instances/{instanceId}/actuator" : [ {
"href" : "http://localhost:9393/runtime/apps/{appId}/instances/{instanceId}/actuator?endpoint={endpoint}",
"templated" : true
}, {
"href" : "http://localhost:9393/runtime/apps/{appId}/instances/{instanceId}/actuator",
"templated" : true
} ],
"runtime/apps/{appId}/instances/{instanceId}/post" : {
"href" : "http://localhost:9393/runtime/apps/{appId}/instances/{instanceId}/post",
"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/external" : {
"href" : "http://localhost:9393/tasks/executions/external/{externalExecutionId}{?platform}",
"templated" : true
},
"tasks/executions/launch" : {
"href" : "http://localhost:9393/tasks/executions/launch?name={name}{&properties,arguments}",
"templated" : true
},
"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}{?schemaTarget}",
"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,days}",
"templated" : true
},
"tasks/logs" : {
"href" : "http://localhost:9393/tasks/logs/{taskExternalExecutionId}{?platformName,schemaTarget}",
"templated" : true
},
"tasks/thinexecutions" : {
"href" : "http://localhost:9393/tasks/thinexecutions"
},
"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 |
|
EXPERIMENTAL: Allows invoking Actuator endpoint on specific app instance |
|
EXPERIMENTAL: Allows POST on http sink |
|
Provides the task definition resource |
|
Provides details for a specific task definition |
|
Provides the validation for a task definition |
|
Returns Task executions |
|
Provides for launching a Task execution |
|
Returns Task execution by external id |
|
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 |
|
Returns thin Task executions |
|
List of Spring Boot related schemas |
|
List of schema targets |
|
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 |
43.2. Server Meta Information
The server meta information endpoint provides more information about the server itself. The following topics provide more details:
43.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
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2635
{
"featureInfo" : {
"analyticsEnabled" : true,
"streamsEnabled" : true,
"tasksEnabled" : true,
"schedulesEnabled" : true,
"monitoringDashboardType" : "NONE"
},
"versionInfo" : {
"implementation" : {
"name" : "${info.app.name}",
"version" : "2.11.5"
},
"core" : {
"name" : "Spring Cloud Data Flow Core",
"version" : "2.11.5"
},
"dashboard" : {
"name" : "Spring Cloud Dataflow UI",
"version" : "3.4.6"
},
"shell" : {
"name" : "Spring Cloud Data Flow Shell",
"version" : "2.11.5",
"url" : "https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-dataflow-shell/2.11.5/spring-cloud-dataflow-shell-2.11.5.jar"
}
},
"securityInfo" : {
"authenticationEnabled" : false,
"authenticated" : false,
"username" : null,
"roles" : [ ]
},
"runtimeEnvironment" : {
"appDeployer" : {
"deployerImplementationVersion" : "Test Version",
"deployerName" : "Test Server",
"deployerSpiVersion" : "2.11.5",
"javaVersion" : "1.8.0_422",
"platformApiVersion" : "",
"platformClientVersion" : "",
"platformHostVersion" : "",
"platformSpecificInfo" : {
"default" : "local"
},
"platformType" : "Skipper Managed",
"springBootVersion" : "2.7.18",
"springVersion" : "5.3.39"
},
"taskLaunchers" : [ {
"deployerImplementationVersion" : "unknown",
"deployerName" : "LocalTaskLauncher",
"deployerSpiVersion" : "unknown",
"javaVersion" : "1.8.0_422",
"platformApiVersion" : "Linux 6.5.0-1025-azure",
"platformClientVersion" : "6.5.0-1025-azure",
"platformHostVersion" : "6.5.0-1025-azure",
"platformSpecificInfo" : { },
"platformType" : "Local",
"springBootVersion" : "2.7.18",
"springVersion" : "5.3.39"
} ]
},
"monitoringDashboardInfo" : {
"url" : "",
"refreshInterval" : 15,
"dashboardType" : "NONE",
"source" : "default-scdf-source"
},
"gitAndBuildInfo" : {
"git" : {
"commit" : {
"time" : "2024-04-24T11:35:29Z",
"id" : {
"abbrev" : "fddafed",
"full" : "fddafed39b919981cbb5bd04bd7fb5266fa25309"
}
},
"branch" : "main"
},
"build" : {
"version" : "2.11.3-SNAPSHOT",
"artifact" : "spring-cloud-dataflow-server",
"name" : "Spring Cloud Data Flow Server",
"group" : "org.springframework.cloud",
"time" : "2024-04-25T12:36:37.169Z"
}
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/about"
}
}
}
43.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:
43.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: 1151
{
"_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,
"bootVersion" : "2",
"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,
"bootVersion" : "2",
"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
}
}
43.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: 382
{
"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,
"bootVersion" : "2",
"versions" : null,
"label" : null,
"options" : [ ],
"shortDescription" : null,
"inboundPortNames" : [ ],
"outboundPortNames" : [ ],
"optionGroups" : { }
}
43.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?bootVersion=2 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 |
|
The Spring Boot version of the application.Default is 2 |
|
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 |
43.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?bootVersion=2 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 |
|
Spring Boot version. Value of 2 or 3. Must be supplied of greater than 2. |
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 |
43.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: 685
{
"_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,
"bootVersion" : "2",
"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
}
}
43.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 |
43.3.7. Unregistering an Application
A DELETE
request on /apps/<type>/<name>
unregisters a previously registered application.
The following topics provide more details:
43.4. Schema Information
The schema information endpoint provides information about the supported Spring Boot schema versions for Task and Batch applications and the available Schema Targets.
The following topics provide more details:
43.4.1. List All Schema Versions
The schema endpoint provides for listing supported Spring Boot versions.
The following topics provide more details:
43.4.2. List All Schema Targets
The schema endpoint provides for listing supported Schema Targets.
The following topics provide more details:
Example Request
$ curl 'http://localhost:9393/schema/targets' -i -X GET \
-H 'Accept: application/json'
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 660
{
"defaultSchemaTarget" : "boot2",
"schemas" : [ {
"name" : "boot3",
"schemaVersion" : "3",
"taskPrefix" : "BOOT3_TASK_",
"batchPrefix" : "BOOT3_BATCH_",
"datasource" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/schema/targets/boot3"
}
}
}, {
"name" : "boot2",
"schemaVersion" : "2",
"taskPrefix" : "TASK_",
"batchPrefix" : "BATCH_",
"datasource" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/schema/targets/boot2"
}
}
} ],
"_links" : {
"self" : {
"href" : "http://localhost:9393/schema/targets"
}
}
}
43.5. Audit Records
The audit records endpoint provides information about the audit records. The following topics provide more details:
43.5.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" : "2024-09-13T10:11:46.663Z",
"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
}
}
43.5.2. Retrieve Audit Record Detail
The audit record endpoint lets you get a single audit record. The following topics provide more details:
Path Parameters
/audit-records/{id}
Parameter | Description |
---|---|
|
The id of the audit record to query (required) |
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" : "2024-09-13T10:11:45.673Z",
"auditAction" : "CREATE",
"auditOperation" : "STREAM",
"platformName" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/audit-records/5"
}
}
}
43.5.3. List all the Audit Action Types
The audit record endpoint lets you get the action types. The following topics provide more details:
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1111
[ {
"id" : 100,
"name" : "Create",
"description" : "Create an Entity",
"nameWithDescription" : "Create (Create an Entity)",
"key" : "CREATE"
}, {
"id" : 200,
"name" : "Delete",
"description" : "Delete an Entity",
"nameWithDescription" : "Delete (Delete an Entity)",
"key" : "DELETE"
}, {
"id" : 300,
"name" : "Deploy",
"description" : "Deploy an Entity",
"nameWithDescription" : "Deploy (Deploy an Entity)",
"key" : "DEPLOY"
}, {
"id" : 400,
"name" : "Rollback",
"description" : "Rollback an Entity",
"nameWithDescription" : "Rollback (Rollback an Entity)",
"key" : "ROLLBACK"
}, {
"id" : 500,
"name" : "Undeploy",
"description" : "Undeploy an Entity",
"nameWithDescription" : "Undeploy (Undeploy an Entity)",
"key" : "UNDEPLOY"
}, {
"id" : 600,
"name" : "Update",
"description" : "Update an Entity",
"nameWithDescription" : "Update (Update an Entity)",
"key" : "UPDATE"
}, {
"id" : 700,
"name" : "SuccessfulLogin",
"description" : "Successful login",
"nameWithDescription" : "SuccessfulLogin (Successful login)",
"key" : "LOGIN_SUCCESS"
} ]
43.5.4. List all the Audit Operation Types
The audit record endpoint lets you get the operation types. The following topics provide more details:
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"
} ]
43.6. 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:
43.6.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"
}
}
}
43.6.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: 730
{
"_embedded" : {
"streamDefinitionResourceList" : [ {
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | 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/timelog"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions?page=0&size=10&sort=name,asc"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
43.6.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: 746
{
"_embedded" : {
"streamDefinitionResourceList" : [ {
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | 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/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
}
}
43.6.4. Retrieve Stream Definition Detail
The stream definition endpoint lets you get a single stream definition. The following topics provide more details:
Path Parameters
/streams/definitions/{name}
Parameter | Description |
---|---|
|
The name of the stream definition to query (required) |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 387
{
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | 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/timelog"
}
}
}
43.6.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:
43.6.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:
43.7. Stream Validation
The stream validation endpoint lets you validate the apps in a stream definition. The following topics provide more details:
43.8. 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:
43.8.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) |
43.8.2. Undeploy Stream Definition
The stream definition endpoint lets you undeploy a single stream definition. The following topics provide more details:
43.8.3. Undeploy All Stream Definitions
The stream definition endpoint lets you undeploy all single stream definitions. The following topics provide more details:
43.8.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) |
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}'
43.8.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 |
43.8.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 |
43.8.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
43.8.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
43.8.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) |
43.9. 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:
43.9.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"
}
}
}
43.9.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
}
}
43.9.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) |
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"
}
}
}
43.9.4. Delete Task Definition
The task definition endpoint lets you delete a single task definition. The following topics provide more details:
43.10. 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:
43.10.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&platform=default&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 platform the task is launched |
|
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 |
43.10.2. List All Schedules
The task schedules endpoint lets you get all task schedules. The following topics provide more details:
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
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
}
}
43.10.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
}
}
43.10.4. Delete Task Schedule
The task schedule endpoint lets you delete a single task schedule. The following topics provide more details:
43.11. Task Validation
The task validation endpoint lets you validate the apps in a task definition. The following topics provide more details:
43.12. 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:
43.12.1. Launching a Task (Legacy)
Launching a task is done by requesting the creation of a new task execution. This endpoint will fail if the task is registered as a Spring Boot 3 application.
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. (optional) |
|
Command line arguments to pass to the task. (optional) |
43.12.2. Launching a Task
Launching a task is done by requesting the creation of a new task execution. The response will contain an execution id and a schema target.
The following topics provide more details:
Request Structure
POST /tasks/executions/launch 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. (optional) |
|
Command line arguments to pass to the task. (optional) |
43.12.3. Stopping a Task
Stopping a task is done by posting the id of an existing task execution. The following topics provide more details:
Path Parameters
/tasks/executions/{id}
Parameter | Description |
---|---|
|
The ids of an existing task execution (required) |
43.12.4. List All Task Executions
The task executions endpoint lets you list all task executions. The following topics provide more details:
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2497
{
"_embedded" : {
"taskExecutionResourceList" : [ {
"executionId" : 1,
"exitCode" : null,
"taskName" : "taskA",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskA-e4fc87e5-dbd7-450e-935e-69470d10afe9",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"spring.datasource.driverClassName" : null,
"management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
"format" : "yyyy MM dd",
"spring.cloud.task.name" : "taskA",
"spring.cloud.deployer.bootVersion" : "2",
"management.metrics.tags.service" : "task-application",
"spring.datasource.username" : null,
"spring.datasource.url" : null,
"spring.cloud.task.initialize-enabled" : "false",
"spring.cloud.task.schemaTarget" : "boot2",
"spring.batch.jdbc.table-prefix" : "BATCH_",
"spring.cloud.task.tablePrefix" : "TASK_"
},
"deploymentProperties" : {
"app.timestamp.spring.cloud.task.tablePrefix" : "TASK_",
"app.timestamp.spring.cloud.deployer.bootVersion" : "2",
"app.timestamp.spring.cloud.task.initialize-enabled" : "false",
"app.timestamp.spring.batch.jdbc.table-prefix" : "BATCH_",
"app.timestamp.spring.cloud.task.schemaTarget" : "boot2"
},
"platformName" : "default",
"taskExecutionStatus" : "UNKNOWN",
"schemaTarget" : "boot2",
"_links" : {
"tasks/logs" : {
"href" : "http://localhost:9393/tasks/logs/taskA-e4fc87e5-dbd7-450e-935e-69470d10afe9?platformName=default&schemaTarget=boot2"
},
"self" : {
"href" : "http://localhost:9393/tasks/executions/1?schemaTarget=boot2"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:9393/tasks/executions?page=0&size=2"
},
"prev" : {
"href" : "http://localhost:9393/tasks/executions?page=0&size=2"
},
"self" : {
"href" : "http://localhost:9393/tasks/executions?page=1&size=2"
},
"last" : {
"href" : "http://localhost:9393/tasks/executions?page=1&size=2"
}
},
"page" : {
"size" : 2,
"totalElements" : 3,
"totalPages" : 2,
"number" : 1
}
}
43.12.5. 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 Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
The name associated with the task execution |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2222
{
"_embedded" : {
"taskExecutionResourceList" : [ {
"executionId" : 2,
"exitCode" : null,
"taskName" : "taskB",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskB-cd70929e-1495-4f72-bc22-008f919e2b5a",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"spring.datasource.driverClassName" : null,
"management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
"format" : "yyyy MM dd",
"spring.cloud.task.name" : "taskB",
"spring.cloud.deployer.bootVersion" : "2",
"management.metrics.tags.service" : "task-application",
"spring.datasource.username" : null,
"spring.datasource.url" : null,
"spring.cloud.task.initialize-enabled" : "false",
"spring.cloud.task.schemaTarget" : "boot2",
"spring.batch.jdbc.table-prefix" : "BATCH_",
"spring.cloud.task.tablePrefix" : "TASK_"
},
"deploymentProperties" : {
"app.timestamp.spring.cloud.task.tablePrefix" : "TASK_",
"app.timestamp.spring.cloud.deployer.bootVersion" : "2",
"app.timestamp.spring.cloud.task.initialize-enabled" : "false",
"app.timestamp.spring.batch.jdbc.table-prefix" : "BATCH_",
"app.timestamp.spring.cloud.task.schemaTarget" : "boot2"
},
"platformName" : "default",
"taskExecutionStatus" : "UNKNOWN",
"schemaTarget" : "boot2",
"_links" : {
"tasks/logs" : {
"href" : "http://localhost:9393/tasks/logs/taskB-cd70929e-1495-4f72-bc22-008f919e2b5a?platformName=default&schemaTarget=boot2"
},
"self" : {
"href" : "http://localhost:9393/tasks/executions/2?schemaTarget=boot2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
43.12.6. 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?schemaTarget=boot2 HTTP/1.1
Host: localhost:9393
/tasks/executions/{id}
Parameter | Description |
---|---|
|
The id of an existing task execution (required) |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1767
{
"executionId" : 1,
"exitCode" : null,
"taskName" : "taskA",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskA-43aeab47-b46a-49ba-ba7b-f045dec094e4",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"spring.datasource.driverClassName" : null,
"management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
"format" : "yyyy MM dd",
"spring.cloud.task.name" : "taskA",
"spring.cloud.deployer.bootVersion" : "2",
"management.metrics.tags.service" : "task-application",
"spring.datasource.username" : null,
"spring.datasource.url" : null,
"spring.cloud.task.initialize-enabled" : "false",
"spring.cloud.task.schemaTarget" : "boot2",
"spring.batch.jdbc.table-prefix" : "BATCH_",
"spring.cloud.task.tablePrefix" : "TASK_"
},
"deploymentProperties" : {
"app.timestamp.spring.cloud.task.tablePrefix" : "TASK_",
"app.timestamp.spring.cloud.deployer.bootVersion" : "2",
"app.timestamp.spring.cloud.task.initialize-enabled" : "false",
"app.timestamp.spring.batch.jdbc.table-prefix" : "BATCH_",
"app.timestamp.spring.cloud.task.schemaTarget" : "boot2"
},
"platformName" : "default",
"taskExecutionStatus" : "UNKNOWN",
"schemaTarget" : "boot2",
"_links" : {
"tasks/logs" : {
"href" : "http://localhost:9393/tasks/logs/taskA-43aeab47-b46a-49ba-ba7b-f045dec094e4?platformName=default&schemaTarget=boot2"
},
"self" : {
"href" : "http://localhost:9393/tasks/executions/1?schemaTarget=boot2"
}
}
}
43.12.7. Task Execution Detail by External Id
The task executions endpoint lets you get the details about a task execution. The following topics provide more details:
Request Structure
GET /tasks/executions/external/taskB-026bd08c-18b8-4255-ad77-c2fcc9d09bb8?platform=default HTTP/1.1
Host: localhost:9393
/tasks/executions/external/{externalExecutionId}
Parameter | Description |
---|---|
|
The external ExecutionId of an existing task execution (required) |
Example Request
$ curl 'http://localhost:9393/tasks/executions/external/taskB-026bd08c-18b8-4255-ad77-c2fcc9d09bb8?platform=default' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1767
{
"executionId" : 2,
"exitCode" : null,
"taskName" : "taskB",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskB-026bd08c-18b8-4255-ad77-c2fcc9d09bb8",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"spring.datasource.driverClassName" : null,
"management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
"format" : "yyyy MM dd",
"spring.cloud.task.name" : "taskB",
"spring.cloud.deployer.bootVersion" : "2",
"management.metrics.tags.service" : "task-application",
"spring.datasource.username" : null,
"spring.datasource.url" : null,
"spring.cloud.task.initialize-enabled" : "false",
"spring.cloud.task.schemaTarget" : "boot2",
"spring.batch.jdbc.table-prefix" : "BATCH_",
"spring.cloud.task.tablePrefix" : "TASK_"
},
"deploymentProperties" : {
"app.timestamp.spring.cloud.task.tablePrefix" : "TASK_",
"app.timestamp.spring.cloud.deployer.bootVersion" : "2",
"app.timestamp.spring.cloud.task.initialize-enabled" : "false",
"app.timestamp.spring.batch.jdbc.table-prefix" : "BATCH_",
"app.timestamp.spring.cloud.task.schemaTarget" : "boot2"
},
"platformName" : "default",
"taskExecutionStatus" : "UNKNOWN",
"schemaTarget" : "boot2",
"_links" : {
"tasks/logs" : {
"href" : "http://localhost:9393/tasks/logs/taskB-026bd08c-18b8-4255-ad77-c2fcc9d09bb8?platformName=default&schemaTarget=boot2"
},
"self" : {
"href" : "http://localhost:9393/tasks/executions/2?schemaTarget=boot2"
}
}
}
43.12.8. 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?schemaTarget=boot2&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. |
|
Schema target for task. (optional) |
43.12.9. 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?schemaTarget=boot2&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. |
|
Schema target for task. (optional) |
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.
|
When deleting large number of task executions some database types limit the number of entries in the IN clause (the method Spring Cloud Data Flow uses to delete relationships for task executions).
Spring Cloud Data Flow supports the chunking of deletes for Sql Server (Maximum 2100 entries) and Oracle DBs (Maximum 1000 entries).
However, Spring Cloud Data Flow allows users to set their own chunking factor. To do this set the spring.cloud.dataflow.task.executionDeleteChunkSize property to the appropriate chunk size.
Default is 0 which means Spring Cloud Data Flow will not chunk the task execution deletes (except for Oracle and Sql Server databases).
|
43.13. 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
43.13.1. List All Job Executions
The job executions endpoint lets you list all job executions. The following topics provide more details:
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3658
{
"_embedded" : {
"jobExecutionResourceList" : [ {
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"name" : "DOCJOB1",
"startDate" : "2024-09-13",
"startTime" : "10:11:18",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 2,
"version" : 1,
"jobParameters" : {
"parameters" : { }
},
"jobInstance" : {
"id" : 2,
"jobName" : "DOCJOB1",
"version" : null
},
"stepExecutions" : [ ],
"status" : "STOPPED",
"startTime" : "2024-09-13T10:11:18.778+0000",
"createTime" : "2024-09-13T10:11:18.777+0000",
"endTime" : null,
"lastUpdated" : "2024-09-13T10:11:18.778+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : ""
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"jobConfigurationName" : null,
"failureExceptions" : [ ],
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&stop=true"
},
"restart" : {
"href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&restart=true"
}
}
}, {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2024-09-13",
"startTime" : "10:11:18",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 1,
"version" : 1,
"jobParameters" : {
"parameters" : { }
},
"jobInstance" : {
"id" : 1,
"jobName" : "DOCJOB",
"version" : null
},
"stepExecutions" : [ ],
"status" : "STARTED",
"startTime" : "2024-09-13T10:11:18.773+0000",
"createTime" : "2024-09-13T10:11:18.772+0000",
"endTime" : null,
"lastUpdated" : "2024-09-13T10:11:18.773+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : ""
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"jobConfigurationName" : null,
"failureExceptions" : [ ],
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : true,
"timeZone" : "UTC",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
},
"restart" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&restart=true"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
43.13.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 Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1937
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"instanceId" : 2,
"name" : "DOCJOB1",
"startDate" : "2024-09-13",
"startTime" : "10:11:14",
"startDateTime" : "2024-09-13T10:11:14.840+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"status" : "STOPPED",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&stop=true"
}
}
}, {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2024-09-13",
"startTime" : "10:11:14",
"startDateTime" : "2024-09-13T10:11:14.752+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : true,
"timeZone" : "UTC",
"status" : "STARTED",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
43.13.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 Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
The name associated with the job execution |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1964
{
"_embedded" : {
"jobExecutionResourceList" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2024-09-13",
"startTime" : "10:11:20",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 1,
"version" : 1,
"jobParameters" : {
"parameters" : { }
},
"jobInstance" : {
"id" : 1,
"jobName" : "DOCJOB",
"version" : null
},
"stepExecutions" : [ ],
"status" : "STARTED",
"startTime" : "2024-09-13T10:11:20.627+0000",
"createTime" : "2024-09-13T10:11:20.626+0000",
"endTime" : null,
"lastUpdated" : "2024-09-13T10:11:20.627+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : ""
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"jobConfigurationName" : null,
"failureExceptions" : [ ],
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : true,
"timeZone" : "UTC",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
},
"restart" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&restart=true"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
43.13.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 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: 1108
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2024-09-13",
"startTime" : "10:11:23",
"startDateTime" : "2024-09-13T10:11:23.869+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : true,
"timeZone" : "UTC",
"status" : "STARTED",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
43.13.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: 1937
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"instanceId" : 2,
"name" : "DOCJOB1",
"startDate" : "2024-09-13",
"startTime" : "10:11:22",
"startDateTime" : "2024-09-13T10:11:22.807+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"status" : "STOPPED",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&stop=true"
}
}
}, {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2024-09-13",
"startTime" : "10:11:22",
"startDateTime" : "2024-09-13T10:11:22.802+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : true,
"timeZone" : "UTC",
"status" : "STARTED",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
43.13.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: 1108
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2024-09-13",
"startTime" : "10:11:21",
"startDateTime" : "2024-09-13T10:11:21.794+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : true,
"timeZone" : "UTC",
"status" : "STARTED",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
43.13.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: 1108
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2024-09-13",
"startTime" : "10:11:24",
"startDateTime" : "2024-09-13T10:11:24.914+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : true,
"timeZone" : "UTC",
"status" : "STARTED",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
43.13.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?schemaTarget=boot2 HTTP/1.1
Host: localhost:9393
/jobs/executions/{id}
Parameter | Description |
---|---|
|
The id of an existing job execution (required) |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1460
{
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"name" : "DOCJOB1",
"startDate" : "2024-09-13",
"startTime" : "10:11:25",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 2,
"version" : 1,
"jobParameters" : {
"parameters" : { }
},
"jobInstance" : {
"id" : 2,
"jobName" : "DOCJOB1",
"version" : null
},
"stepExecutions" : [ ],
"status" : "STOPPED",
"startTime" : "2024-09-13T10:11:25.966+0000",
"createTime" : "2024-09-13T10:11:25.966+0000",
"endTime" : null,
"lastUpdated" : "2024-09-13T10:11:25.966+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : ""
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"jobConfigurationName" : null,
"failureExceptions" : [ ],
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2"
},
"stop" : {
"href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&stop=true"
},
"restart" : {
"href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&restart=true"
}
}
}
43.13.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?schemaTarget=boot2 HTTP/1.1
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 |
---|---|
|
The schema target of the job execution |
|
Sends signal to stop the job if set to true |
43.13.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?schemaTarget=boot2 HTTP/1.1
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 |
---|---|
|
The schema target of the job execution |
|
Sends signal to restart the job if set to true |
43.14. 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:
43.14.1. List All Job Instances
The job instances endpoint lets you list all job instances. The following topics provide more details:
Request Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
|
The name associated with the job instance |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1807
{
"_embedded" : {
"jobInstanceResourceList" : [ {
"jobName" : "DOCJOB",
"jobInstanceId" : 1,
"jobExecutions" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "",
"startTime" : "",
"duration" : "",
"jobExecution" : {
"id" : 1,
"version" : null,
"jobParameters" : {
"parameters" : { }
},
"jobInstance" : {
"id" : 1,
"jobName" : "DOCJOB",
"version" : null
},
"stepExecutions" : [ ],
"status" : "STARTING",
"startTime" : null,
"createTime" : "2024-09-13T10:11:41.775+0000",
"endTime" : null,
"lastUpdated" : null,
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : ""
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"jobConfigurationName" : null,
"failureExceptions" : [ ],
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : true,
"timeZone" : "UTC",
"schemaTarget" : "boot2"
} ],
"_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
}
}
43.14.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?schemaTarget=boot2 HTTP/1.1
Host: localhost:9393
/jobs/instances/{id}
Parameter | Description |
---|---|
|
The id of an existing job instance (required) |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1312
{
"jobName" : "DOCJOB",
"jobInstanceId" : 1,
"jobExecutions" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "",
"startTime" : "",
"duration" : "",
"jobExecution" : {
"id" : 1,
"version" : null,
"jobParameters" : {
"parameters" : { }
},
"jobInstance" : {
"id" : 1,
"jobName" : "DOCJOB",
"version" : null
},
"stepExecutions" : [ ],
"status" : "STARTING",
"startTime" : null,
"createTime" : "2024-09-13T10:11:42.763+0000",
"endTime" : null,
"lastUpdated" : null,
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : ""
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"jobConfigurationName" : null,
"failureExceptions" : [ ],
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : true,
"timeZone" : "UTC",
"schemaTarget" : "boot2"
} ],
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/instances/1"
}
}
}
43.15. 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:
43.15.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 Parameters
Parameter | Description |
---|---|
|
The zero-based page number (optional) |
|
The requested page size (optional) |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1805
{
"_embedded" : {
"stepExecutionResourceList" : [ {
"jobExecutionId" : 1,
"stepExecution" : {
"stepName" : "DOCJOB_STEP",
"id" : 1,
"version" : 0,
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2024-09-13T10:11:35.706+0000",
"endTime" : null,
"lastUpdated" : "2024-09-13T10:11:35.707+0000",
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"exitStatus" : {
"exitCode" : "EXECUTING",
"exitDescription" : ""
},
"terminateOnly" : false,
"filterCount" : 0,
"jobParameters" : {
"parameters" : { }
},
"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",
"failureExceptions" : [ ]
},
"stepType" : "",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1?schemaTarget=boot2"
},
"progress" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1/progress?schemaTarget=boot2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
43.15.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?schemaTarget=boot2 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) |
Example Request
$ curl 'http://localhost:9393/jobs/executions/1/steps/1?schemaTarget=boot2' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1339
{
"jobExecutionId" : 1,
"stepExecution" : {
"stepName" : "DOCJOB_STEP",
"id" : 1,
"version" : 0,
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2024-09-13T10:11:34.601+0000",
"endTime" : null,
"lastUpdated" : "2024-09-13T10:11:34.601+0000",
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"exitStatus" : {
"exitCode" : "EXECUTING",
"exitDescription" : ""
},
"terminateOnly" : false,
"filterCount" : 0,
"jobParameters" : {
"parameters" : { }
},
"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",
"failureExceptions" : [ ]
},
"stepType" : "",
"schemaTarget" : "boot2",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1?schemaTarget=boot2"
},
"progress" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1/progress?schemaTarget=boot2"
}
}
}
43.15.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) |
Response Structure
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2794
{
"stepExecution" : {
"stepName" : "DOCJOB_STEP",
"id" : 1,
"version" : 0,
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2024-09-13T10:11:36.711+0000",
"endTime" : null,
"lastUpdated" : "2024-09-13T10:11:36.711+0000",
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"exitStatus" : {
"exitCode" : "EXECUTING",
"exitDescription" : ""
},
"terminateOnly" : false,
"filterCount" : 0,
"jobParameters" : {
"parameters" : { }
},
"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",
"failureExceptions" : [ ]
},
"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" : 18.0,
"_links" : {
"progress" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1/progress?schemaTarget=boot2"
},
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1"
}
}
}
The following fields in the stepExecutionHistory are deprecated and will be removed in a future release: rollbackCount, readCount, writeCount, filterCount, readSkipCount, writeSkipCount, processSkipCount, durationPerRead. |
43.16. 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:
43.16.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:
43.16.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:
43.16.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:
43.17. 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:
43.17.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:
43.18. Task Logs
You can get the task execution log for a specific task execution.
The following topic provides more details:
43.18.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-69b2b37c-9d98-4f49-a43d-708c4cd2c02f?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-69b2b37c-9d98-4f49-a43d-708c4cd2c02f?platformName=default' -i -X GET
Response Structure
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 277
"stdout:\n2024-09-13 10:11:29.011 INFO 9073 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@ba8a1dc: startup date [Fri Sep 13 10:11:29 UTC 2024]; root of context hierarchy\n"
44. OpenAPI
The Springdoc library is integrated with the server in an opt-in fashion. Once enabled, it provides OpenAPI3 documentation and a Swagger UI.
To enable, set the following properties in your application.yml
prior to launching the server:
springdoc:
api-docs:
enabled: true
swagger-ui:
enabled: true
The properties can also be set on the command line:
-Dspringdoc.api-docs.enabled=true -Dspringdoc.swagger-ui.enabled=true
or as environment variables:
SPRINGDOC_APIDOCS_ENABLED=true
SPRINGDOC_SWAGGERUI_ENABLED=true
Once enabled, the OpenAPI3 docs and Swagger UI are available at the /v3/api-docs
and /swagger-ui/index.html
URIs, respectively (eg. localhost:9393/v3/api-docs).
The Swagger UI will be initially be blank. Type in "/v3/api-docs/" in the "Explore" bar and click "Explore". |
If you try out the API’s in the Swagger UI and get errors related to "No property string found for type" try replacing the pageable parameter with { } or removing its "sort" attribute.
|
There are a plethora of available OpenAPI and Swagger UI properties to configure the feature.