监控 REST API

Flink has a monitoring API that can be used to query status and statistics of running jobs, as well as recent completed jobs. This monitoring API is used by Flink’s own dashboard, but is designed to be used also by custom monitoring tools.

The monitoring API is a REST-ful API that accepts HTTP requests and responds with JSON data.

Overview

The monitoring API is backed by a web server that runs as part of the Dispatcher. By default, this server listens at post 8081, which can be configured in flink-conf.yaml via rest.port. Note that the monitoring API web server and the web dashboard web server are currently the same and thus run together at the same port. They respond to different HTTP URLs, though.

In the case of multiple Dispatchers (for high availability), each Dispatcher will run its own instance of the monitoring API, which offers information about completed and running job while that Dispatcher was elected the cluster leader.

Developing

The REST API backend is in the flink-runtime project. The core class is org.apache.flink.runtime.webmonitor.WebMonitorEndpoint, which sets up the server and the request routing.

We use Netty and the Netty Router library to handle REST requests and translate URLs. This choice was made because this combination has lightweight dependencies, and the performance of Netty HTTP is very good.

To add new requests, one needs to

  • add a new MessageHeaders class which serves as an interface for the new request,
  • add a new AbstractRestHandler class which handles the request according to the added MessageHeaders class,
  • add the handler to org.apache.flink.runtime.webmonitor.WebMonitorEndpoint#initializeHandlers().

A good example is the org.apache.flink.runtime.rest.handler.job.JobExceptionsHandler that uses the org.apache.flink.runtime.rest.messages.JobExceptionsHeaders.

API

The REST API is versioned, with specific versions being queryable by prefixing the url with the version prefix. Prefixes are always of the form v[version_number]. For example, to access version 1 of /foo/bar one would query /v1/foo/bar.

If no version is specified Flink will default to the oldest version supporting the request.

Querying unsupported/non-existing versions will return a 404 error.

There exist several async operations among these APIs, e.g. trigger savepoint, rescale a job. They would return a triggerid to identify the operation you just POST and then you need to use that triggerid to query for the status of the operation.

Dispatcher

/cluster
Verb: DELETEResponse code: 200 OK
Shuts down the cluster
  1. {}
  1. {}
/config
Verb: GETResponse code: 200 OK
Returns the configuration of the WebUI.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:DashboardConfiguration”,
  4. properties : {
  5. features : {
  6. type : object”,
  7. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:DashboardConfiguration:Features”,
  8. properties : {
  9. web-submit : {
  10. type : boolean
  11. }
  12. }
  13. },
  14. flink-revision : {
  15. type : string
  16. },
  17. flink-version : {
  18. type : string
  19. },
  20. refresh-interval : {
  21. type : integer
  22. },
  23. timezone-name : {
  24. type : string
  25. },
  26. timezone-offset : {
  27. type : integer
  28. }
  29. }
  30. }
/datasets
Verb: GETResponse code: 200 OK
Returns all cluster data sets.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:dataset:ClusterDataSetListResponseBody”,
  4. properties : {
  5. dataSets : {
  6. type : array”,
  7. items : {
  8. type : object”,
  9. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:dataset:ClusterDataSetEntry”,
  10. properties : {
  11. id : {
  12. type : string
  13. },
  14. isComplete : {
  15. type : boolean
  16. }
  17. }
  18. }
  19. }
  20. }
  21. }
/datasets/delete/:triggerid
Verb: GETResponse code: 200 OK
Returns the status for the delete operation of a cluster data set.
Path parameters
  • triggerid - 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:AsynchronousOperationResult”,
  4. properties : {
  5. operation : {
  6. type : object”,
  7. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:AsynchronousOperationInfo”,
  8. properties : {
  9. failure-cause : {
  10. type : any
  11. }
  12. }
  13. },
  14. status : {
  15. type : object”,
  16. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:queue:QueueStatus”,
  17. properties : {
  18. id : {
  19. type : string”,
  20. required : true,
  21. enum : [ IN_PROGRESS”, COMPLETED ]
  22. }
  23. }
  24. }
  25. }
  26. }
/datasets/:datasetid
Verb: DELETEResponse code: 202 Accepted
Triggers the deletion of a cluster data set. This async operation would return a ‘triggerid’ for further query identifier.
Path parameters
  • datasetid - 32-character hexadecimal string value that identifies a cluster data set.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:TriggerResponse”,
  4. properties : {
  5. request-id : {
  6. type : any
  7. }
  8. }
  9. }
/jars
Verb: GETResponse code: 200 OK
Returns a list of all jars previously uploaded via ‘/jars/upload’.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarListInfo”,
  4. properties : {
  5. address : {
  6. type : string
  7. },
  8. files : {
  9. type : array”,
  10. items : {
  11. type : object”,
  12. id : urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarListInfo:JarFileInfo”,
  13. properties : {
  14. entry : {
  15. type : array”,
  16. items : {
  17. type : object”,
  18. id : urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarListInfo:JarEntryInfo”,
  19. properties : {
  20. description : {
  21. type : string
  22. },
  23. name : {
  24. type : string
  25. }
  26. }
  27. }
  28. },
  29. id : {
  30. type : string
  31. },
  32. name : {
  33. type : string
  34. },
  35. uploaded : {
  36. type : integer
  37. }
  38. }
  39. }
  40. }
  41. }
  42. }
/jars/upload
Verb: POSTResponse code: 200 OK
Uploads a jar to the cluster. The jar must be sent as multi-part data. Make sure that the “Content-Type” header is set to “application/x-java-archive”, as some http libraries do not add the header by default. Using ‘curl’ you can upload a jar via ‘curl -X POST -H “Expect:” -F “jarfile=@path/to/flink-job.jar” http://hostname:port/jars/upload‘.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarUploadResponseBody”,
  4. properties : {
  5. filename : {
  6. type : string
  7. },
  8. status : {
  9. type : string”,
  10. enum : [ success ]
  11. }
  12. }
  13. }
/jars/:jarid
Verb: DELETEResponse code: 200 OK
Deletes a jar previously uploaded via ‘/jars/upload’.
Path parameters
  • jarid - String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the id field in the list of uploaded jars (/jars).
  1. {}
  1. {}
/jars/:jarid/plan
Verb: GETResponse code: 200 OK
Returns the dataflow plan of a job contained in a jar previously uploaded via ‘/jars/upload’. Program arguments can be passed both via the JSON request (recommended) or query parameters.
Path parameters
  • jarid - String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the id field in the list of uploaded jars (/jars).
Query parameters
  • program-args (optional): Deprecated, please use ‘programArg’ instead. String value that specifies the arguments for the program or plan
  • programArg (optional): Comma-separated list of program arguments.
  • entry-class (optional): String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest.
  • parallelism (optional): Positive integer value that specifies the desired parallelism for the job.
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarPlanRequestBody”,
  4. properties : {
  5. entryClass : {
  6. type : string
  7. },
  8. jobId : {
  9. type : any
  10. },
  11. parallelism : {
  12. type : integer
  13. },
  14. programArgs : {
  15. type : string
  16. },
  17. programArgsList : {
  18. type : array”,
  19. items : {
  20. type : string
  21. }
  22. }
  23. }
  24. }
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobPlanInfo”,
  4. properties : {
  5. plan : {
  6. type : any
  7. }
  8. }
  9. }
/jars/:jarid/plan
Verb: POSTResponse code: 200 OK
Returns the dataflow plan of a job contained in a jar previously uploaded via ‘/jars/upload’. Program arguments can be passed both via the JSON request (recommended) or query parameters.
Path parameters
  • jarid - String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the id field in the list of uploaded jars (/jars).
Query parameters
  • program-args (optional): Deprecated, please use ‘programArg’ instead. String value that specifies the arguments for the program or plan
  • programArg (optional): Comma-separated list of program arguments.
  • entry-class (optional): String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest.
  • parallelism (optional): Positive integer value that specifies the desired parallelism for the job.
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarPlanRequestBody”,
  4. properties : {
  5. entryClass : {
  6. type : string
  7. },
  8. jobId : {
  9. type : any
  10. },
  11. parallelism : {
  12. type : integer
  13. },
  14. programArgs : {
  15. type : string
  16. },
  17. programArgsList : {
  18. type : array”,
  19. items : {
  20. type : string
  21. }
  22. }
  23. }
  24. }
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobPlanInfo”,
  4. properties : {
  5. plan : {
  6. type : any
  7. }
  8. }
  9. }
/jars/:jarid/run
Verb: POSTResponse code: 200 OK
Submits a job by running a jar previously uploaded via ‘/jars/upload’. Program arguments can be passed both via the JSON request (recommended) or query parameters.
Path parameters
  • jarid - String value that identifies a jar. When uploading the jar a path is returned, where the filename is the ID. This value is equivalent to the id field in the list of uploaded jars (/jars).
Query parameters
  • allowNonRestoredState (optional): Boolean value that specifies whether the job submission should be rejected if the savepoint contains state that cannot be mapped back to the job.
  • savepointPath (optional): String value that specifies the path of the savepoint to restore the job from.
  • program-args (optional): Deprecated, please use ‘programArg’ instead. String value that specifies the arguments for the program or plan
  • programArg (optional): Comma-separated list of program arguments.
  • entry-class (optional): String value that specifies the fully qualified name of the entry point class. Overrides the class defined in the jar file manifest.
  • parallelism (optional): Positive integer value that specifies the desired parallelism for the job.
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarRunRequestBody”,
  4. properties : {
  5. allowNonRestoredState : {
  6. type : boolean
  7. },
  8. entryClass : {
  9. type : string
  10. },
  11. jobId : {
  12. type : any
  13. },
  14. parallelism : {
  15. type : integer
  16. },
  17. programArgs : {
  18. type : string
  19. },
  20. programArgsList : {
  21. type : array”,
  22. items : {
  23. type : string
  24. }
  25. },
  26. savepointPath : {
  27. type : string
  28. }
  29. }
  30. }
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarRunResponseBody”,
  4. properties : {
  5. jobid : {
  6. type : any
  7. }
  8. }
  9. }
/jobmanager/config
Verb: GETResponse code: 200 OK
Returns the cluster configuration.
  1. {}
  1. {
  2. type : array”,
  3. items : {
  4. type : object”,
  5. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:ClusterConfigurationInfoEntry”,
  6. properties : {
  7. key : {
  8. type : string
  9. },
  10. value : {
  11. type : string
  12. }
  13. }
  14. }
  15. }
/jobmanager/logs
Verb: GETResponse code: 200 OK
Returns the list of log files on the JobManager.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:LogListInfo”,
  4. properties : {
  5. logs : {
  6. type : array”,
  7. items : {
  8. type : object”,
  9. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:LogInfo”,
  10. properties : {
  11. name : {
  12. type : string
  13. },
  14. size : {
  15. type : integer
  16. }
  17. }
  18. }
  19. }
  20. }
  21. }
/jobmanager/metrics
Verb: GETResponse code: 200 OK
Provides access to job manager metrics.
Query parameters
  • get (optional): Comma-separated list of string values to select specific metrics.
  1. {}
  1. {
  2. type : any
  3. }
/jobs
Verb: GETResponse code: 200 OK
Returns an overview over all jobs and their current state.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:messages:webmonitor:JobIdsWithStatusOverview”,
  4. properties : {
  5. jobs : {
  6. type : array”,
  7. items : {
  8. type : object”,
  9. id : urn:jsonschema:org:apache:flink:runtime:messages:webmonitor:JobIdsWithStatusOverview:JobIdWithStatus”,
  10. properties : {
  11. id : {
  12. type : any
  13. },
  14. status : {
  15. type : string”,
  16. enum : [ CREATED”, RUNNING”, FAILING”, FAILED”, CANCELLING”, CANCELED”, FINISHED”, RESTARTING”, SUSPENDED”, RECONCILING ]
  17. }
  18. }
  19. }
  20. }
  21. }
  22. }
/jobs
Verb: POSTResponse code: 202 Accepted
Submits a job. This call is primarily intended to be used by the Flink client. This call expects a multipart/form-data request that consists of file uploads for the serialized JobGraph, jars and distributed cache artifacts and an attribute named “request” for the JSON payload.
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:JobSubmitRequestBody”,
  4. properties : {
  5. jobArtifactFileNames : {
  6. type : array”,
  7. items : {
  8. type : object”,
  9. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:JobSubmitRequestBody:DistributedCacheFile”,
  10. properties : {
  11. entryName : {
  12. type : string
  13. },
  14. fileName : {
  15. type : string
  16. }
  17. }
  18. }
  19. },
  20. jobGraphFileName : {
  21. type : string
  22. },
  23. jobJarFileNames : {
  24. type : array”,
  25. items : {
  26. type : string
  27. }
  28. }
  29. }
  30. }
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:JobSubmitResponseBody”,
  4. properties : {
  5. jobUrl : {
  6. type : string
  7. }
  8. }
  9. }
/jobs/metrics
Verb: GETResponse code: 200 OK
Provides access to aggregated job metrics.
Query parameters
  • get (optional): Comma-separated list of string values to select specific metrics.
  • agg (optional): Comma-separated list of aggregation modes which should be calculated. Available aggregations are: “min, max, sum, avg”.
  • jobs (optional): Comma-separated list of 32-character hexadecimal strings to select specific jobs.
  1. {}
  1. {
  2. type : any
  3. }
/jobs/overview
Verb: GETResponse code: 200 OK
Returns an overview over all jobs.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:messages:webmonitor:MultipleJobsDetails”,
  4. properties : {
  5. jobs : {
  6. type : array”,
  7. items : {
  8. type : any
  9. }
  10. }
  11. }
  12. }
/jobs/:jobid
Verb: GETResponse code: 200 OK
Returns details of a job.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:JobDetailsInfo”,
  4. properties : {
  5. duration : {
  6. type : integer
  7. },
  8. end-time : {
  9. type : integer
  10. },
  11. isStoppable : {
  12. type : boolean
  13. },
  14. jid : {
  15. type : any
  16. },
  17. name : {
  18. type : string
  19. },
  20. now : {
  21. type : integer
  22. },
  23. plan : {
  24. type : string
  25. },
  26. start-time : {
  27. type : integer
  28. },
  29. state : {
  30. type : string”,
  31. enum : [ CREATED”, RUNNING”, FAILING”, FAILED”, CANCELLING”, CANCELED”, FINISHED”, RESTARTING”, SUSPENDED”, RECONCILING ]
  32. },
  33. status-counts : {
  34. type : object”,
  35. additionalProperties : {
  36. type : integer
  37. }
  38. },
  39. timestamps : {
  40. type : object”,
  41. additionalProperties : {
  42. type : integer
  43. }
  44. },
  45. vertices : {
  46. type : array”,
  47. items : {
  48. type : object”,
  49. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:JobDetailsInfo:JobVertexDetailsInfo”,
  50. properties : {
  51. duration : {
  52. type : integer
  53. },
  54. end-time : {
  55. type : integer
  56. },
  57. id : {
  58. type : any
  59. },
  60. metrics : {
  61. type : object”,
  62. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:metrics:IOMetricsInfo”,
  63. properties : {
  64. read-bytes : {
  65. type : integer
  66. },
  67. read-bytes-complete : {
  68. type : boolean
  69. },
  70. read-records : {
  71. type : integer
  72. },
  73. read-records-complete : {
  74. type : boolean
  75. },
  76. write-bytes : {
  77. type : integer
  78. },
  79. write-bytes-complete : {
  80. type : boolean
  81. },
  82. write-records : {
  83. type : integer
  84. },
  85. write-records-complete : {
  86. type : boolean
  87. }
  88. }
  89. },
  90. name : {
  91. type : string
  92. },
  93. parallelism : {
  94. type : integer
  95. },
  96. start-time : {
  97. type : integer
  98. },
  99. status : {
  100. type : string”,
  101. enum : [ CREATED”, SCHEDULED”, DEPLOYING”, RUNNING”, FINISHED”, CANCELING”, CANCELED”, FAILED”, RECONCILING ]
  102. },
  103. tasks : {
  104. type : object”,
  105. additionalProperties : {
  106. type : integer
  107. }
  108. }
  109. }
  110. }
  111. }
  112. }
  113. }
/jobs/:jobid
Verb: PATCHResponse code: 202 Accepted
Terminates a job.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
Query parameters
  • mode (optional): String value that specifies the termination mode. The only supported value is: “cancel”.
  1. {}
  1. {}
/jobs/:jobid/accumulators
Verb: GETResponse code: 200 OK
Returns the accumulators for all tasks of a job, aggregated across the respective subtasks.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
Query parameters
  • includeSerializedValue (optional): Boolean value that specifies whether serialized user task accumulators should be included in the response.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobAccumulatorsInfo”,
  4. properties : {
  5. job-accumulators : {
  6. type : array”,
  7. items : {
  8. type : any
  9. }
  10. },
  11. serialized-user-task-accumulators : {
  12. type : object”,
  13. additionalProperties : {
  14. type : any
  15. }
  16. },
  17. user-task-accumulators : {
  18. type : array”,
  19. items : {
  20. type : object”,
  21. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobAccumulatorsInfo:UserTaskAccumulator”,
  22. properties : {
  23. name : {
  24. type : string
  25. },
  26. type : {
  27. type : string
  28. },
  29. value : {
  30. type : string
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
/jobs/:jobid/checkpoints
Verb: GETResponse code: 200 OK
Returns checkpointing statistics for a job.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointingStatistics”,
  4. properties : {
  5. counts : {
  6. type : object”,
  7. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointingStatistics:Counts”,
  8. properties : {
  9. completed : {
  10. type : integer
  11. },
  12. failed : {
  13. type : integer
  14. },
  15. in_progress : {
  16. type : integer
  17. },
  18. restored : {
  19. type : integer
  20. },
  21. total : {
  22. type : integer
  23. }
  24. }
  25. },
  26. history : {
  27. type : array”,
  28. items : {
  29. type : object”,
  30. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointStatistics”,
  31. properties : {
  32. alignment_buffered : {
  33. type : integer
  34. },
  35. end_to_end_duration : {
  36. type : integer
  37. },
  38. id : {
  39. type : integer
  40. },
  41. is_savepoint : {
  42. type : boolean
  43. },
  44. latest_ack_timestamp : {
  45. type : integer
  46. },
  47. num_acknowledged_subtasks : {
  48. type : integer
  49. },
  50. num_subtasks : {
  51. type : integer
  52. },
  53. state_size : {
  54. type : integer
  55. },
  56. status : {
  57. type : string”,
  58. enum : [ IN_PROGRESS”, COMPLETED”, FAILED ]
  59. },
  60. tasks : {
  61. type : object”,
  62. additionalProperties : {
  63. type : object”,
  64. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:TaskCheckpointStatistics
  65. }
  66. },
  67. trigger_timestamp : {
  68. type : integer
  69. }
  70. }
  71. }
  72. },
  73. latest : {
  74. type : object”,
  75. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointingStatistics:LatestCheckpoints”,
  76. properties : {
  77. completed : {
  78. type : object”,
  79. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointStatistics:CompletedCheckpointStatistics”,
  80. properties : {
  81. alignment_buffered : {
  82. type : integer
  83. },
  84. discarded : {
  85. type : boolean
  86. },
  87. end_to_end_duration : {
  88. type : integer
  89. },
  90. external_path : {
  91. type : string
  92. },
  93. id : {
  94. type : integer
  95. },
  96. is_savepoint : {
  97. type : boolean
  98. },
  99. latest_ack_timestamp : {
  100. type : integer
  101. },
  102. num_acknowledged_subtasks : {
  103. type : integer
  104. },
  105. num_subtasks : {
  106. type : integer
  107. },
  108. state_size : {
  109. type : integer
  110. },
  111. status : {
  112. type : string”,
  113. enum : [ IN_PROGRESS”, COMPLETED”, FAILED ]
  114. },
  115. tasks : {
  116. type : object”,
  117. additionalProperties : {
  118. type : object”,
  119. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:TaskCheckpointStatistics”,
  120. properties : {
  121. alignment_buffered : {
  122. type : integer
  123. },
  124. end_to_end_duration : {
  125. type : integer
  126. },
  127. id : {
  128. type : integer
  129. },
  130. latest_ack_timestamp : {
  131. type : integer
  132. },
  133. num_acknowledged_subtasks : {
  134. type : integer
  135. },
  136. num_subtasks : {
  137. type : integer
  138. },
  139. state_size : {
  140. type : integer
  141. },
  142. status : {
  143. type : string”,
  144. enum : [ IN_PROGRESS”, COMPLETED”, FAILED ]
  145. }
  146. }
  147. }
  148. },
  149. trigger_timestamp : {
  150. type : integer
  151. }
  152. }
  153. },
  154. failed : {
  155. type : object”,
  156. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointStatistics:FailedCheckpointStatistics”,
  157. properties : {
  158. alignment_buffered : {
  159. type : integer
  160. },
  161. end_to_end_duration : {
  162. type : integer
  163. },
  164. failure_message : {
  165. type : string
  166. },
  167. failure_timestamp : {
  168. type : integer
  169. },
  170. id : {
  171. type : integer
  172. },
  173. is_savepoint : {
  174. type : boolean
  175. },
  176. latest_ack_timestamp : {
  177. type : integer
  178. },
  179. num_acknowledged_subtasks : {
  180. type : integer
  181. },
  182. num_subtasks : {
  183. type : integer
  184. },
  185. state_size : {
  186. type : integer
  187. },
  188. status : {
  189. type : string”,
  190. enum : [ IN_PROGRESS”, COMPLETED”, FAILED ]
  191. },
  192. tasks : {
  193. type : object”,
  194. additionalProperties : {
  195. type : object”,
  196. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:TaskCheckpointStatistics
  197. }
  198. },
  199. trigger_timestamp : {
  200. type : integer
  201. }
  202. }
  203. },
  204. restored : {
  205. type : object”,
  206. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointingStatistics:RestoredCheckpointStatistics”,
  207. properties : {
  208. external_path : {
  209. type : string
  210. },
  211. id : {
  212. type : integer
  213. },
  214. is_savepoint : {
  215. type : boolean
  216. },
  217. restore_timestamp : {
  218. type : integer
  219. }
  220. }
  221. },
  222. savepoint : {
  223. type : object”,
  224. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointStatistics:CompletedCheckpointStatistics
  225. }
  226. }
  227. },
  228. summary : {
  229. type : object”,
  230. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointingStatistics:Summary”,
  231. properties : {
  232. alignment_buffered : {
  233. type : object”,
  234. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:MinMaxAvgStatistics
  235. },
  236. end_to_end_duration : {
  237. type : object”,
  238. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:MinMaxAvgStatistics
  239. },
  240. state_size : {
  241. type : object”,
  242. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:MinMaxAvgStatistics”,
  243. properties : {
  244. avg : {
  245. type : integer
  246. },
  247. max : {
  248. type : integer
  249. },
  250. min : {
  251. type : integer
  252. }
  253. }
  254. }
  255. }
  256. }
  257. }
  258. }
/jobs/:jobid/checkpoints/config
Verb: GETResponse code: 200 OK
Returns the checkpointing configuration.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointConfigInfo”,
  4. properties : {
  5. externalization : {
  6. type : object”,
  7. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointConfigInfo:ExternalizedCheckpointInfo”,
  8. properties : {
  9. delete_on_cancellation : {
  10. type : boolean
  11. },
  12. enabled : {
  13. type : boolean
  14. }
  15. }
  16. },
  17. interval : {
  18. type : integer
  19. },
  20. max_concurrent : {
  21. type : integer
  22. },
  23. min_pause : {
  24. type : integer
  25. },
  26. mode : {
  27. type : any
  28. },
  29. state_backend : {
  30. type : string
  31. },
  32. timeout : {
  33. type : integer
  34. }
  35. }
  36. }
/jobs/:jobid/checkpoints/details/:checkpointid
Verb: GETResponse code: 200 OK
Returns details for a checkpoint.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • checkpointid - Long value that identifies a checkpoint.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointStatistics”,
  4. properties : {
  5. alignment_buffered : {
  6. type : integer
  7. },
  8. end_to_end_duration : {
  9. type : integer
  10. },
  11. id : {
  12. type : integer
  13. },
  14. is_savepoint : {
  15. type : boolean
  16. },
  17. latest_ack_timestamp : {
  18. type : integer
  19. },
  20. num_acknowledged_subtasks : {
  21. type : integer
  22. },
  23. num_subtasks : {
  24. type : integer
  25. },
  26. state_size : {
  27. type : integer
  28. },
  29. status : {
  30. type : string”,
  31. enum : [ IN_PROGRESS”, COMPLETED”, FAILED ]
  32. },
  33. tasks : {
  34. type : object”,
  35. additionalProperties : {
  36. type : object”,
  37. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:TaskCheckpointStatistics”,
  38. properties : {
  39. alignment_buffered : {
  40. type : integer
  41. },
  42. end_to_end_duration : {
  43. type : integer
  44. },
  45. id : {
  46. type : integer
  47. },
  48. latest_ack_timestamp : {
  49. type : integer
  50. },
  51. num_acknowledged_subtasks : {
  52. type : integer
  53. },
  54. num_subtasks : {
  55. type : integer
  56. },
  57. state_size : {
  58. type : integer
  59. },
  60. status : {
  61. type : string”,
  62. enum : [ IN_PROGRESS”, COMPLETED”, FAILED ]
  63. }
  64. }
  65. }
  66. },
  67. trigger_timestamp : {
  68. type : integer
  69. }
  70. }
  71. }
/jobs/:jobid/checkpoints/details/:checkpointid/subtasks/:vertexid
Verb: GETResponse code: 200 OK
Returns checkpoint statistics for a task and its subtasks.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • checkpointid - Long value that identifies a checkpoint.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:TaskCheckpointStatisticsWithSubtaskDetails”,
  4. properties : {
  5. alignment_buffered : {
  6. type : integer
  7. },
  8. end_to_end_duration : {
  9. type : integer
  10. },
  11. id : {
  12. type : integer
  13. },
  14. latest_ack_timestamp : {
  15. type : integer
  16. },
  17. num_acknowledged_subtasks : {
  18. type : integer
  19. },
  20. num_subtasks : {
  21. type : integer
  22. },
  23. state_size : {
  24. type : integer
  25. },
  26. status : {
  27. type : string”,
  28. enum : [ IN_PROGRESS”, COMPLETED”, FAILED ]
  29. },
  30. subtasks : {
  31. type : array”,
  32. items : {
  33. type : object”,
  34. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:SubtaskCheckpointStatistics”,
  35. properties : {
  36. index : {
  37. type : integer
  38. },
  39. status : {
  40. type : string
  41. }
  42. }
  43. }
  44. },
  45. summary : {
  46. type : object”,
  47. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:TaskCheckpointStatisticsWithSubtaskDetails:Summary”,
  48. properties : {
  49. alignment : {
  50. type : object”,
  51. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:TaskCheckpointStatisticsWithSubtaskDetails:CheckpointAlignment”,
  52. properties : {
  53. buffered : {
  54. type : object”,
  55. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:MinMaxAvgStatistics
  56. },
  57. duration : {
  58. type : object”,
  59. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:MinMaxAvgStatistics
  60. }
  61. }
  62. },
  63. checkpoint_duration : {
  64. type : object”,
  65. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:TaskCheckpointStatisticsWithSubtaskDetails:CheckpointDuration”,
  66. properties : {
  67. async : {
  68. type : object”,
  69. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:MinMaxAvgStatistics
  70. },
  71. sync : {
  72. type : object”,
  73. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:MinMaxAvgStatistics
  74. }
  75. }
  76. },
  77. end_to_end_duration : {
  78. type : object”,
  79. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:MinMaxAvgStatistics
  80. },
  81. start_delay : {
  82. type : object”,
  83. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:MinMaxAvgStatistics
  84. },
  85. state_size : {
  86. type : object”,
  87. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:MinMaxAvgStatistics”,
  88. properties : {
  89. avg : {
  90. type : integer
  91. },
  92. max : {
  93. type : integer
  94. },
  95. min : {
  96. type : integer
  97. }
  98. }
  99. }
  100. }
  101. }
  102. }
  103. }
/jobs/:jobid/config
Verb: GETResponse code: 200 OK
Returns the configuration of a job.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  1. {}
  1. {
  2. type : any
  3. }
/jobs/:jobid/exceptions
Verb: GETResponse code: 200 OK
Returns the non-recoverable exceptions that have been observed by the job. The truncated flag defines whether more exceptions occurred, but are not listed, because the response would otherwise get too big.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
Query parameters
  • maxExceptions (optional): Comma-separated list of integer values that specifies the upper limit of exceptions to return.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobExceptionsInfo”,
  4. properties : {
  5. all-exceptions : {
  6. type : array”,
  7. items : {
  8. type : object”,
  9. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobExceptionsInfo:ExecutionExceptionInfo”,
  10. properties : {
  11. exception : {
  12. type : string
  13. },
  14. location : {
  15. type : string
  16. },
  17. task : {
  18. type : string
  19. },
  20. timestamp : {
  21. type : integer
  22. }
  23. }
  24. }
  25. },
  26. root-exception : {
  27. type : string
  28. },
  29. timestamp : {
  30. type : integer
  31. },
  32. truncated : {
  33. type : boolean
  34. }
  35. }
  36. }
