Unverified Commit 331ddbf4 authored by Zzm0809's avatar Zzm0809 Committed by GitHub

optimize openapi docs (#2958)

parent 3f576bc8
---
sidebar_position: 2
position: 2
id: CancelFlinkJob
title: Cancel Flink Job
---
> URL: http://localhost:8888/openapi/cancel?id=1&withSavePoint=false&forceCancel=true
>
> Origin Url: http://localhost:8888/openapi/cancel
>
> Type: GET
## Request headers
| Header Name | Header Value |
|-------------|--------------|
## Parameters
### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|---------------|---------|-------|-------------|
| true | id | Number | 1 | |
| true | withSavePoint | Boolean | false | |
| true | forceCancel | Boolean | true | |
### Body parameters
##### JSON
```json lines showLineNumbers
```
##### JSON document
```json lines showLineNumbers
```
#### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
#### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
## Response
### Response example
```json lines showLineNumbers
```
### Response document
```json lines showLineNumbers
{
"msg": "Result Message",
"code": "Result Code",
"data": {
"java.lang.Boolean": "No comment,Type =Boolean"
},
"success": "Result is Success",
"time": "Result Time"
}
```
---
sidebar_position: 3
position: 3
id: ExplainSql
title: Explain Sql
---
> URL: http://localhost:8888/openapi/explainSql
>
> Origin Url: http://localhost:8888/openapi/explainSql
>
> Type: POST
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Body parameters
###### JSON
```json lines showLineNumbers
{
"id": 6,
"name": "Name",
"dialect": "dialect_kynq4",
"type": "Local",
"savePointStrategy": 1,
"savePointPath": "/savepoints",
"parallelism": 4,
"fragment": false,
"statementSet": "false",
"batchModel": "true",
"clusterId": 1,
"clusterConfigurationId": 2,
"databaseId": 3,
"alertGroupId": 7001,
"note": "note_og81s",
"step": 1,
"jobInstanceId": 8001,
"status": "RUNNING",
"versionId": 9001,
"enabled": true,
"statement": "SELECT * FROM table",
"clusterName": "clusterName_a2511",
"configJson": {
"udfConfig": {
"templateId": 1,
"selectKeys": [
{}
],
"className": "className_xk9o4"
},
"customConfig": [
{
"key": "test",
"value": "test"
}
]
},
"path": "path_gfm05",
"clusterConfigurationName": "clusterConfigurationName_zwazn",
"databaseName": "databaseName_qlxym",
"envName": "envName_8wwn8",
"alertGroupName": "alertGroupName_l8a8e",
"useResult": "true",
"useChangeLog": "false",
"useAutoCancel": "false",
"session": "session_id",
"jobName": "MyJob",
"maxRowNum": 100,
"envId": 1,
"variables": {}
}
```
###### JSON document
```json lines showLineNumbers
{
"note": "Note",
"configJson": {
"udfConfig": {
"selectKeys": [
{}
],
"className": "Class Name",
"templateId": "Template ID"
},
"customConfig": [
{
"value": "value",
"key": "key"
}
]
},
"alertGroupId": "Alert Group ID",
"dialect": "Dialect",
"jobInstanceId": "Job Instance ID",
"databaseName": "Database Name",
"session": "Session",
"parallelism": "Parallelism",
"clusterConfigurationId": "Cluster Configuration ID",
"batchModel": "Batch Model",
"clusterId": "ClusterInstance ID",
"type": "Run Mode",
"statementSet": "Use Statement Set",
"enabled": "Enabled",
"path": "Path",
"clusterName": "ClusterInstance Name",
"savePointPath": "Save Point Path",
"statement": "Statement",
"id": "ID",
"databaseId": "Database ID",
"savePointStrategy": "Save Point Strategy",
"jobName": "Job Name",
"alertGroupName": "Alert Group Name",
"useAutoCancel": "Use Auto Cancel",
"variables": {},
"clusterConfigurationName": "Cluster Configuration Name",
"envId": "Environment ID",
"useResult": "UseResult",
"maxRowNum": "Max Row Number",
"fragment": "Fragment Flag",
"versionId": "Version ID",
"envName": "Environment Name",
"name": "Name",
"useChangeLog": "UseChangeLog",
"step": "Step",
"status": "Job status"
}
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg":"Result Message",
"code":"Result Code",
"data":{},
"success":"Result is Success",
"time":"Result Time"
}
```
---
sidebar_position: 4
position: 4
id: ExportSql
title: Export Sql
---
> URL: http://localhost:8888/openapi/exportSql?id=1
>
> Origin Url: http://localhost:8888/openapi/exportSql
>
> Type: GET
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|-----------|--------|-------|-------------|
| true | id | Number | 1 | Task Id |
##### Body parameters
###### JSON
```json lines showLineNumbers
```
###### JSON document
```json lines showLineNumbers
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg": "Result Message",
"code": "Result Code",
"data": {
"java.lang.String": "No comment,Type =String"
},
"success": "Result is Success",
"time": "Result Time"
}
```
---
sidebar_position: 5
position: 5
id: GetJobInstance
title: Get Job Instance
---
> URL: http://localhost:8888/openapi/getJobInstance?id=1
>
> Origin Url: http://localhost:8888/openapi/getJobInstance
>
> Type: GET
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|-----------|--------|-------|-----------------|
| true | id | Number | 1 | Job Instance Id |
##### Body parameters
###### JSON
```json lines showLineNumbers
```
###### JSON document
```json lines showLineNumbers
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg":"Result Message",
"code":"Result Code",
"data":{
"finishTime":"Finish Time",
"creator":"Creator",
"jid":"JID",
"count":"Group by count",
"updateTime":"Update Time",
"clusterId":"ClusterInstance ID",
"error":"Error",
"operator":"Operator",
"updater":"updater",
"duration":"Duration",
"createTime":"Create Time",
"historyId":"History ID",
"tenantId":"Tenant ID",
"name":"Name",
"step":"Step",
"id":"ID",
"failedRestartCount":"Failed Restart Count",
"taskId":"Task ID",
"status":"Status"
},
"success":"Result is Success",
"time":"Result Time"
}
```
---
sidebar_position: 6
position: 6
id: GetJobInstanceByTaskId
title: Get Job Instance By Task Id
---
> URL: http://localhost:8888/openapi/getJobInstanceByTaskId?id=1
>
> Origin Url: http://localhost:8888/openapi/getJobInstanceByTaskId
>
> Type: GET
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|-----------|--------|-------|-------------|
| true | id | Number | 1 | Task Id |
##### Body parameters
###### JSON
```json lines showLineNumbers
```
###### JSON document
```json lines showLineNumbers
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg":"Result Message",
"code":"Result Code",
"data":{
"finishTime":"Finish Time",
"creator":"Creator",
"jid":"JID",
"count":"Group by count",
"updateTime":"Update Time",
"clusterId":"ClusterInstance ID",
"error":"Error",
"operator":"Operator",
"updater":"updater",
"duration":"Duration",
"createTime":"Create Time",
"historyId":"History ID",
"tenantId":"Tenant ID",
"name":"Name",
"step":"Step",
"id":"ID",
"failedRestartCount":"Failed Restart Count",
"taskId":"Task ID",
"status":"Status"
},
"success":"Result is Success",
"time":"Result Time"
}
```
---
sidebar_position: 7
position: 7
id: GetJobPlan
title: Get Job Plan
---
> URL: http://localhost:8888/openapi/getJobPlan
>
> Origin Url: http://localhost:8888/openapi/getJobPlan
>
> Type: POST
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Body parameters
###### JSON
```json lines showLineNumbers
{
"id": 6,
"name": "Name",
"dialect": "dialect_ujgla",
"type": "Local",
"savePointStrategy": 1,
"savePointPath": "/savepoints",
"parallelism": 4,
"fragment": false,
"statementSet": "false",
"batchModel": "true",
"clusterId": 1,
"clusterConfigurationId": 2,
"databaseId": 3,
"alertGroupId": 7001,
"note": "note_x9b2i",
"step": 1,
"jobInstanceId": 8001,
"status": "RUNNING",
"versionId": 9001,
"enabled": true,
"statement": "SELECT * FROM table",
"clusterName": "clusterName_spzq9",
"configJson": {
"udfConfig": {
"templateId": 1,
"selectKeys": [
{}
],
"className": "className_6pfjd"
},
"customConfig": [
{
"key": "test",
"value": "test"
}
]
},
"path": "path_4wg3s",
"clusterConfigurationName": "clusterConfigurationName_6oq9w",
"databaseName": "databaseName_dsgrr",
"envName": "envName_v1ukq",
"alertGroupName": "alertGroupName_hln14",
"useResult": "true",
"useChangeLog": "false",
"useAutoCancel": "false",
"session": "session_id",
"jobName": "MyJob",
"maxRowNum": 100,
"envId": 1,
"variables": {}
}
```
###### JSON document
```json lines showLineNumbers
{
"note": "Note",
"configJson": {
"udfConfig": {
"selectKeys": [
{}
],
"className": "Class Name",
"templateId": "Template ID"
},
"customConfig": [
{
"value": "value",
"key": "key"
}
]
},
"alertGroupId": "Alert Group ID",
"dialect": "Dialect",
"jobInstanceId": "Job Instance ID",
"databaseName": "Database Name",
"session": "Session",
"parallelism": "Parallelism",
"clusterConfigurationId": "Cluster Configuration ID",
"batchModel": "Batch Model",
"clusterId": "ClusterInstance ID",
"type": "Run Mode",
"statementSet": "Use Statement Set",
"enabled": "Enabled",
"path": "Path",
"clusterName": "ClusterInstance Name",
"savePointPath": "Save Point Path",
"statement": "Statement",
"id": "ID",
"databaseId": "Database ID",
"savePointStrategy": "Save Point Strategy",
"jobName": "Job Name",
"alertGroupName": "Alert Group Name",
"useAutoCancel": "Use Auto Cancel",
"variables": {},
"clusterConfigurationName": "Cluster Configuration Name",
"envId": "Environment ID",
"useResult": "UseResult",
"maxRowNum": "Max Row Number",
"fragment": "Fragment Flag",
"versionId": "Version ID",
"envName": "Environment Name",
"name": "Name",
"useChangeLog": "UseChangeLog",
"step": "Step",
"status": "Job status"
}
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg": "Result Message",
"code": "Result Code",
"data": {
"_children": {},
"_nodeFactory": {
"_cfgBigDecimalExact": "No comment,Type =Boolean"
}
},
"success": "Result is Success",
"time": "Result Time"
}
```
### Demo
```json lines showLineNumbers
http://127.0.0.1:8888/openapi/getJobPlan
{
/* required-start */
"statement": "CREATE TABLE Orders (\r\n order_number INT,\r\n price DECIMAL(32,2),\r\n order_time TIMESTAMP(3)\r\n) WITH (\r\n 'connector' = 'datagen',\r\n 'rows-per-second' = '1',\r\n 'fields.order_number.kind' = 'sequence',\r\n 'fields.order_number.start' = '1',\r\n 'fields.order_number.end' = '1000'\r\n);\r\nCREATE TABLE pt (\r\nordertotal INT,\r\nnumtotal INT\r\n) WITH (\r\n 'connector' = 'print'\r\n);\r\ninsert into pt select 1 as ordertotal ,sum(order_number)*2 as numtotal from Orders",
/* required-end */
/* default-start */
"useStatementSet": false,
"fragment": false,
"parallelism": 1,
/* default-start */
/* custom-start */
"configuration": {
"table.exec.resource.default-parallelism": 2
}
/* custom-end */
}
```
\ No newline at end of file
---
sidebar_position: 8
position: 8
id: GetStreamGraph
title: Get Stream Graph
---
> URL: http://localhost:8888/openapi/getStreamGraph
>
> Origin Url: http://localhost:8888/openapi/getStreamGraph
>
> Type: POST
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Body parameters
###### JSON
```json lines showLineNumbers
{
"id": 6,
"name": "Name",
"dialect": "dialect_lsq59",
"type": "Local",
"savePointStrategy": 1,
"savePointPath": "/savepoints",
"parallelism": 4,
"fragment": false,
"statementSet": "false",
"batchModel": "true",
"clusterId": 1,
"clusterConfigurationId": 2,
"databaseId": 3,
"alertGroupId": 7001,
"note": "note_1yqdr",
"step": 1,
"jobInstanceId": 8001,
"status": "RUNNING",
"versionId": 9001,
"enabled": true,
"statement": "SELECT * FROM table",
"clusterName": "clusterName_g02m1",
"configJson": {
"udfConfig": {
"templateId": 1,
"selectKeys": [
{}
],
"className": "className_wh0cp"
},
"customConfig": [
{
"key": "test",
"value": "test"
}
]
},
"path": "path_f1cu8",
"clusterConfigurationName": "clusterConfigurationName_drlr1",
"databaseName": "databaseName_cnt5m",
"envName": "envName_u51ma",
"alertGroupName": "alertGroupName_ezvtk",
"useResult": "true",
"useChangeLog": "false",
"useAutoCancel": "false",
"session": "session_id",
"jobName": "MyJob",
"maxRowNum": 100,
"envId": 1,
"variables": {}
}
```
###### JSON document
```json lines showLineNumbers
{
"note":"Note",
"configJson":{
"udfConfig":{
"selectKeys":[
{}
],
"className":"Class Name",
"templateId":"Template ID"
},
"customConfig":[
{
"value":"value",
"key":"key"
}
]
},
"alertGroupId":"Alert Group ID",
"dialect":"Dialect",
"jobInstanceId":"Job Instance ID",
"databaseName":"Database Name",
"session":"Session",
"parallelism":"Parallelism",
"clusterConfigurationId":"Cluster Configuration ID",
"batchModel":"Batch Model",
"clusterId":"ClusterInstance ID",
"type":"Run Mode",
"statementSet":"Use Statement Set",
"enabled":"Enabled",
"path":"Path",
"clusterName":"ClusterInstance Name",
"savePointPath":"Save Point Path",
"statement":"Statement",
"id":"ID",
"databaseId":"Database ID",
"savePointStrategy":"Save Point Strategy",
"jobName":"Job Name",
"alertGroupName":"Alert Group Name",
"useAutoCancel":"Use Auto Cancel",
"variables":{},
"clusterConfigurationName":"Cluster Configuration Name",
"envId":"Environment ID",
"useResult":"UseResult",
"maxRowNum":"Max Row Number",
"fragment":"Fragment Flag",
"versionId":"Version ID",
"envName":"Environment Name",
"name":"Name",
"useChangeLog":"UseChangeLog",
"step":"Step",
"status":"Job status"
}
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg":"Result Message",
"code":"Result Code",
"data":{
"_children":{},
"_nodeFactory":{
"_cfgBigDecimalExact":"No comment,Type =Boolean"
}
},
"success":"Result is Success",
"time":"Result Time"
}
```
### Demo
```json lines showLineNumbers
http://127.0.0.1:8888/openapi/getStreamGraph
{
/* required-start */
"statement":"CREATE TABLE Orders (\r\n order_number INT,\r\n price DECIMAL(32,2),\r\n order_time TIMESTAMP(3)\r\n) WITH (\r\n 'connector' = 'datagen',\r\n 'rows-per-second' = '1',\r\n 'fields.order_number.kind' = 'sequence',\r\n 'fields.order_number.start' = '1',\r\n 'fields.order_number.end' = '1000'\r\n);\r\nCREATE TABLE pt (\r\nordertotal INT,\r\nnumtotal INT\r\n) WITH (\r\n 'connector' = 'print'\r\n);\r\ninsert into pt select 1 as ordertotal ,sum(order_number)*2 as numtotal from Orders",
/* required-end */
/* default-start */
"useStatementSet":false,
"fragment":false,
"parallelism":1,
/* default-start */
/* custom-start */
"configuration":{
"table.exec.resource.default-parallelism":2
}
/* custom-end */
}
```
---
sidebar_position: 9
position: 9
id: GetTaskLineage
title: Get Task Lineage
---
> URL: http://localhost:8888/openapi/getTaskLineage?id=1
>
> Origin Url: http://localhost:8888/openapi/getTaskLineage
>
> Type: GET
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|-----------|--------|-------|-------------|
| true | id | Number | 1 | Task Id |
##### Body parameters
###### JSON
```json lines showLineNumbers
```
###### JSON document
```json lines showLineNumbers
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg":"Result Message",
"code":"Result Code",
"data":{},
"success":"Result is Success",
"time":"Result Time"
}
```
---
sidebar_position: 10
position: 10
id: RestartTask
title: Restart Task
---
> URL: http://localhost:8888/openapi/restartTask?id=1&savePointPath=savePointPath_z5b86
>
> Origin Url: http://localhost:8888/openapi/restartTask
>
> Type: GET
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|---------------|--------|---------------------|-------------|
| true | id | Number | 1 | |
| true | savePointPath | String | savePointPath_z5b86 | |
##### Body parameters
###### JSON
```json lines showLineNumbers
```
###### JSON document
```json lines showLineNumbers
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg": "Result Message",
"code": "Result Code",
"data": {
"jobConfig": {
"checkpoint": "Check Point",
"jobName": "Name of the job",
"configJson": {},
"useAutoCancel": "Flag indicating whether to use auto-cancel",
"variables": {},
"address": "Job manager address",
"parallelism": "Parallelism level",
"clusterConfigurationId": "Cluster configuration ID",
"batchModel": "Flag indicating whether to use batch model",
"clusterId": "Cluster ID",
"type": "Flink run mode",
"statementSet": "Flag indicating whether to use statement set",
"pyFiles": [
"List of Python files"
],
"useResult": "Flag indicating whether to use the result",
"jarFiles": [
"List of JAR files"
],
"maxRowNum": "Maximum number of rows",
"fragment": "Flag indicating whether to use SQL fragment",
"savePointPath": "Save Point Path",
"useChangeLog": "Flag indicating whether to use change log",
"step": "Task JobLifeCycle",
"savePointStrategy": "Save point strategy",
"useRemote": "Flag indicating whether to use remote execution",
"taskId": "Task ID",
"gatewayConfig": {
"appConfig": {
"userJarParas": [
"User JAR file parameters"
],
"userJarMainAppClass": "Main application class in the JAR file",
"userJarPath": "Path to user JAR file"
},
"kubernetesConfig": {
"dockerConfig": {},
"tmPodTemplate": "TaskManager pod template for Flink jobs",
"configuration": {},
"jmPodTemplate": "JobManager pod template for Flink jobs",
"podTemplate": "Pod template for Flink jobs",
"kubeConfig": "KubeConfig"
},
"jarPaths": [
"Paths to the JAR files"
],
"clusterConfig": {
"hadoopConfigPath": "Path to YARN configuration file",
"flinkConfigPath": "Path to Flink configuration file",
"flinkLibPath": "Path to Flink library directory",
"appId": "YARN application ID",
"hadoopConfigMap": {},
"hadoopConfigList": [
{
"name": "Custom Config Name",
"value": "Custom Config Value"
}
]
},
"type": "Type of gateway (e.g., YARN, Kubernetes)",
"taskId": "ID of the task associated with the job",
"flinkConfig": {
"jobName": "Name of the Flink job",
"jobId": "ID of the Flink job",
"flinkConfigList": [
{
"name": "Custom Config Name",
"value": "Custom Config Value"
}
],
"configuration": {},
"savePoint": "Path to savepoint",
"action": "Action to perform (e.g., START, STOP)",
"flinkVersion": "Flink version",
"savePointType": "Type of savepoint (e.g., TRIGGER, CANCEL)"
}
}
},
"jobInstanceId": "Unique identifier for the job instance",
"jobManagerAddress": "Address of the job manager",
"error": "Error message in case of job failure",
"result": {},
"jobId": "Unique identifier for the job",
"success": "Flag indicating whether the job was successful",
"statement": "SQL statement executed by the job",
"startTime": "Start time of job execution",
"id": "Unique identifier for the job result",
"endTime": "End time of job execution",
"results": [
{
"total": "No comment,Type =Number",
"columns": [
"columns_c7yv2"
],
"success": "No comment,Type =Boolean",
"limit": "No comment,Type =Number",
"rowData": [
{
"loadFactor": 1.0,
"threshold": 1,
"accessOrder": true
}
],
"startTime": "No comment,Type =String",
"page": "No comment,Type =Number",
"endTime": "No comment,Type =String",
"time": "No comment,Type =Number",
"error": "No comment,Type =String"
}
],
"status": "Status of the job"
},
"success": "Result is Success",
"time": "Result Time"
}
```
---
sidebar_position: 11
position: 11
id: SavepointTrigger
title: Savepoint Trigger
---
> URL: http://localhost:8888/openapi/savepoint
>
> Origin Url: http://localhost:8888/openapi/savepoint
>
> Type: POST
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Body parameters
###### JSON
```json lines showLineNumbers
```
###### JSON document
```json lines showLineNumbers
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|---------------|--------|---------------------|-------------|
| true | taskId | Number | 1 | |
| true | savePointType | String | savePointType_28p0g | |
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg":"Result Message",
"code":"Result Code",
"data":{
"exceptionMsg":"No comment,Type =String",
"appId":"Application ID",
"startTime":"No comment,Type =String",
"jobInfos":[
{
"jobId":"Job ID",
"savePoint":"Save Point",
"status":"Job Status"
}
],
"endTime":"No comment,Type =String",
"type":"No comment,Type =String",
"isSuccess":"No comment,Type =Boolean"
},
"success":"Result is Success",
"time":"Result Time"
}
```
### Demo
```json lines showLineNumbers
http://127.0.0.1:8888/openapi/savepoint
{
/* required-start */
"jobId": "195352b0a4518e16699983a13205f059",
"savePointType": "trigger", // trigger | stop | cancel
/* required-end */
/* custom-start */
"savePoint": "195352b0a4518e16699983a13205f059",
"address": "127.0.0.1:8081",
"gatewayConfig": {
"clusterConfig": {
"appId": "application_1637739262398_0032",
"flinkConfigPath": "/opt/src/flink-1.13.3_conf/conf",
"flinkLibPath": "hdfs:///flink13/lib/flinklib",
"yarnConfigPath": "/usr/local/hadoop/hadoop-2.7.7/etc/hadoop"
}
}
/* custom-start */
}
```
\ No newline at end of file
---
sidebar_position: 13
position: 13
id: SubmitTaskId
title: Submit Task By ID
---
> URL: http://localhost:8888/openapi/submitTask?id=1
>
> Origin Url: http://localhost:8888/openapi/submitTask
>
> Type: GET
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|-----------|--------|-------|-------------|
| true | id | Number | 1 | |
##### Body parameters
###### JSON
```json lines showLineNumbers
```
###### JSON document
```json lines showLineNumbers
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg":"Result Message",
"code":"Result Code",
"data":{
"jobConfig":{
"checkpoint":"Check Point",
"jobName":"Name of the job",
"configJson":{},
"useAutoCancel":"Flag indicating whether to use auto-cancel",
"variables":{},
"address":"Job manager address",
"parallelism":"Parallelism level",
"clusterConfigurationId":"Cluster configuration ID",
"batchModel":"Flag indicating whether to use batch model",
"clusterId":"Cluster ID",
"type":"Flink run mode",
"statementSet":"Flag indicating whether to use statement set",
"pyFiles":[
"List of Python files"
],
"useResult":"Flag indicating whether to use the result",
"jarFiles":[
"List of JAR files"
],
"maxRowNum":"Maximum number of rows",
"fragment":"Flag indicating whether to use SQL fragment",
"savePointPath":"Save Point Path",
"useChangeLog":"Flag indicating whether to use change log",
"step":"Task JobLifeCycle",
"savePointStrategy":"Save point strategy",
"useRemote":"Flag indicating whether to use remote execution",
"taskId":"Task ID",
"gatewayConfig":{
"appConfig":{
"userJarParas":[
"User JAR file parameters"
],
"userJarMainAppClass":"Main application class in the JAR file",
"userJarPath":"Path to user JAR file"
},
"kubernetesConfig":{
"dockerConfig":{},
"tmPodTemplate":"TaskManager pod template for Flink jobs",
"configuration":{},
"jmPodTemplate":"JobManager pod template for Flink jobs",
"podTemplate":"Pod template for Flink jobs",
"kubeConfig":"KubeConfig"
},
"jarPaths":[
"Paths to the JAR files"
],
"clusterConfig":{
"hadoopConfigPath":"Path to YARN configuration file",
"flinkConfigPath":"Path to Flink configuration file",
"flinkLibPath":"Path to Flink library directory",
"appId":"YARN application ID",
"hadoopConfigMap":{},
"hadoopConfigList":[
{
"name":"Custom Config Name",
"value":"Custom Config Value"
}
]
},
"type":"Type of gateway (e.g., YARN, Kubernetes)",
"taskId":"ID of the task associated with the job",
"flinkConfig":{
"jobName":"Name of the Flink job",
"jobId":"ID of the Flink job",
"flinkConfigList":[
{
"name":"Custom Config Name",
"value":"Custom Config Value"
}
],
"configuration":{},
"savePoint":"Path to savepoint",
"action":"Action to perform (e.g., START, STOP)",
"flinkVersion":"Flink version",
"savePointType":"Type of savepoint (e.g., TRIGGER, CANCEL)"
}
}
},
"jobInstanceId":"Unique identifier for the job instance",
"jobManagerAddress":"Address of the job manager",
"error":"Error message in case of job failure",
"result":{},
"jobId":"Unique identifier for the job",
"success":"Flag indicating whether the job was successful",
"statement":"SQL statement executed by the job",
"startTime":"Start time of job execution",
"id":"Unique identifier for the job result",
"endTime":"End time of job execution",
"results":[
{
"total":"No comment,Type =Number",
"columns":[
"columns_8rb9m"
],
"success":"No comment,Type =Boolean",
"limit":"No comment,Type =Number",
"rowData":[
{
"loadFactor":1.0,
"threshold":1,
"accessOrder":true
}
],
"startTime":"No comment,Type =String",
"page":"No comment,Type =Number",
"endTime":"No comment,Type =String",
"time":"No comment,Type =Number",
"error":"No comment,Type =String"
}
],
"status":"Status of the job"
},
"success":"Result is Success",
"time":"Result Time"
}
```
### Demo
```
http://127.0.0.1:8888/openapi/submitTask?id=1
```
\ No newline at end of file
---
sidebar_position: 12
position: 12
id: SubmitTaskJob
title: Submit TaskJob
---
> URL: http://localhost:8888/openapi/submitTask
>
> Origin Url: http://localhost:8888/openapi/submitTask
>
> Type: POST
### Request headers
| Header Name | Header Value |
|-------------|--------------|
### Parameters
##### Path parameters
| Parameter | Type | Value | Description |
|-----------|------|-------|-------------|
##### URL parameters
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Body parameters
###### JSON
```json lines showLineNumbers
{
"id": 6,
"savePointPath": "/savepoints",
"variables": {}
}
```
###### JSON document
```json lines showLineNumbers
{
"variables":{},
"savePointPath":"Save Point Path",
"id":"ID"
}
```
##### Form URL-Encoded
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
##### Multipart
| Required | Parameter | Type | Value | Description |
|----------|-----------|------|-------|-------------|
### Response
##### Response example
```json lines showLineNumbers
```
##### Response document
```json lines showLineNumbers
{
"msg":"Result Message",
"code":"Result Code",
"data":{
"jobConfig":{
"checkpoint":"Check Point",
"jobName":"Name of the job",
"configJson":{},
"useAutoCancel":"Flag indicating whether to use auto-cancel",
"variables":{},
"address":"Job manager address",
"parallelism":"Parallelism level",
"clusterConfigurationId":"Cluster configuration ID",
"batchModel":"Flag indicating whether to use batch model",
"clusterId":"Cluster ID",
"type":"Flink run mode",
"statementSet":"Flag indicating whether to use statement set",
"pyFiles":[
"List of Python files"
],
"useResult":"Flag indicating whether to use the result",
"jarFiles":[
"List of JAR files"
],
"maxRowNum":"Maximum number of rows",
"fragment":"Flag indicating whether to use SQL fragment",
"savePointPath":"Save Point Path",
"useChangeLog":"Flag indicating whether to use change log",
"step":"Task JobLifeCycle",
"savePointStrategy":"Save point strategy",
"useRemote":"Flag indicating whether to use remote execution",
"taskId":"Task ID",
"gatewayConfig":{
"appConfig":{
"userJarParas":[
"User JAR file parameters"
],
"userJarMainAppClass":"Main application class in the JAR file",
"userJarPath":"Path to user JAR file"
},
"kubernetesConfig":{
"dockerConfig":{},
"tmPodTemplate":"TaskManager pod template for Flink jobs",
"configuration":{},
"jmPodTemplate":"JobManager pod template for Flink jobs",
"podTemplate":"Pod template for Flink jobs",
"kubeConfig":"KubeConfig"
},
"jarPaths":[
"Paths to the JAR files"
],
"clusterConfig":{
"hadoopConfigPath":"Path to YARN configuration file",
"flinkConfigPath":"Path to Flink configuration file",
"flinkLibPath":"Path to Flink library directory",
"appId":"YARN application ID",
"hadoopConfigMap":{},
"hadoopConfigList":[
{
"name":"Custom Config Name",
"value":"Custom Config Value"
}
]
},
"type":"Type of gateway (e.g., YARN, Kubernetes)",
"taskId":"ID of the task associated with the job",
"flinkConfig":{
"jobName":"Name of the Flink job",
"jobId":"ID of the Flink job",
"flinkConfigList":[
{
"name":"Custom Config Name",
"value":"Custom Config Value"
}
],
"configuration":{},
"savePoint":"Path to savepoint",
"action":"Action to perform (e.g., START, STOP)",
"flinkVersion":"Flink version",
"savePointType":"Type of savepoint (e.g., TRIGGER, CANCEL)"
}
}
},
"jobInstanceId":"Unique identifier for the job instance",
"jobManagerAddress":"Address of the job manager",
"error":"Error message in case of job failure",
"result":{},
"jobId":"Unique identifier for the job",
"success":"Flag indicating whether the job was successful",
"statement":"SQL statement executed by the job",
"startTime":"Start time of job execution",
"id":"Unique identifier for the job result",
"endTime":"End time of job execution",
"results":[
{
"total":"No comment,Type =Number",
"columns":[
"columns_50yua"
],
"success":"No comment,Type =Boolean",
"limit":"No comment,Type =Number",
"rowData":[
{
"loadFactor":1.0,
"threshold":1,
"accessOrder":true
}
],
"startTime":"No comment,Type =String",
"page":"No comment,Type =Number",
"endTime":"No comment,Type =String",
"time":"No comment,Type =Number",
"error":"No comment,Type =String"
}
],
"status":"Status of the job"
},
"success":"Result is Success",
"time":"Result Time"
}
```
{
"label": "openapi",
"position": 996
}
--- ---
sidebar_position: 996 sidebar_position: 1
position: 996 position: 1
id: openapi id: openapi_overview
title: Open API title: Open API 总览
--- ---
Dinky 平台提供 OpenAPI 能力,通过调用 Dinky 的 OpenAPI 可以使用 Dinky 的功能,实现应用和 Dinky 的集成和交互。
### 背景 :::info 介绍
Dinky 平台提供 OpenAPI 能力,通过调用 Dinky 的 OpenAPI 可以使用 Dinky 的功能,实现应用和 Dinky 的集成和交互。
Dinky 的O penAPI 提供了 10 多种 API 功能。通过调用 API,可以快速进行操作和系统集成对接等工作,提高数据开发效率,满足企业定制化需求。您还可以通过开放平台,轻松获取 Dinky 的 OpenAPI 提供多种 API 功能。通过调用 API,可以快速进行操作和系统集成对接等工作,提高数据开发效率,满足企业定制化需求。您还可以通过开放平台,轻松获取
OpenAPI 的使用情况。 OpenAPI 的使用情况。
:::
当前支持的 OpenAPI 包括如下: 当前支持的 OpenAPI 包括如下:
| 序号 | 执行模式 | 类型名称 | 作用 | | 序号 | 执行模式 | 类型名称 | 作用 |
...@@ -31,7 +31,8 @@ OpenAPI 的使用情况。 ...@@ -31,7 +31,8 @@ OpenAPI 的使用情况。
| 13 | savepointTask | | 调用并触发 Savepoint | | 13 | savepointTask | | 调用并触发 Savepoint |
| 14 | submitTask | | 作业调度 | | 14 | submitTask | | 作业调度 |
### 示例
## 示例
**explainSql** **explainSql**
......
...@@ -222,11 +222,11 @@ const config = { ...@@ -222,11 +222,11 @@ const config = {
items: [ items: [
{ {
label: 'doc_home', label: 'doc_home',
to: '/docs/next/platform_intro/overview', to: '/docs/next/get_started/overview',
}, },
{ {
label: 'openapi', label: 'openapi',
to: '/docs/next/openapi', to: '/docs/next/openapi/openapi_overview',
}, },
], ],
}, },
......
...@@ -110,5 +110,9 @@ ...@@ -110,5 +110,9 @@
"sidebar.tutorialSidebar.category.upgrade": { "sidebar.tutorialSidebar.category.upgrade": {
"message": "Upgrade", "message": "Upgrade",
"description": "The label for category upgrade in sidebar tutorialSidebar" "description": "The label for category upgrade in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.openapi": {
"message": "OpenAPI",
"description": "The label for category openapi in sidebar tutorialSidebar"
} }
} }
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
}, },
"link.item.label.doc_home": { "link.item.label.doc_home": {
"message": "Doc Home", "message": "Doc Home",
"description": "The label of footer link with label=doc_home linking to /docs/next/platform_intro/intro" "description": "The label of footer link with label=doc_home linking to /docs/next/platform_intro/overview"
}, },
"link.item.label.openapi": { "link.item.label.openapi": {
"message": "Open Api", "message": "Open Api",
"description": "The label of footer link with label=openapi linking to /docs/next/user_guide/studio/openapi" "description": "The label of footer link with label=openapi linking to /docs/next/openapi"
}, },
"link.item.label.issue": { "link.item.label.issue": {
"message": "Issue", "message": "Issue",
......
...@@ -110,5 +110,9 @@ ...@@ -110,5 +110,9 @@
"sidebar.tutorialSidebar.category.upgrade": { "sidebar.tutorialSidebar.category.upgrade": {
"message": "升级", "message": "升级",
"description": "The label for category upgrade in sidebar tutorialSidebar" "description": "The label for category upgrade in sidebar tutorialSidebar"
},
"sidebar.tutorialSidebar.category.openapi": {
"message": "OpenAPI",
"description": "The label for category openapi in sidebar tutorialSidebar"
} }
} }
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
}, },
"link.item.label.doc_home": { "link.item.label.doc_home": {
"message": "文档首页", "message": "文档首页",
"description": "The label of footer link with label=doc_home linking to /docs/next/platform_intro/intro" "description": "The label of footer link with label=doc_home linking to /docs/next/platform_intro/overview"
}, },
"link.item.label.openapi": { "link.item.label.openapi": {
"message": "Open Api", "message": "Open Api",
"description": "The label of footer link with label=openapi linking to /docs/next/user_guide/studio/openapi" "description": "The label of footer link with label=openapi linking to /docs/next/openapi"
}, },
"link.item.label.issue": { "link.item.label.issue": {
"message": "Issue", "message": "Issue",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment