github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/jobmaster/dm/openapi/spec/dm.yaml (about) 1 openapi: "3.0.0" 2 tags: 3 - name: job 4 description: job 5 - name: task 6 description: task 7 8 paths: 9 /config: 10 get: 11 tags: 12 - job 13 summary: "get job config" 14 operationId: "DMAPIGetJobConfig" 15 responses: 16 "200": 17 description: "job" 18 content: 19 "application/json": 20 schema: 21 type: json 22 "404": 23 description: "config not found" 24 put: 25 tags: 26 - job 27 summary: "update job config" 28 operationId: "DMAPIUpdateJobConfig" 29 requestBody: 30 required: true 31 content: 32 "application/json": 33 schema: 34 $ref: "#/components/schemas/UpdateJobConfigRequest" 35 responses: 36 "200": 37 description: "success" 38 "500": 39 description: "failed" 40 content: 41 "application/json": 42 schema: 43 $ref: "#/components/schemas/ErrorWithMessage" 44 /status: 45 get: 46 tags: 47 - job 48 summary: "get the current status of the job" 49 operationId: "DMAPIGetJobStatus" 50 parameters: 51 - name: "tasks" 52 in: query 53 description: "globally unique data source name" 54 required: false 55 schema: 56 type: array 57 items: 58 type: string 59 responses: 60 "200": 61 description: "success" 62 content: 63 "application/json": 64 schema: 65 type: json 66 "500": 67 description: "failed" 68 content: 69 "application/json": 70 schema: 71 $ref: "#/components/schemas/ErrorWithMessage" 72 put: 73 tags: 74 - job 75 summary: "operate the stage of the job" 76 operationId: "DMAPIOperateJob" 77 requestBody: 78 required: true 79 content: 80 "application/json": 81 schema: 82 $ref: "#/components/schemas/OperateJobRequest" 83 responses: 84 "200": 85 description: "success" 86 "500": 87 description: "failed" 88 content: 89 "application/json": 90 schema: 91 $ref: "#/components/schemas/ErrorWithMessage" 92 /schema/tasks/{task-name}: 93 get: 94 tags: 95 - task 96 summary: "get schema" 97 operationId: "DMAPIGetSchema" 98 parameters: 99 - name: "task-name" 100 in: path 101 description: "task name" 102 required: true 103 schema: 104 type: string 105 - name: "database" 106 in: query 107 description: "database name" 108 required: false 109 schema: 110 type: string 111 - name: "table" 112 in: query 113 description: "table name" 114 required: false 115 schema: 116 type: string 117 - name: "target" 118 in: query 119 description: "target table" 120 required: false 121 schema: 122 type: boolean 123 responses: 124 "200": 125 description: "success" 126 content: 127 "application/json": 128 schema: 129 type: json 130 "500": 131 description: "failed" 132 content: 133 "application/json": 134 schema: 135 $ref: "#/components/schemas/ErrorWithMessage" 136 put: 137 tags: 138 - tasks 139 summary: "set schema" 140 operationId: "DMAPISetSchema" 141 parameters: 142 - name: "task-name" 143 in: path 144 description: "task name" 145 required: true 146 schema: 147 type: string 148 requestBody: 149 required: true 150 content: 151 "application/json": 152 schema: 153 $ref: "#/components/schemas/SetBinlogSchemaRequest" 154 responses: 155 "200": 156 description: "success" 157 content: 158 "application/json": 159 schema: 160 type: json 161 "500": 162 description: "failed" 163 content: 164 "application/json": 165 schema: 166 $ref: "#/components/schemas/ErrorWithMessage" 167 /binlog/tasks/{task-name}: 168 get: 169 tags: 170 - task 171 summary: "get binlog operator" 172 operationId: "DMAPIGetBinlogOperator" 173 parameters: 174 - name: "task-name" 175 in: path 176 required: true 177 schema: 178 type: string 179 - name: "binlog_pos" 180 in: query 181 required: false 182 schema: 183 type: string 184 responses: 185 "200": 186 description: "success" 187 content: 188 "application/json": 189 schema: 190 type: json 191 "500": 192 description: "failed" 193 content: 194 "application/json": 195 schema: 196 $ref: "#/components/schemas/ErrorWithMessage" 197 post: 198 tags: 199 - task 200 summary: "set binlog operator" 201 operationId: "DMAPISetBinlogOperator" 202 parameters: 203 - name: "task-name" 204 in: path 205 description: "task name" 206 required: true 207 schema: 208 type: string 209 requestBody: 210 description: "request body" 211 content: 212 "application/json": 213 schema: 214 $ref: "#/components/schemas/SetBinlogOperatorRequest" 215 responses: 216 "201": 217 description: "success" 218 content: 219 "application/json": 220 schema: 221 type: json 222 "500": 223 description: "failed" 224 content: 225 "application/json": 226 schema: 227 $ref: "#/components/schemas/ErrorWithMessage" 228 delete: 229 tags: 230 - task 231 summary: "delete binlog operator" 232 operationId: "DMAPIDeleteBinlogOperator" 233 parameters: 234 - name: "task-name" 235 in: path 236 description: "task name" 237 required: true 238 schema: 239 type: string 240 - name: "binlog_pos" 241 in: query 242 required: false 243 schema: 244 type: string 245 responses: 246 "204": 247 description: "success" 248 "500": 249 description: "failed" 250 content: 251 "application/json": 252 schema: 253 $ref: "#/components/schemas/ErrorWithMessage" 254 255 components: 256 schemas: 257 ErrorWithMessage: 258 description: "operation error" 259 type: object 260 properties: 261 code: 262 type: integer 263 description: "error code" 264 message: 265 type: string 266 description: "error message" 267 details: 268 type: array 269 items: 270 type: string 271 required: 272 - "code" 273 - "message" 274 UpdateJobConfigRequest: 275 type: object 276 properties: 277 config: 278 type: string 279 required: 280 - "config" 281 OperateJobRequest: 282 type: object 283 properties: 284 tasks: 285 type: array 286 items: 287 type: string 288 op: 289 type: string 290 enum: 291 - "resume" 292 - "pause" 293 required: 294 - "op" 295 SetBinlogOperatorRequest: 296 type: object 297 properties: 298 op: 299 type: string 300 enum: 301 - "skip" 302 - "replace" 303 - "inject" 304 binlog_pos: 305 type: string 306 sqls: 307 type: array 308 items: 309 type: string 310 required: 311 - "op" 312 SetBinlogSchemaRequest: 313 type: object 314 properties: 315 sql: 316 type: string 317 database: 318 type: string 319 table: 320 type: string 321 from_source: 322 type: boolean 323 default: false 324 from_target: 325 type: boolean 326 default: false 327 required: 328 - "database" 329 - "table" 330 - "sql"