/jobs/:jobid/execution-result
Verb: GETResponse code: 200 OK
Returns the result of a job execution. Gives access to the execution time of the job and to all accumulators created by this job.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:JobExecutionResultResponseBody”,
  4. properties : {
  5. job-execution-result : {
  6. type : any
  7. },
  8. status : {
  9. type : object”,
  10. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:queue:QueueStatus”,
  11. required : true,
  12. properties : {
  13. id : {
  14. type : string”,
  15. required : true,
  16. enum : [ IN_PROGRESS”, COMPLETED ]
  17. }
  18. }
  19. }
  20. }
  21. }
/jobs/:jobid/metrics
Verb: GETResponse code: 200 OK
Provides access to job metrics.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
Query parameters
  • get (optional): Comma-separated list of string values to select specific metrics.
  1. {}
  1. {
  2. type : any
  3. }
/jobs/:jobid/plan
Verb: GETResponse code: 200 OK
Returns the dataflow plan of a job.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobPlanInfo”,
  4. properties : {
  5. plan : {
  6. type : any
  7. }
  8. }
  9. }
/jobs/:jobid/rescaling
Verb: PATCHResponse code: 200 OK
Triggers the rescaling of a job. This async operation would return a ‘triggerid’ for further query identifier.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
Query parameters
  • parallelism (mandatory): Positive integer value that specifies the desired parallelism.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:TriggerResponse”,
  4. properties : {
  5. request-id : {
  6. type : any
  7. }
  8. }
  9. }
/jobs/:jobid/rescaling/:triggerid
Verb: GETResponse code: 200 OK
Returns the status of a rescaling operation.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • triggerid - 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:AsynchronousOperationResult”,
  4. properties : {
  5. operation : {
  6. type : object”,
  7. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:AsynchronousOperationInfo”,
  8. properties : {
  9. failure-cause : {
  10. type : any
  11. }
  12. }
  13. },
  14. status : {
  15. type : object”,
  16. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:queue:QueueStatus”,
  17. properties : {
  18. id : {
  19. type : string”,
  20. required : true,
  21. enum : [ IN_PROGRESS”, COMPLETED ]
  22. }
  23. }
  24. }
  25. }
  26. }
/jobs/:jobid/savepoints
Verb: POSTResponse code: 202 Accepted
Triggers a savepoint, and optionally cancels the job afterwards. This async operation would return a ‘triggerid’ for further query identifier.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:savepoints:SavepointTriggerRequestBody”,
  4. properties : {
  5. cancel-job : {
  6. type : boolean
  7. },
  8. target-directory : {
  9. type : string
  10. }
  11. }
  12. }
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:TriggerResponse”,
  4. properties : {
  5. request-id : {
  6. type : any
  7. }
  8. }
  9. }
/jobs/:jobid/savepoints/:triggerid
Verb: GETResponse code: 200 OK
Returns the status of a savepoint operation.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • triggerid - 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:AsynchronousOperationResult”,
  4. properties : {
  5. operation : {
  6. type : object”,
  7. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:savepoints:SavepointInfo”,
  8. properties : {
  9. failure-cause : {
  10. type : any
  11. },
  12. location : {
  13. type : string
  14. }
  15. }
  16. },
  17. status : {
  18. type : object”,
  19. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:queue:QueueStatus”,
  20. properties : {
  21. id : {
  22. type : string”,
  23. required : true,
  24. enum : [ IN_PROGRESS”, COMPLETED ]
  25. }
  26. }
  27. }
  28. }
  29. }
/jobs/:jobid/stop
Verb: POSTResponse code: 202 Accepted
Stops a job with a savepoint. Optionally, it can also emit a MAX_WATERMARK before taking the savepoint to flush out any state waiting for timers to fire. This async operation would return a ‘triggerid’ for further query identifier.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:savepoints:stop:StopWithSavepointRequestBody”,
  4. properties : {
  5. drain : {
  6. type : boolean
  7. },
  8. targetDirectory : {
  9. type : string
  10. }
  11. }
  12. }
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:TriggerResponse”,
  4. properties : {
  5. request-id : {
  6. type : any
  7. }
  8. }
  9. }
/jobs/:jobid/vertices/:vertexid
Verb: GETResponse code: 200 OK
Returns details for a task, with a summary for each of its subtasks.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobVertexDetailsInfo”,
  4. properties : {
  5. id : {
  6. type : any
  7. },
  8. name : {
  9. type : string
  10. },
  11. now : {
  12. type : integer
  13. },
  14. parallelism : {
  15. type : integer
  16. },
  17. subtasks : {
  18. type : array”,
  19. items : {
  20. type : object”,
  21. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:SubtaskExecutionAttemptDetailsInfo”,
  22. properties : {
  23. attempt : {
  24. type : integer
  25. },
  26. duration : {
  27. type : integer
  28. },
  29. end-time : {
  30. type : integer
  31. },
  32. host : {
  33. type : string
  34. },
  35. metrics : {
  36. type : object”,
  37. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:metrics:IOMetricsInfo”,
  38. properties : {
  39. read-bytes : {
  40. type : integer
  41. },
  42. read-bytes-complete : {
  43. type : boolean
  44. },
  45. read-records : {
  46. type : integer
  47. },
  48. read-records-complete : {
  49. type : boolean
  50. },
  51. write-bytes : {
  52. type : integer
  53. },
  54. write-bytes-complete : {
  55. type : boolean
  56. },
  57. write-records : {
  58. type : integer
  59. },
  60. write-records-complete : {
  61. type : boolean
  62. }
  63. }
  64. },
  65. start-time : {
  66. type : integer
  67. },
  68. start_time : {
  69. type : integer
  70. },
  71. status : {
  72. type : string”,
  73. enum : [ CREATED”, SCHEDULED”, DEPLOYING”, RUNNING”, FINISHED”, CANCELING”, CANCELED”, FAILED”, RECONCILING ]
  74. },
  75. subtask : {
  76. type : integer
  77. },
  78. taskmanager-id : {
  79. type : string
  80. }
  81. }
  82. }
  83. }
  84. }
  85. }
/jobs/:jobid/vertices/:vertexid/accumulators
Verb: GETResponse code: 200 OK
Returns user-defined accumulators of a task, aggregated across all subtasks.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobVertexAccumulatorsInfo”,
  4. properties : {
  5. id : {
  6. type : string
  7. },
  8. user-accumulators : {
  9. type : array”,
  10. items : {
  11. type : object”,
  12. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:UserAccumulator”,
  13. properties : {
  14. name : {
  15. type : string
  16. },
  17. type : {
  18. type : string
  19. },
  20. value : {
  21. type : string
  22. }
  23. }
  24. }
  25. }
  26. }
  27. }
/jobs/:jobid/vertices/:vertexid/backpressure
Verb: GETResponse code: 200 OK
Returns back-pressure information for a job, and may initiate back-pressure sampling if necessary.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobVertexBackPressureInfo”,
  4. properties : {
  5. backpressure-level : {
  6. type : string”,
  7. enum : [ ok”, low”, high ]
  8. },
  9. end-timestamp : {
  10. type : integer
  11. },
  12. status : {
  13. type : string”,
  14. enum : [ deprecated”, ok ]
  15. },
  16. subtasks : {
  17. type : array”,
  18. items : {
  19. type : object”,
  20. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobVertexBackPressureInfo:SubtaskBackPressureInfo”,
  21. properties : {
  22. backpressure-level : {
  23. type : string”,
  24. enum : [ ok”, low”, high ]
  25. },
  26. ratio : {
  27. type : number
  28. },
  29. subtask : {
  30. type : integer
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
/jobs/:jobid/vertices/:vertexid/metrics
Verb: GETResponse code: 200 OK
Provides access to task metrics.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
Query parameters
  • get (optional): Comma-separated list of string values to select specific metrics.
  1. {}
  1. {
  2. type : any
  3. }
/jobs/:jobid/vertices/:vertexid/subtasks/accumulators
Verb: GETResponse code: 200 OK
Returns all user-defined accumulators for all subtasks of a task.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:SubtasksAllAccumulatorsInfo”,
  4. properties : {
  5. id : {
  6. type : any
  7. },
  8. parallelism : {
  9. type : integer
  10. },
  11. subtasks : {
  12. type : array”,
  13. items : {
  14. type : object”,
  15. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:SubtasksAllAccumulatorsInfo:SubtaskAccumulatorsInfo”,
  16. properties : {
  17. attempt : {
  18. type : integer
  19. },
  20. host : {
  21. type : string
  22. },
  23. subtask : {
  24. type : integer
  25. },
  26. user-accumulators : {
  27. type : array”,
  28. items : {
  29. type : object”,
  30. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:UserAccumulator”,
  31. properties : {
  32. name : {
  33. type : string
  34. },
  35. type : {
  36. type : string
  37. },
  38. value : {
  39. type : string
  40. }
  41. }
  42. }
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }
/jobs/:jobid/vertices/:vertexid/subtasks/metrics
Verb: GETResponse code: 200 OK
Provides access to aggregated subtask metrics.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
Query parameters
  • get (optional): Comma-separated list of string values to select specific metrics.
  • agg (optional): Comma-separated list of aggregation modes which should be calculated. Available aggregations are: “min, max, sum, avg”.
  • subtasks (optional): Comma-separated list of integer ranges (e.g. “1,3,5-9”) to select specific subtasks.
  1. {}
  1. {
  2. type : any
  3. }
/jobs/:jobid/vertices/:vertexid/subtasks/:subtaskindex
Verb: GETResponse code: 200 OK
Returns details of the current or latest execution attempt of a subtask.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  • subtaskindex - Positive integer value that identifies a subtask.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:SubtaskExecutionAttemptDetailsInfo”,
  4. properties : {
  5. attempt : {
  6. type : integer
  7. },
  8. duration : {
  9. type : integer
  10. },
  11. end-time : {
  12. type : integer
  13. },
  14. host : {
  15. type : string
  16. },
  17. metrics : {
  18. type : object”,
  19. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:metrics:IOMetricsInfo”,
  20. properties : {
  21. read-bytes : {
  22. type : integer
  23. },
  24. read-bytes-complete : {
  25. type : boolean
  26. },
  27. read-records : {
  28. type : integer
  29. },
  30. read-records-complete : {
  31. type : boolean
  32. },
  33. write-bytes : {
  34. type : integer
  35. },
  36. write-bytes-complete : {
  37. type : boolean
  38. },
  39. write-records : {
  40. type : integer
  41. },
  42. write-records-complete : {
  43. type : boolean
  44. }
  45. }
  46. },
  47. start-time : {
  48. type : integer
  49. },
  50. start_time : {
  51. type : integer
  52. },
  53. status : {
  54. type : string”,
  55. enum : [ CREATED”, SCHEDULED”, DEPLOYING”, RUNNING”, FINISHED”, CANCELING”, CANCELED”, FAILED”, RECONCILING ]
  56. },
  57. subtask : {
  58. type : integer
  59. },
  60. taskmanager-id : {
  61. type : string
  62. }
  63. }
  64. }
/jobs/:jobid/vertices/:vertexid/subtasks/:subtaskindex/attempts/:attempt
Verb: GETResponse code: 200 OK
Returns details of an execution attempt of a subtask. Multiple execution attempts happen in case of failure/recovery.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  • subtaskindex - Positive integer value that identifies a subtask.
  • attempt - Positive integer value that identifies an execution attempt.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:SubtaskExecutionAttemptDetailsInfo”,
  4. properties : {
  5. attempt : {
  6. type : integer
  7. },
  8. duration : {
  9. type : integer
  10. },
  11. end-time : {
  12. type : integer
  13. },
  14. host : {
  15. type : string
  16. },
  17. metrics : {
  18. type : object”,
  19. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:metrics:IOMetricsInfo”,
  20. properties : {
  21. read-bytes : {
  22. type : integer
  23. },
  24. read-bytes-complete : {
  25. type : boolean
  26. },
  27. read-records : {
  28. type : integer
  29. },
  30. read-records-complete : {
  31. type : boolean
  32. },
  33. write-bytes : {
  34. type : integer
  35. },
  36. write-bytes-complete : {
  37. type : boolean
  38. },
  39. write-records : {
  40. type : integer
  41. },
  42. write-records-complete : {
  43. type : boolean
  44. }
  45. }
  46. },
  47. start-time : {
  48. type : integer
  49. },
  50. start_time : {
  51. type : integer
  52. },
  53. status : {
  54. type : string”,
  55. enum : [ CREATED”, SCHEDULED”, DEPLOYING”, RUNNING”, FINISHED”, CANCELING”, CANCELED”, FAILED”, RECONCILING ]
  56. },
  57. subtask : {
  58. type : integer
  59. },
  60. taskmanager-id : {
  61. type : string
  62. }
  63. }
  64. }
/jobs/:jobid/vertices/:vertexid/subtasks/:subtaskindex/attempts/:attempt/accumulators
Verb: GETResponse code: 200 OK
Returns the accumulators of an execution attempt of a subtask. Multiple execution attempts happen in case of failure/recovery.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  • subtaskindex - Positive integer value that identifies a subtask.
  • attempt - Positive integer value that identifies an execution attempt.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:SubtaskExecutionAttemptAccumulatorsInfo”,
  4. properties : {
  5. attempt : {
  6. type : integer
  7. },
  8. id : {
  9. type : string
  10. },
  11. subtask : {
  12. type : integer
  13. },
  14. user-accumulators : {
  15. type : array”,
  16. items : {
  17. type : object”,
  18. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:UserAccumulator”,
  19. properties : {
  20. name : {
  21. type : string
  22. },
  23. type : {
  24. type : string
  25. },
  26. value : {
  27. type : string
  28. }
  29. }
  30. }
  31. }
  32. }
  33. }
/jobs/:jobid/vertices/:vertexid/subtasks/:subtaskindex/metrics
Verb: GETResponse code: 200 OK
Provides access to subtask metrics.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  • subtaskindex - Positive integer value that identifies a subtask.
Query parameters
  • get (optional): Comma-separated list of string values to select specific metrics.
  1. {}
  1. {
  2. type : any
  3. }
/jobs/:jobid/vertices/:vertexid/subtasktimes
Verb: GETResponse code: 200 OK
Returns time-related information for all subtasks of a task.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:SubtasksTimesInfo”,
  4. properties : {
  5. id : {
  6. type : string
  7. },
  8. name : {
  9. type : string
  10. },
  11. now : {
  12. type : integer
  13. },
  14. subtasks : {
  15. type : array”,
  16. items : {
  17. type : object”,
  18. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:SubtasksTimesInfo:SubtaskTimeInfo”,
  19. properties : {
  20. duration : {
  21. type : integer
  22. },
  23. host : {
  24. type : string
  25. },
  26. subtask : {
  27. type : integer
  28. },
  29. timestamps : {
  30. type : object”,
  31. additionalProperties : {
  32. type : integer
  33. }
  34. }
  35. }
  36. }
  37. }
  38. }
  39. }
/jobs/:jobid/vertices/:vertexid/taskmanagers
Verb: GETResponse code: 200 OK
Returns task information aggregated by task manager.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobVertexTaskManagersInfo”,
  4. properties : {
  5. id : {
  6. type : any
  7. },
  8. name : {
  9. type : string
  10. },
  11. now : {
  12. type : integer
  13. },
  14. taskmanagers : {
  15. type : array”,
  16. items : {
  17. type : object”,
  18. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:JobVertexTaskManagersInfo:TaskManagersInfo”,
  19. properties : {
  20. duration : {
  21. type : integer
  22. },
  23. end-time : {
  24. type : integer
  25. },
  26. host : {
  27. type : string
  28. },
  29. metrics : {
  30. type : object”,
  31. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:metrics:IOMetricsInfo”,
  32. properties : {
  33. read-bytes : {
  34. type : integer
  35. },
  36. read-bytes-complete : {
  37. type : boolean
  38. },
  39. read-records : {
  40. type : integer
  41. },
  42. read-records-complete : {
  43. type : boolean
  44. },
  45. write-bytes : {
  46. type : integer
  47. },
  48. write-bytes-complete : {
  49. type : boolean
  50. },
  51. write-records : {
  52. type : integer
  53. },
  54. write-records-complete : {
  55. type : boolean
  56. }
  57. }
  58. },
  59. start-time : {
  60. type : integer
  61. },
  62. status : {
  63. type : string”,
  64. enum : [ CREATED”, SCHEDULED”, DEPLOYING”, RUNNING”, FINISHED”, CANCELING”, CANCELED”, FAILED”, RECONCILING ]
  65. },
  66. status-counts : {
  67. type : object”,
  68. additionalProperties : {
  69. type : integer
  70. }
  71. },
  72. taskmanager-id : {
  73. type : string
  74. }
  75. }
  76. }
  77. }
  78. }
  79. }
/jobs/:jobid/vertices/:vertexid/watermarks
Verb: GETResponse code: 200 OK
Returns the watermarks for all subtasks of a task.
Path parameters
  • jobid - 32-character hexadecimal string value that identifies a job.
  • vertexid - 32-character hexadecimal string value that identifies a job vertex.
  1. {}
  1. {
  2. type : any
  3. }
/overview
Verb: GETResponse code: 200 OK
Returns an overview over the Flink cluster.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:legacy:messages:ClusterOverviewWithVersion”,
  4. properties : {
  5. flink-commit : {
  6. type : string
  7. },
  8. flink-version : {
  9. type : string
  10. },
  11. jobs-cancelled : {
  12. type : integer
  13. },
  14. jobs-failed : {
  15. type : integer
  16. },
  17. jobs-finished : {
  18. type : integer
  19. },
  20. jobs-running : {
  21. type : integer
  22. },
  23. slots-available : {
  24. type : integer
  25. },
  26. slots-total : {
  27. type : integer
  28. },
  29. taskmanagers : {
  30. type : integer
  31. }
  32. }
  33. }
/savepoint-disposal
Verb: POSTResponse code: 200 OK
Triggers the desposal of a savepoint. This async operation would return a ‘triggerid’ for further query identifier.
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:job:savepoints:SavepointDisposalRequest”,
  4. properties : {
  5. savepoint-path : {
  6. type : string
  7. }
  8. }
  9. }
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:TriggerResponse”,
  4. properties : {
  5. request-id : {
  6. type : any
  7. }
  8. }
  9. }
/savepoint-disposal/:triggerid
Verb: GETResponse code: 200 OK
Returns the status of a savepoint disposal operation.
Path parameters
  • triggerid - 32-character hexadecimal string that identifies an asynchronous operation trigger ID. The ID was returned then the operation was triggered.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:AsynchronousOperationResult”,
  4. properties : {
  5. operation : {
  6. type : object”,
  7. id : urn:jsonschema:org:apache:flink:runtime:rest:handler:async:AsynchronousOperationInfo”,
  8. properties : {
  9. failure-cause : {
  10. type : any
  11. }
  12. }
  13. },
  14. status : {
  15. type : object”,
  16. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:queue:QueueStatus”,
  17. properties : {
  18. id : {
  19. type : string”,
  20. required : true,
  21. enum : [ IN_PROGRESS”, COMPLETED ]
  22. }
  23. }
  24. }
  25. }
  26. }
