Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 1 | =============== |
| 2 | CDAP Broker API |
| 3 | =============== |
| 4 | |
| 5 | :Date: 2017-10-09 |
| 6 | |
| 7 | .. contents:: |
| 8 | :depth: 3 |
| 9 | .. |
| 10 | |
| 11 | Overview |
| 12 | ======== |
| 13 | |
| 14 | Version information |
| 15 | ------------------- |
| 16 | |
| 17 | *Version* : 4.0.10 |
| 18 | |
| 19 | Paths |
| 20 | ===== |
| 21 | |
| 22 | GET / |
| 23 | ----- |
| 24 | |
| 25 | Description |
| 26 | ~~~~~~~~~~~ |
| 27 | |
| 28 | shows some information about this service |
| 29 | |
| 30 | Responses |
| 31 | ~~~~~~~~~ |
| 32 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 33 | +---------+--------------------------------------------+-------------------+ |
| 34 | | HTTP | Description | Schema | |
| 35 | | Code | | | |
| 36 | +=========+============================================+===================+ |
| 37 | | **200** | successful response | `info <#_info>`__ | |
| 38 | +---------+--------------------------------------------+-------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 39 | |
| 40 | GET /application |
| 41 | ---------------- |
| 42 | |
| 43 | Description |
| 44 | ~~~~~~~~~~~ |
| 45 | |
| 46 | get all applications registered with this broker |
| 47 | |
| 48 | Responses |
| 49 | ~~~~~~~~~ |
| 50 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 51 | +---------+-------------------------------------------+---------------+ |
| 52 | | HTTP | Description | Schema | |
| 53 | | Code | | | |
| 54 | +=========+===========================================+===============+ |
| 55 | | **200** | successful response | `appname <#_a | |
| 56 | | | | ppname>`__ | |
| 57 | | | | (array) | |
| 58 | +---------+-------------------------------------------+---------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 59 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 60 | PUT /application/{appname} |
| 61 | -------------------------- |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 62 | |
| 63 | Description |
| 64 | ~~~~~~~~~~~ |
| 65 | |
| 66 | (This is a hacky way of supporting "oneOf" because Swagger does not |
| 67 | support oneOf https://github.com/OAI/OpenAPI-Specification/issues/333. |
| 68 | This is the same endpoint as PUT /application/appname, except the PUT |
| 69 | body is different.) |
| 70 | |
| 71 | Register a hydrator app for service and configuration discovery. This |
| 72 | will light up a metrics and health endpoint for this app. ``appname`` is |
| 73 | assumed to also be the key in consul. |
| 74 | |
| 75 | Parameters |
| 76 | ~~~~~~~~~~ |
| 77 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 78 | +----------+---------------+---------------------------------+------------------+ |
| 79 | | Type | Name | Description | Schema | |
| 80 | +==========+===============+=================================+==================+ |
| 81 | | **Path** | | **appname** | Name of the application. | string (text) | |
| 82 | | | | *required* | | | |
| 83 | +----------+---------------+---------------------------------+------------------+ |
| 84 | | **Body** | | **putbody** | required put body | `hydratorappput | |
| 85 | | | | *required* | | <#_hydratorapppu | |
| 86 | | | | | t>`__ | |
| 87 | +----------+---------------+---------------------------------+------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 88 | |
| 89 | Responses |
| 90 | ~~~~~~~~~ |
| 91 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 92 | +---------+----------------------------------------------------+---------------+ |
| 93 | | HTTP | Description | Schema | |
| 94 | | Code | | | |
| 95 | +=========+====================================================+===============+ |
| 96 | | **200** | Successful response | `application | |
| 97 | | | | <#_applicatio | |
| 98 | | | | n>`__ | |
| 99 | +---------+----------------------------------------------------+---------------+ |
| 100 | | **400** | put was performed but the appname was already | No Content | |
| 101 | | | registered with the broker, or Invalid PUT body | | |
| 102 | +---------+----------------------------------------------------+---------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 103 | |
| 104 | Consumes |
| 105 | ~~~~~~~~ |
| 106 | |
| 107 | - ``application/json`` |
| 108 | |
| 109 | Produces |
| 110 | ~~~~~~~~ |
| 111 | |
| 112 | - ``application/json`` |
| 113 | |
| 114 | POST /application/delete |
| 115 | ------------------------ |
| 116 | |
| 117 | Description |
| 118 | ~~~~~~~~~~~ |
| 119 | |
| 120 | endpoint to delete multiple applications at once. Returns an array of |
| 121 | status codes, where statuscode[i] = response returned from |
| 122 | DELETE(application/i) |
| 123 | |
| 124 | Parameters |
| 125 | ~~~~~~~~~~ |
| 126 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 127 | +----------+----------------+------------------------------+------------------+ |
| 128 | | Type | Name | Description | Schema | |
| 129 | +==========+================+==============================+==================+ |
| 130 | | **Body** | | **postbody** | required post body | `multideleteput | |
| 131 | | | | *required* | | <#_multideletepu | |
| 132 | | | | | t>`__ | |
| 133 | +----------+----------------+------------------------------+------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 134 | |
| 135 | Responses |
| 136 | ~~~~~~~~~ |
| 137 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 138 | +---------+----------------------------------------------+-------------------+ |
| 139 | | HTTP | Description | Schema | |
| 140 | | Code | | | |
| 141 | +=========+==============================================+===================+ |
| 142 | | **200** | successful response | `returncode | |
| 143 | | | | <#_returncode>`__ | |
| 144 | | | | (array) | |
| 145 | +---------+----------------------------------------------+-------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 146 | |
| 147 | GET /application/{appname} |
| 148 | -------------------------- |
| 149 | |
| 150 | Description |
| 151 | ~~~~~~~~~~~ |
| 152 | |
| 153 | Returns the representation of the application resource, including the |
| 154 | links for healthcheck and metrics. |
| 155 | |
| 156 | Parameters |
| 157 | ~~~~~~~~~~ |
| 158 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 159 | +----------+---------------+--------------------------------+------------------+ |
| 160 | | Type | Name | Description | Schema | |
| 161 | +==========+===============+================================+==================+ |
| 162 | | **Path** | | **appname** | Name of the application. | string (text) | |
| 163 | | | | *required* | | | |
| 164 | +----------+---------------+--------------------------------+------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 165 | |
| 166 | Responses |
| 167 | ~~~~~~~~~ |
| 168 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 169 | +---------+----------------------------------------------------+---------------+ |
| 170 | | HTTP | Description | Schema | |
| 171 | | Code | | | |
| 172 | +=========+====================================================+===============+ |
| 173 | | **200** | Successful response | `application | |
| 174 | | | | <#_applicatio | |
| 175 | | | | n>`__ | |
| 176 | +---------+----------------------------------------------------+---------------+ |
| 177 | | **404** | no app with name 'appname' registered with this | No Content | |
| 178 | | | broker. | | |
| 179 | +---------+----------------------------------------------------+---------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 180 | |
| 181 | PUT /application/{appname} |
| 182 | -------------------------- |
| 183 | |
| 184 | Description |
| 185 | ~~~~~~~~~~~ |
| 186 | |
| 187 | Register an app for service and configuration discovery. This will light |
| 188 | up a metrics and health endpoint for this app. ``appname`` is assumed to |
| 189 | also be the key in consul. |
| 190 | |
| 191 | Parameters |
| 192 | ~~~~~~~~~~ |
| 193 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 194 | +----------+---------------+--------------------------------+------------------+ |
| 195 | | Type | Name | Description | Schema | |
| 196 | +==========+===============+================================+==================+ |
| 197 | | **Path** | | **appname** | Name of the application. | string (text) | |
| 198 | | | | *required* | | | |
| 199 | +----------+---------------+--------------------------------+------------------+ |
| 200 | | **Body** | | **putbody** | required put body | `appput <#_apppu | |
| 201 | | | | *required* | | t>`__ | |
| 202 | +----------+---------------+--------------------------------+------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 203 | |
| 204 | Responses |
| 205 | ~~~~~~~~~ |
| 206 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 207 | +---------+--------------------------------------------------+---------------+ |
| 208 | | HTTP | Description | Schema | |
| 209 | | Code | | | |
| 210 | +=========+==================================================+===============+ |
| 211 | | **200** | Successful response | `Application | |
| 212 | | | | <#_applicatio | |
| 213 | | | | n>`__ | |
| 214 | +---------+--------------------------------------------------+---------------+ |
| 215 | | **400** | put was performed but the appname was already | No Content | |
| 216 | | | registered with the broker, or Invalid PUT body | | |
| 217 | +---------+--------------------------------------------------+---------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 218 | |
| 219 | Consumes |
| 220 | ~~~~~~~~ |
| 221 | |
| 222 | - ``application/json`` |
| 223 | |
| 224 | Produces |
| 225 | ~~~~~~~~ |
| 226 | |
| 227 | - ``application/json`` |
| 228 | |
| 229 | DELETE /application/{appname} |
| 230 | ----------------------------- |
| 231 | |
| 232 | Description |
| 233 | ~~~~~~~~~~~ |
| 234 | |
| 235 | Remove an app for service and configuration discovery. This will remove |
| 236 | the metrics and health endpoints for this app. |
| 237 | |
| 238 | Parameters |
| 239 | ~~~~~~~~~~ |
| 240 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 241 | +----------+---------------+--------------------------------+------------------+ |
| 242 | | Type | Name | Description | Schema | |
| 243 | +==========+===============+================================+==================+ |
| 244 | | **Path** | | **appname** | Name of the application. | string (text) | |
| 245 | | | | *required* | | | |
| 246 | +----------+---------------+--------------------------------+------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 247 | |
| 248 | Responses |
| 249 | ~~~~~~~~~ |
| 250 | |
| 251 | +---------+----------------------------------------------------+----------------+ |
| 252 | | HTTP | Description | Schema | |
| 253 | | Code | | | |
| 254 | +=========+====================================================+================+ |
| 255 | | **200** | Successful response | No Content | |
| 256 | +---------+----------------------------------------------------+----------------+ |
| 257 | | **404** | no app with name 'appname' registered with this | No Content | |
| 258 | | | broker. | | |
| 259 | +---------+----------------------------------------------------+----------------+ |
| 260 | |
| 261 | GET /application/{appname}/healthcheck |
| 262 | -------------------------------------- |
| 263 | |
| 264 | Description |
| 265 | ~~~~~~~~~~~ |
| 266 | |
| 267 | Perform a healthcheck on the running app appname. |
| 268 | |
| 269 | Parameters |
| 270 | ~~~~~~~~~~ |
| 271 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 272 | +----------+---------------+--------------------------------+------------------+ |
| 273 | | Type | Name | Description | Schema | |
| 274 | +==========+===============+================================+==================+ |
| 275 | | **Path** | | **appname** | Name of the application to get | string (text) | |
| 276 | | | | *required* | the healthcheck for. | | |
| 277 | +----------+---------------+--------------------------------+------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 278 | |
| 279 | Responses |
| 280 | ~~~~~~~~~ |
| 281 | |
| 282 | +---------+----------------------------------------------------+----------------+ |
| 283 | | HTTP | Description | Schema | |
| 284 | | Code | | | |
| 285 | +=========+====================================================+================+ |
| 286 | | **200** | Successful response, healthcheck pass | No Content | |
| 287 | +---------+----------------------------------------------------+----------------+ |
| 288 | | **404** | no app with name 'appname' registered with this | No Content | |
| 289 | | | broker, or the healthcheck has failed (though I | | |
| 290 | | | would like to disambiguiate from the first case, | | |
| 291 | | | CDAP returns a 404 for this). | | |
| 292 | +---------+----------------------------------------------------+----------------+ |
| 293 | |
| 294 | GET /application/{appname}/metrics |
| 295 | ---------------------------------- |
| 296 | |
| 297 | Description |
| 298 | ~~~~~~~~~~~ |
| 299 | |
| 300 | Get live (real-time) app specific metrics for the running app appname. |
| 301 | Metrics are customized per each app by the component developer |
| 302 | |
| 303 | Parameters |
| 304 | ~~~~~~~~~~ |
| 305 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 306 | +----------+---------------+--------------------------------+------------------+ |
| 307 | | Type | Name | Description | Schema | |
| 308 | +==========+===============+================================+==================+ |
| 309 | | **Path** | | **appname** | Name of the application to get | string (text) | |
| 310 | | | | *required* | metrics for. | | |
| 311 | +----------+---------------+--------------------------------+------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 312 | |
| 313 | Responses |
| 314 | ~~~~~~~~~ |
| 315 | |
| 316 | +---------+----------------------------------------------------+----------------+ |
| 317 | | HTTP | Description | Schema | |
| 318 | | Code | | | |
| 319 | +=========+====================================================+================+ |
| 320 | | **200** | Successful response | `MetricsObject | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 321 | | | | <#_metricsobje | |
| 322 | | | | ct>`__ | |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 323 | +---------+----------------------------------------------------+----------------+ |
| 324 | | **404** | no app with name 'appname' registered with this | No Content | |
| 325 | | | broker. | | |
| 326 | +---------+----------------------------------------------------+----------------+ |
| 327 | |
| 328 | PUT /application/{appname}/reconfigure |
| 329 | -------------------------------------- |
| 330 | |
| 331 | Description |
| 332 | ~~~~~~~~~~~ |
| 333 | |
| 334 | Reconfigures the application. |
| 335 | |
| 336 | Parameters |
| 337 | ~~~~~~~~~~ |
| 338 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 339 | +----------+---------------+----------------------------+--------------------+ |
| 340 | | Type | Name | Description | Schema | |
| 341 | +==========+===============+============================+====================+ |
| 342 | | **Path** | | **appname** | Name of the application. | string (text) | |
| 343 | | | | *required* | | | |
| 344 | +----------+---------------+----------------------------+--------------------+ |
| 345 | | **Body** | | **putbody** | required put body | `reconfigput | |
| 346 | | | | *required* | | <#_reconfigput>`__ | |
| 347 | +----------+---------------+----------------------------+--------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 348 | |
| 349 | Responses |
| 350 | ~~~~~~~~~ |
| 351 | |
| 352 | +---------+----------------------------------------------------+----------------+ |
| 353 | | HTTP | Description | Schema | |
| 354 | | Code | | | |
| 355 | +=========+====================================================+================+ |
| 356 | | **200** | Successful response | No Content | |
| 357 | +---------+----------------------------------------------------+----------------+ |
| 358 | | **400** | Bad request. Can happen with 1) {appname} is not | No Content | |
| 359 | | | registered with the broker, 2) the required PUT | | |
| 360 | | | body is wrong, or 3) the smart interface was | | |
| 361 | | | chosen and none of the config keys match anything | | |
| 362 | | | in app\_config or app\_preferences | | |
| 363 | +---------+----------------------------------------------------+----------------+ |
| 364 | |
| 365 | Definitions |
| 366 | =========== |
| 367 | |
| 368 | Application |
| 369 | ----------- |
| 370 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 371 | +---------------------+---------------------------------------------+------------------+ |
| 372 | | Name | Description | Schema | |
| 373 | +=====================+=============================================+==================+ |
| 374 | | | **appname** | application name | string | |
| 375 | | | *optional* | | | |
| 376 | +---------------------+---------------------------------------------+------------------+ |
| 377 | | | **connectionurl** | input URL that you can POST data into (URL | string | |
| 378 | | | *optional* | of the CDAP stream) | | |
| 379 | +---------------------+---------------------------------------------+------------------+ |
| 380 | | | **healthcheckurl**| fully qualified url to perform healthcheck | string | |
| 381 | | | *optional* | | | |
| 382 | +---------------------+---------------------------------------------+------------------+ |
| 383 | | | **metricsurl** | fully qualified url to get metrics from | string | |
| 384 | | | *optional* | | | |
| 385 | +---------------------+---------------------------------------------+------------------+ |
| 386 | | | **service | a list of HTTP services exposed by this | `service\_method | |
| 387 | | endpoints** | CDAP application | <#_service_metho | |
| 388 | | | *optional* | | d>`__ | |
| 389 | | | | (array) | |
| 390 | +---------------------+---------------------------------------------+------------------+ |
| 391 | | | **url** | fully qualified url of the resource | string | |
| 392 | | | *optional* | | | |
| 393 | +---------------------+---------------------------------------------+------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 394 | |
| 395 | MetricsObject |
| 396 | ------------- |
| 397 | |
| 398 | key,value object where the key is 'appmetrics' and the value is an app |
| 399 | dependent json and specified by the component developer |
| 400 | |
| 401 | +--------------------------------+-------------------------------------------+ |
| 402 | | Name | Schema | |
| 403 | +================================+===========================================+ |
| 404 | | | **appmetrics** | object | |
| 405 | | | *optional* | | |
| 406 | +--------------------------------+-------------------------------------------+ |
| 407 | |
| 408 | appname |
| 409 | ------- |
| 410 | |
| 411 | an application name |
| 412 | |
| 413 | *Type* : string |
| 414 | |
| 415 | appput |
| 416 | ------ |
| 417 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 418 | +-------------------------------+---------------------------------------------+--------------------+ |
| 419 | | Name | Description | Schema | |
| 420 | +===============================+=============================================+====================+ |
| 421 | | | **app\_config** | the application config JSON | object | |
| 422 | | | *optional* | | | |
| 423 | +-------------------------------+---------------------------------------------+--------------------+ |
| 424 | | | **app\_preferences** | the application preferences JSON | object | |
| 425 | | | *optional* | | | |
| 426 | +-------------------------------+---------------------------------------------+--------------------+ |
| 427 | | | **artifact\_name** | the name of the CDAP artifact to be added | string | |
| 428 | | | *optional* | | | |
| 429 | +-------------------------------+---------------------------------------------+--------------------+ |
| 430 | | | **cdap\_application\_type** | denotes whether this is a program-flowlet | enum | |
| 431 | | | *optional* | style application or a hydrator pipeline. | (program-flowlet | |
| 432 | | | For program-flowlet style apps, this value | ) | |
| 433 | | | must be "program-flowlet" | | |
| 434 | +-------------------------------+---------------------------------------------+--------------------+ |
| 435 | | | **jar\_url** | the URL that the JAR you’re deploying | string | |
| 436 | | | *optional* | resides | | |
| 437 | +-------------------------------+---------------------------------------------+--------------------+ |
| 438 | | | **namespace** | the cdap namespace this is deployed into | string | |
| 439 | | | *optional* | | | |
| 440 | +-------------------------------+---------------------------------------------+--------------------+ |
| 441 | | | **program\_preferences** | | `programpref | |
| 442 | | | *optional* | | <#_programpref>`__ | |
| 443 | | | | (array) | |
| 444 | +-------------------------------+---------------------------------------------+--------------------+ |
| 445 | | | **programs** | | `programs | |
| 446 | | | *optional* | | <#_programs>`__ | |
| 447 | | | | (array) | |
| 448 | +-------------------------------+---------------------------------------------+--------------------+ |
| 449 | | | **services** | | `service\_endpoint | |
| 450 | | | *optional* | | <#_service_endpoin | |
| 451 | | | | t>`__ (array) | |
| 452 | +-------------------------------+---------------------------------------------+--------------------+ |
| 453 | | | **streamname** | name of the CDAP stream to ingest data into | string | |
| 454 | | | *optional* | this app. Should come from the developer | | |
| 455 | | | and Tosca model. | | |
| 456 | +-------------------------------+---------------------------------------------+--------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 457 | |
| 458 | hydratorappput |
| 459 | -------------- |
| 460 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 461 | +-----------------------------------+---------------------------------------------+---------------+ |
| 462 | | Name | Description | Schema | |
| 463 | +===================================+=============================================+===============+ |
| 464 | | | **cdap\_application\_TYPE** | denotes whether this is a program-flowlet | enum | |
| 465 | | | style application or a hydrator pipeline. | (hydrator-pip | |
| 466 | | | *required* | For hydrator, this value must be | eline) | |
| 467 | | | "hydrator-pipeline" | | |
| 468 | +-----------------------------------+---------------------------------------------+---------------+ |
| 469 | | | **dependencies** | represents a list of dependencies to be | `hydratordep | |
| 470 | | | *optional* | loaded for this pipeline. Not required. | <#_hydratorde | |
| 471 | | | | p>`__ (array) | |
| 472 | +-----------------------------------+---------------------------------------------+---------------+ |
| 473 | | | **namespace** | the cdap namespace this is deployed into | string | |
| 474 | | | *required* | | | |
| 475 | +-----------------------------------+---------------------------------------------+---------------+ |
| 476 | | | **pipeline\_config\_json\_url** | the URL of the config.json for this | string | |
| 477 | | | *required* | pipeline | | |
| 478 | +-----------------------------------+---------------------------------------------+---------------+ |
| 479 | | | **streamname** | name of the CDAP stream to ingest data into | string | |
| 480 | | | *required* | this app. Should come from the developer | | |
| 481 | | | and Tosca model. | | |
| 482 | +-----------------------------------+---------------------------------------------+---------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 483 | |
| 484 | hydratordep |
| 485 | ----------- |
| 486 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 487 | represents a hydrator pipeline dependency. An equivalent to the |
| 488 | following CURLs are formed with the below four params shown in CAPS:: |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 489 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 490 | curl -v -w"\\n" -X POST |
| 491 | http://cdapurl:11015/v3/namespaces/setelsewhere/artifacts/ARTIFACT_NAME |
| 492 | -H "Artifact-Extends:ARTIFACT\_EXTENDS\_HEADER" -H |
| 493 | “Artifact-Version:ARTIFACT\_VERSION\_HEADER” –data-binary @(DOWNLOADED |
| 494 | FROM ARTIFACT\_URL)","curl -v -w"\\n" -X PUT |
| 495 | http://cdapurl:11015/v3/namespaces/setelsewhere/artifacts/ARTIFACT_NAME/versions/ARTIFACT_VERSION_HEADER/properties |
| 496 | -d (DOWNLOADED FROM UI\_PROPERTIES\_URL)" |
| 497 | |
| 498 | +---------------------------------+---------------------------------------------+----------+ |
| 499 | | Name | Description | Schema | |
| 500 | +=================================+=============================================+==========+ |
| 501 | | | **artifact\_extends\_header** | the value of the header that gets passed in | string | |
| 502 | | | *required* | for artifact-extends, e.g., | | |
| 503 | | | "Artifact-Extends:system:cdap-data-pipeline | | |
| 504 | | | [4.0.1,5.0.0)" | | |
| 505 | +---------------------------------+---------------------------------------------+----------+ |
| 506 | | | **artifact\_name** | the name of the artifact | string | |
| 507 | | | *required* | | | |
| 508 | +---------------------------------+---------------------------------------------+----------+ |
| 509 | | | **artifact\_url** | the URL of the artifact JAR | string | |
| 510 | | | *required* | | | |
| 511 | +---------------------------------+---------------------------------------------+----------+ |
| 512 | | | **artifact\_version\_header** | the value of the header that gets passed in | string | |
| 513 | | | *required* | for artifact-version, e.g., | | |
| 514 | | | "Artifact-Version:1.0.0-SNAPSHOT" | | |
| 515 | +---------------------------------+---------------------------------------------+----------+ |
| 516 | | | **ui\_properties\_url** | the URL of the properties.json if the | string | |
| 517 | | | *optional* | custom artifact has UI properties. This is | | |
| 518 | | | optional. | | |
| 519 | +---------------------------------+---------------------------------------------+----------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 520 | |
| 521 | info |
| 522 | ---- |
| 523 | |
| 524 | some broker information |
| 525 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 526 | +------------------+---------------------------------------------+-----------+ |
| 527 | | Name | Description | Schema | |
| 528 | +==================+=============================================+===========+ |
| 529 | | | **broker API | the API version of this running broker | string | |
| 530 | | version** | | | |
| 531 | | | *optional* | | | |
| 532 | +------------------+---------------------------------------------+-----------+ |
| 533 | | | **cdap GUI | The GUI port of the CDAP cluster this | integer | |
| 534 | | port** | broker is managing. Mostly to help users of | | |
| 535 | | | *optional* | this API check their application in cdap. | | |
| 536 | | | Note, will return UNKNOWN\_CDAP\_VERSION if | | |
| 537 | | | it cannot be determined. | | |
| 538 | +------------------+---------------------------------------------+-----------+ |
| 539 | | | **cdap | the version of the CDAP cluster this broker | string | |
| 540 | | cluster | is managing. Note, will return | | |
| 541 | | version** | UKNOWN\_CDAP\_VERSION if it cannot be | | |
| 542 | | | *optional* | determined. | | |
| 543 | +------------------+---------------------------------------------+-----------+ |
| 544 | | | **managed cdap | the url of the CDAP cluster API this broker | string | |
| 545 | | url** | is managing | | |
| 546 | | | *optional* | | | |
| 547 | +------------------+---------------------------------------------+-----------+ |
| 548 | | | **number | | integer | |
| 549 | | of applications | | | |
| 550 | | registered** | | | |
| 551 | | | *optional* | | | |
| 552 | +------------------+---------------------------------------------+-----------+ |
| 553 | | | **uptime (s)** | | integer | |
| 554 | | | *optional* | | | |
| 555 | +------------------+---------------------------------------------+-----------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 556 | |
| 557 | multideleteput |
| 558 | -------------- |
| 559 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 560 | +--------------------------------+----------------------------------+ |
| 561 | | Name | Schema | |
| 562 | +================================+==================================+ |
| 563 | | | **appnames** | `appname <#_appname>`__ (array) | |
| 564 | | | *optional* | | |
| 565 | +--------------------------------+----------------------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 566 | |
| 567 | programpref |
| 568 | ----------- |
| 569 | |
| 570 | the list of programs in this CDAP app |
| 571 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 572 | +--------------+---------------------------------------------+----------+ |
| 573 | | Name | Description | Schema | |
| 574 | +==============+=============================================+==========+ |
| 575 | | | **program\ | the name of the program | string | |
| 576 | | _id** | | | |
| 577 | | | *optional* | | | |
| 578 | +--------------+---------------------------------------------+----------+ |
| 579 | | | **program_ | the preference JSON to set for this program | object | |
| 580 | | \pref** | | | |
| 581 | | | *optional* | | | |
| 582 | +--------------+---------------------------------------------+----------+ |
| 583 | | | **program\ | must be one of flows, mapreduce, schedules, | string | |
| 584 | | _type** | spark, workflows, workers, or services | | |
| 585 | | | *optional* | | | |
| 586 | +--------------+---------------------------------------------+----------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 587 | |
| 588 | programs |
| 589 | -------- |
| 590 | |
| 591 | the list of programs in this CDAP app |
| 592 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 593 | +--------------+---------------------------------------------+-----------+ |
| 594 | | Name | Description | Schema | |
| 595 | +==============+=============================================+===========+ |
| 596 | | | **program\ | the name of the program | string | |
| 597 | | _id** | | | |
| 598 | | | *optional* | | | |
| 599 | +--------------+---------------------------------------------+-----------+ |
| 600 | | | **program\ | must be one of flows, mapreduce, schedules, | string | |
| 601 | | _type** | spark, workflows, workers, or services | | |
| 602 | | | *optional* | | | |
| 603 | +--------------+---------------------------------------------+-----------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 604 | |
| 605 | reconfigput |
| 606 | ----------- |
| 607 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 608 | +-----------------------------+-----------------------------+------------------+ |
| 609 | | Name | Description | Schema | |
| 610 | +=============================+=============================+==================+ |
| 611 | | | **config** | the config JSON | object | |
| 612 | | | *required* | | | |
| 613 | +-----------------------------+-----------------------------+------------------+ |
| 614 | | | **reconfiguration\_type** | the type of reconfiguration | enum | |
| 615 | | | *required* | | (program-flowlet | |
| 616 | | | | -app-config, | |
| 617 | | | | program-flowlet- | |
| 618 | | | | app-preferences, | |
| 619 | | | | program-flowlet- | |
| 620 | | | | smart) | |
| 621 | +-----------------------------+-----------------------------+------------------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 622 | |
| 623 | returncode |
| 624 | ---------- |
| 625 | |
| 626 | an httpreturncode |
| 627 | |
| 628 | *Type* : integer |
| 629 | |
| 630 | service\_endpoint |
| 631 | ----------------- |
| 632 | |
Stanislav Chlebec | e7933a0 | 2018-11-15 10:08:31 +0100 | [diff] [blame] | 633 | describes a service endpoint, including the service name, the method |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 634 | name, and the method type (GET, PUT, etc, most of the time will be GET) |
| 635 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 636 | +--------------------------+-----------------------------------------+---------+ |
| 637 | | Name | Description | Schema | |
| 638 | +==========================+=========================================+=========+ |
| 639 | | | **endpoint\_method** | GET, POST, PUT, etc | string | |
| 640 | | | *optional* | | | |
| 641 | +--------------------------+-----------------------------------------+---------+ |
| 642 | | | **service\ _endpoint** | the name of the endpoint on the service | string | |
| 643 | | | *optional* | | | |
| 644 | +--------------------------+-----------------------------------------+---------+ |
| 645 | | | **service\_name** | the name of the service | string | |
| 646 | | | *optional* | | | |
| 647 | +--------------------------+-----------------------------------------+---------+ |
Lusheng Ji | 72c4fba | 2017-10-10 18:12:22 +0000 | [diff] [blame] | 648 | |
| 649 | service\_method |
| 650 | --------------- |
| 651 | |
| 652 | a URL and HTTP method exposed via a CDAP service |
| 653 | |
Morgan Richomme | c1dd723 | 2017-10-18 16:30:40 +0200 | [diff] [blame] | 654 | +--------------+---------------------------------------------+----------+ |
| 655 | | Name | Description | Schema | |
| 656 | +==============+=============================================+==========+ |
| 657 | | | **method** | HTTP method you can perform on the URL, | string | |
| 658 | | | *optional* | e.g., GET, PUT, etc | | |
| 659 | +--------------+---------------------------------------------+----------+ |
| 660 | | | **url** | the fully qualified URL in CDAP for this | string | |
| 661 | | | *optional* | | | |
| 662 | +--------------+---------------------------------------------+----------+ |