/taskmanagers
Verb: GETResponse code: 200 OK
Returns an overview over all task managers.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:taskmanager:TaskManagersInfo”,
  4. properties : {
  5. taskmanagers : {
  6. type : array”,
  7. items : {
  8. type : object”,
  9. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:taskmanager:TaskManagerInfo”,
  10. properties : {
  11. dataPort : {
  12. type : integer
  13. },
  14. freeResource : {
  15. type : object”,
  16. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:ResourceProfileInfo
  17. },
  18. freeSlots : {
  19. type : integer
  20. },
  21. hardware : {
  22. type : object”,
  23. id : urn:jsonschema:org:apache:flink:runtime:instance:HardwareDescription”,
  24. properties : {
  25. cpuCores : {
  26. type : integer
  27. },
  28. freeMemory : {
  29. type : integer
  30. },
  31. managedMemory : {
  32. type : integer
  33. },
  34. physicalMemory : {
  35. type : integer
  36. }
  37. }
  38. },
  39. id : {
  40. type : any
  41. },
  42. path : {
  43. type : string
  44. },
  45. slotsNumber : {
  46. type : integer
  47. },
  48. timeSinceLastHeartbeat : {
  49. type : integer
  50. },
  51. totalResource : {
  52. type : object”,
  53. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:ResourceProfileInfo”,
  54. properties : {
  55. cpuCores : {
  56. type : number
  57. },
  58. extendedResources : {
  59. type : object”,
  60. additionalProperties : {
  61. type : number
  62. }
  63. },
  64. managedMemory : {
  65. type : integer
  66. },
  67. networkMemory : {
  68. type : integer
  69. },
  70. taskHeapMemory : {
  71. type : integer
  72. },
  73. taskOffHeapMemory : {
  74. type : integer
  75. }
  76. }
  77. }
  78. }
  79. }
  80. }
  81. }
  82. }
/taskmanagers/metrics
Verb: GETResponse code: 200 OK
Provides access to aggregated task manager metrics.
Query parameters
  • get (optional): Comma-separated list of string values to select specific metrics.
  • agg (optional): Comma-separated list of aggregation modes which should be calculated. Available aggregations are: “min, max, sum, avg”.
  • taskmanagers (optional): Comma-separated list of 32-character hexadecimal strings to select specific task managers.
  1. {}
  1. {
  2. type : any
  3. }
/taskmanagers/:taskmanagerid
Verb: GETResponse code: 200 OK
Returns details for a task manager.
Path parameters
  • taskmanagerid - 32-character hexadecimal string that identifies a task manager.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:taskmanager:TaskManagerDetailsInfo”,
  4. properties : {
  5. dataPort : {
  6. type : integer
  7. },
  8. freeResource : {
  9. type : object”,
  10. $ref : urn:jsonschema:org:apache:flink:runtime:rest:messages:ResourceProfileInfo
  11. },
  12. freeSlots : {
  13. type : integer
  14. },
  15. hardware : {
  16. type : object”,
  17. id : urn:jsonschema:org:apache:flink:runtime:instance:HardwareDescription”,
  18. properties : {
  19. cpuCores : {
  20. type : integer
  21. },
  22. freeMemory : {
  23. type : integer
  24. },
  25. managedMemory : {
  26. type : integer
  27. },
  28. physicalMemory : {
  29. type : integer
  30. }
  31. }
  32. },
  33. id : {
  34. type : any
  35. },
  36. metrics : {
  37. type : object”,
  38. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:taskmanager:TaskManagerMetricsInfo”,
  39. properties : {
  40. directCount : {
  41. type : integer
  42. },
  43. directMax : {
  44. type : integer
  45. },
  46. directUsed : {
  47. type : integer
  48. },
  49. garbageCollectors : {
  50. type : array”,
  51. items : {
  52. type : object”,
  53. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:taskmanager:TaskManagerMetricsInfo:GarbageCollectorInfo”,
  54. properties : {
  55. count : {
  56. type : integer
  57. },
  58. name : {
  59. type : string
  60. },
  61. time : {
  62. type : integer
  63. }
  64. }
  65. }
  66. },
  67. heapCommitted : {
  68. type : integer
  69. },
  70. heapMax : {
  71. type : integer
  72. },
  73. heapUsed : {
  74. type : integer
  75. },
  76. mappedCount : {
  77. type : integer
  78. },
  79. mappedMax : {
  80. type : integer
  81. },
  82. mappedUsed : {
  83. type : integer
  84. },
  85. memorySegmentsAvailable : {
  86. type : integer
  87. },
  88. memorySegmentsTotal : {
  89. type : integer
  90. },
  91. nonHeapCommitted : {
  92. type : integer
  93. },
  94. nonHeapMax : {
  95. type : integer
  96. },
  97. nonHeapUsed : {
  98. type : integer
  99. }
  100. }
  101. },
  102. path : {
  103. type : string
  104. },
  105. slotsNumber : {
  106. type : integer
  107. },
  108. timeSinceLastHeartbeat : {
  109. type : integer
  110. },
  111. totalResource : {
  112. type : object”,
  113. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:ResourceProfileInfo”,
  114. properties : {
  115. cpuCores : {
  116. type : number
  117. },
  118. extendedResources : {
  119. type : object”,
  120. additionalProperties : {
  121. type : number
  122. }
  123. },
  124. managedMemory : {
  125. type : integer
  126. },
  127. networkMemory : {
  128. type : integer
  129. },
  130. taskHeapMemory : {
  131. type : integer
  132. },
  133. taskOffHeapMemory : {
  134. type : integer
  135. }
  136. }
  137. }
  138. }
  139. }
/taskmanagers/:taskmanagerid/logs
Verb: GETResponse code: 200 OK
Returns the list of log files on a TaskManager.
Path parameters
  • taskmanagerid - 32-character hexadecimal string that identifies a task manager.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:LogListInfo”,
  4. properties : {
  5. logs : {
  6. type : array”,
  7. items : {
  8. type : object”,
  9. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:LogInfo”,
  10. properties : {
  11. name : {
  12. type : string
  13. },
  14. size : {
  15. type : integer
  16. }
  17. }
  18. }
  19. }
  20. }
  21. }
/taskmanagers/:taskmanagerid/metrics
Verb: GETResponse code: 200 OK
Provides access to task manager metrics.
Path parameters
  • taskmanagerid - 32-character hexadecimal string that identifies a task manager.
Query parameters
  • get (optional): Comma-separated list of string values to select specific metrics.
  1. {}
  1. {
  2. type : any
  3. }
/taskmanagers/:taskmanagerid/thread-dump
Verb: GETResponse code: 200 OK
Returns the thread dump of the requested TaskManager.
Path parameters
  • taskmanagerid - 32-character hexadecimal string that identifies a task manager.
  1. {}
  1. {
  2. type : object”,
  3. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:taskmanager:ThreadDumpInfo”,
  4. properties : {
  5. threadInfos : {
  6. type : array”,
  7. items : {
  8. type : object”,
  9. id : urn:jsonschema:org:apache:flink:runtime:rest:messages:taskmanager:ThreadDumpInfo:ThreadInfo”,
  10. properties : {
  11. stringifiedThreadInfo : {
  12. type : string
  13. },
  14. threadName : {
  15. type : string
  16. }
  17. }
  18. }
  19. }
  20. }
  21. }