Lusheng Ji | 6553a13 | 2017-10-12 02:47:00 +0000 | [diff] [blame] | 1 | CDAP Broker API 4.0.10 |
| 2 | ====================== |
| 3 | |
| 4 | .. toctree:: |
| 5 | :maxdepth: 3 |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | DEFAULT |
| 12 | ~~~~~~~ |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | DELETE ``/application/{appname}`` |
| 18 | --------------------------------- |
| 19 | |
| 20 | |
| 21 | |
| 22 | Description |
| 23 | +++++++++++ |
| 24 | |
| 25 | .. raw:: html |
| 26 | |
| 27 | Remove an app for service and configuration discovery. This will remove the metrics and health endpoints for this app. |
| 28 | |
| 29 | Parameters |
| 30 | ++++++++++ |
| 31 | |
| 32 | .. csv-table:: |
| 33 | :delim: | |
| 34 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 35 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 36 | |
| 37 | appname | path | Yes | string | text | | Name of the application. |
| 38 | |
| 39 | |
| 40 | Request |
| 41 | +++++++ |
| 42 | |
| 43 | |
| 44 | Responses |
| 45 | +++++++++ |
| 46 | |
| 47 | **200** |
| 48 | ^^^^^^^ |
| 49 | |
| 50 | Successful response |
| 51 | |
| 52 | |
| 53 | **404** |
| 54 | ^^^^^^^ |
| 55 | |
| 56 | no app with name 'appname' registered with this broker. |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | GET ``/`` |
| 64 | --------- |
| 65 | |
| 66 | |
| 67 | |
| 68 | Description |
| 69 | +++++++++++ |
| 70 | |
| 71 | .. raw:: html |
| 72 | |
| 73 | shows some information about this service |
| 74 | |
| 75 | |
| 76 | Request |
| 77 | +++++++ |
| 78 | |
| 79 | |
| 80 | Responses |
| 81 | +++++++++ |
| 82 | |
| 83 | **200** |
| 84 | ^^^^^^^ |
| 85 | |
| 86 | successful response |
| 87 | |
| 88 | |
| 89 | Type: :ref:`info <d_060ca512d6d771a97a7d0f50886f6b14>` |
| 90 | |
| 91 | **Example:** |
| 92 | |
| 93 | .. code-block:: javascript |
| 94 | |
| 95 | { |
| 96 | "broker API version": "somestring", |
| 97 | "cdap GUI port": 1, |
| 98 | "cdap cluster version": "somestring", |
| 99 | "managed cdap url": "somestring", |
| 100 | "number of applications registered": 1, |
| 101 | "uptime (s)": 1 |
| 102 | } |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | GET ``/application`` |
| 109 | -------------------- |
| 110 | |
| 111 | |
| 112 | |
| 113 | Description |
| 114 | +++++++++++ |
| 115 | |
| 116 | .. raw:: html |
| 117 | |
| 118 | get all applications registered with this broker |
| 119 | |
| 120 | |
| 121 | Request |
| 122 | +++++++ |
| 123 | |
| 124 | |
| 125 | Responses |
| 126 | +++++++++ |
| 127 | |
| 128 | **200** |
| 129 | ^^^^^^^ |
| 130 | |
| 131 | successful response |
| 132 | |
| 133 | |
| 134 | Type: array of :ref:`appname <d_2f6991f1775468c3ce48a2778455be93>` |
| 135 | |
| 136 | |
| 137 | **Example:** |
| 138 | |
| 139 | .. code-block:: javascript |
| 140 | |
| 141 | [ |
| 142 | "somestring", |
| 143 | "somestring" |
| 144 | ] |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | GET ``/application/{appname}`` |
| 151 | ------------------------------ |
| 152 | |
| 153 | |
| 154 | |
| 155 | Description |
| 156 | +++++++++++ |
| 157 | |
| 158 | .. raw:: html |
| 159 | |
| 160 | Returns the representation of the application resource, including the links for healthcheck and metrics. |
| 161 | |
| 162 | Parameters |
| 163 | ++++++++++ |
| 164 | |
| 165 | .. csv-table:: |
| 166 | :delim: | |
| 167 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 168 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 169 | |
| 170 | appname | path | Yes | string | text | | Name of the application. |
| 171 | |
| 172 | |
| 173 | Request |
| 174 | +++++++ |
| 175 | |
| 176 | |
| 177 | Responses |
| 178 | +++++++++ |
| 179 | |
| 180 | **200** |
| 181 | ^^^^^^^ |
| 182 | |
| 183 | Successful response |
| 184 | |
| 185 | |
| 186 | Type: :ref:`Application <d_2b315c86978b3cd8c6edfbe745f1afa2>` |
| 187 | |
| 188 | **Example:** |
| 189 | |
| 190 | .. code-block:: javascript |
| 191 | |
| 192 | { |
| 193 | "appname": "somestring", |
| 194 | "connectionurl": "somestring", |
| 195 | "healthcheckurl": "somestring", |
| 196 | "metricsurl": "somestring", |
| 197 | "serviceendpoints": [ |
| 198 | { |
| 199 | "method": "somestring", |
| 200 | "url": "somestring" |
| 201 | }, |
| 202 | { |
| 203 | "method": "somestring", |
| 204 | "url": "somestring" |
| 205 | } |
| 206 | ], |
| 207 | "url": "somestring" |
| 208 | } |
| 209 | |
| 210 | **404** |
| 211 | ^^^^^^^ |
| 212 | |
| 213 | no app with name 'appname' registered with this broker. |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | GET ``/application/{appname}/healthcheck`` |
| 221 | ------------------------------------------ |
| 222 | |
| 223 | |
| 224 | |
| 225 | Description |
| 226 | +++++++++++ |
| 227 | |
| 228 | .. raw:: html |
| 229 | |
| 230 | Perform a healthcheck on the running app appname. |
| 231 | |
| 232 | Parameters |
| 233 | ++++++++++ |
| 234 | |
| 235 | .. csv-table:: |
| 236 | :delim: | |
| 237 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 238 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 239 | |
| 240 | appname | path | Yes | string | test | | Name of the application to get the healthcheck for. |
| 241 | |
| 242 | |
| 243 | Request |
| 244 | +++++++ |
| 245 | |
| 246 | |
| 247 | Responses |
| 248 | +++++++++ |
| 249 | |
| 250 | **200** |
| 251 | ^^^^^^^ |
| 252 | |
| 253 | Successful response, healthcheck pass |
| 254 | |
| 255 | |
| 256 | **404** |
| 257 | ^^^^^^^ |
| 258 | |
| 259 | no app with name 'appname' registered with this broker, or the healthcheck has failed (though I would like to disambiguiate from the first case, CDAP returns a 404 for this). |
| 260 | |
| 261 | |
| 262 | |
| 263 | |
| 264 | |
| 265 | |
| 266 | GET ``/application/{appname}/metrics`` |
| 267 | -------------------------------------- |
| 268 | |
| 269 | |
| 270 | |
| 271 | Description |
| 272 | +++++++++++ |
| 273 | |
| 274 | .. raw:: html |
| 275 | |
| 276 | Get live (real-time) app specific metrics for the running app appname. Metrics are customized per each app by the component developer |
| 277 | |
| 278 | Parameters |
| 279 | ++++++++++ |
| 280 | |
| 281 | .. csv-table:: |
| 282 | :delim: | |
| 283 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 284 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 285 | |
| 286 | appname | path | Yes | string | test | | Name of the application to get metrics for. |
| 287 | |
| 288 | |
| 289 | Request |
| 290 | +++++++ |
| 291 | |
| 292 | |
| 293 | Responses |
| 294 | +++++++++ |
| 295 | |
| 296 | **200** |
| 297 | ^^^^^^^ |
| 298 | |
| 299 | Successful response |
| 300 | |
| 301 | |
| 302 | Type: :ref:`MetricsObject <d_5d4c5a47c1043833affa67eb27bf3d9d>` |
| 303 | |
| 304 | **Example:** |
| 305 | |
| 306 | .. code-block:: javascript |
| 307 | |
| 308 | { |
| 309 | "appmetrics": {} |
| 310 | } |
| 311 | |
| 312 | **404** |
| 313 | ^^^^^^^ |
| 314 | |
| 315 | no app with name 'appname' registered with this broker. |
| 316 | |
| 317 | |
| 318 | |
| 319 | |
| 320 | |
| 321 | |
| 322 | POST ``/application/delete`` |
| 323 | ---------------------------- |
| 324 | |
| 325 | |
| 326 | |
| 327 | Description |
| 328 | +++++++++++ |
| 329 | |
| 330 | .. raw:: html |
| 331 | |
| 332 | endpoint to delete multiple applications at once. Returns an array of status codes, where statuscode[i] = response returned from DELETE(application/i) |
| 333 | |
| 334 | |
| 335 | Request |
| 336 | +++++++ |
| 337 | |
| 338 | |
| 339 | |
| 340 | .. _d_c0830b0f8b495da06c2fef152ce05dba: |
| 341 | |
| 342 | Body |
| 343 | ^^^^ |
| 344 | |
| 345 | .. csv-table:: |
| 346 | :delim: | |
| 347 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 348 | :widths: 20, 10, 15, 15, 30, 25 |
| 349 | |
| 350 | appnames | No | array of :ref:`appname <d_2f6991f1775468c3ce48a2778455be93>` | | | |
| 351 | |
| 352 | .. code-block:: javascript |
| 353 | |
| 354 | { |
| 355 | "appnames": [ |
| 356 | "somestring", |
| 357 | "somestring" |
| 358 | ] |
| 359 | } |
| 360 | |
| 361 | Responses |
| 362 | +++++++++ |
| 363 | |
| 364 | **200** |
| 365 | ^^^^^^^ |
| 366 | |
| 367 | successful response |
| 368 | |
| 369 | |
| 370 | Type: array of :ref:`returncode <d_5a28f16eed72be7d9a8279c0e1f05386>` |
| 371 | |
| 372 | |
| 373 | **Example:** |
| 374 | |
| 375 | .. code-block:: javascript |
| 376 | |
| 377 | [ |
| 378 | 1, |
| 379 | 1 |
| 380 | ] |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | PUT ``/application/{appname}`` |
| 387 | ------------------------------ |
| 388 | |
| 389 | |
| 390 | |
| 391 | Description |
| 392 | +++++++++++ |
| 393 | |
| 394 | .. raw:: html |
| 395 | |
| 396 | Register an app for service and configuration discovery. This will light up a metrics and health endpoint for this app. `appname` is assumed to also be the key in consul. |
| 397 | |
| 398 | Parameters |
| 399 | ++++++++++ |
| 400 | |
| 401 | .. csv-table:: |
| 402 | :delim: | |
| 403 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 404 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 405 | |
| 406 | appname | path | Yes | string | text | | Name of the application. |
| 407 | |
| 408 | |
| 409 | Request |
| 410 | +++++++ |
| 411 | |
| 412 | |
| 413 | |
| 414 | .. _d_a151b00939024528c17a91cf47a4eae3: |
| 415 | |
| 416 | Body |
| 417 | ^^^^ |
| 418 | |
| 419 | .. csv-table:: |
| 420 | :delim: | |
| 421 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 422 | :widths: 20, 10, 15, 15, 30, 25 |
| 423 | |
| 424 | app_config | No | :ref:`app_config <i_13b2658afc25a955a6b4b48b9898c1a3>` | | | the application config JSON |
| 425 | app_preferences | No | :ref:`app_preferences <i_57297f6d8a6251aeb045f0872bf38d81>` | | | the application preferences JSON |
| 426 | artifact_name | No | string | | | the name of the CDAP artifact to be added |
| 427 | cdap_application_type | No | string | | {'enum': ['program-flowlet']} | denotes whether this is a program-flowlet style application or a hydrator pipeline. For program-flowlet style apps, this value must be 'program-flowlet' |
| 428 | jar_url | No | string | | | the URL that the JAR you're deploying resides |
| 429 | namespace | No | string | | | the cdap namespace this is deployed into |
| 430 | program_preferences | No | array of :ref:`programpref <d_610742fa78204adc388d0f7fbe30ad61>` | | | |
| 431 | programs | No | array of :ref:`programs <d_7bc8b39312a070aee5928f4e730192ae>` | | | |
| 432 | services | No | array of :ref:`service_endpoint <d_ad781f0dd64e16123fc1cbfefb4b9ded>` | | | |
| 433 | streamname | No | string | | | name of the CDAP stream to ingest data into this app. Should come from the developer and Tosca model. |
| 434 | |
| 435 | .. _i_13b2658afc25a955a6b4b48b9898c1a3: |
| 436 | |
| 437 | **App_config schema:** |
| 438 | |
| 439 | |
| 440 | the application config JSON |
| 441 | |
| 442 | |
| 443 | |
| 444 | .. _i_57297f6d8a6251aeb045f0872bf38d81: |
| 445 | |
| 446 | **App_preferences schema:** |
| 447 | |
| 448 | |
| 449 | the application preferences JSON |
| 450 | |
| 451 | |
| 452 | |
| 453 | .. code-block:: javascript |
| 454 | |
| 455 | { |
| 456 | "app_config": {}, |
| 457 | "app_preferences": {}, |
| 458 | "artifact_name": "somestring", |
| 459 | "cdap_application_type": "program-flowlet", |
| 460 | "jar_url": "somestring", |
| 461 | "namespace": "somestring", |
| 462 | "program_preferences": [ |
| 463 | { |
| 464 | "program_id": "somestring", |
| 465 | "program_pref": {}, |
| 466 | "program_type": "somestring" |
| 467 | }, |
| 468 | { |
| 469 | "program_id": "somestring", |
| 470 | "program_pref": {}, |
| 471 | "program_type": "somestring" |
| 472 | } |
| 473 | ], |
| 474 | "programs": [ |
| 475 | { |
| 476 | "program_id": "somestring", |
| 477 | "program_type": "somestring" |
| 478 | }, |
| 479 | { |
| 480 | "program_id": "somestring", |
| 481 | "program_type": "somestring" |
| 482 | } |
| 483 | ], |
| 484 | "services": [ |
| 485 | { |
| 486 | "endpoint_method": "somestring", |
| 487 | "service_endpoint": "somestring", |
| 488 | "service_name": "somestring" |
| 489 | }, |
| 490 | { |
| 491 | "endpoint_method": "somestring", |
| 492 | "service_endpoint": "somestring", |
| 493 | "service_name": "somestring" |
| 494 | } |
| 495 | ], |
| 496 | "streamname": "somestring" |
| 497 | } |
| 498 | |
| 499 | Responses |
| 500 | +++++++++ |
| 501 | |
| 502 | **200** |
| 503 | ^^^^^^^ |
| 504 | |
| 505 | Successful response |
| 506 | |
| 507 | |
| 508 | Type: :ref:`Application <d_2b315c86978b3cd8c6edfbe745f1afa2>` |
| 509 | |
| 510 | **Example:** |
| 511 | |
| 512 | .. code-block:: javascript |
| 513 | |
| 514 | { |
| 515 | "appname": "somestring", |
| 516 | "connectionurl": "somestring", |
| 517 | "healthcheckurl": "somestring", |
| 518 | "metricsurl": "somestring", |
| 519 | "serviceendpoints": [ |
| 520 | { |
| 521 | "method": "somestring", |
| 522 | "url": "somestring" |
| 523 | }, |
| 524 | { |
| 525 | "method": "somestring", |
| 526 | "url": "somestring" |
| 527 | } |
| 528 | ], |
| 529 | "url": "somestring" |
| 530 | } |
| 531 | |
| 532 | **400** |
| 533 | ^^^^^^^ |
| 534 | |
| 535 | put was performed but the appname was already registered with the broker, or Invalid PUT body |
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | |
| 542 | PUT ``/application*/{appname}`` |
| 543 | ------------------------------- |
| 544 | |
| 545 | |
| 546 | |
| 547 | Description |
| 548 | +++++++++++ |
| 549 | |
| 550 | .. raw:: html |
| 551 | |
| 552 | (This is a hacky way of supporting "oneOf" because Swagger does not support oneOf https://github.com/OAI/OpenAPI-Specification/issues/333. This is the same endpoint as PUT /application/appname, except the PUT body is different.) |
| 553 | |
| 554 | Register a hydrator app for service and configuration discovery. This will light up a metrics and health endpoint for this app. `appname` is assumed to also be the key in consul. |
| 555 | |
| 556 | Parameters |
| 557 | ++++++++++ |
| 558 | |
| 559 | .. csv-table:: |
| 560 | :delim: | |
| 561 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 562 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 563 | |
| 564 | appname | path | Yes | string | text | | Name of the application. |
| 565 | |
| 566 | |
| 567 | Request |
| 568 | +++++++ |
| 569 | |
| 570 | |
| 571 | |
| 572 | .. _d_d43078a75182938dccdbeac654cea43c: |
| 573 | |
| 574 | Body |
| 575 | ^^^^ |
| 576 | |
| 577 | .. csv-table:: |
| 578 | :delim: | |
| 579 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 580 | :widths: 20, 10, 15, 15, 30, 25 |
| 581 | |
| 582 | cdap_application_type | Yes | string | | {'enum': ['hydrator-pipeline']} | denotes whether this is a program-flowlet style application or a hydrator pipeline. For hydrator, this value must be 'hydrator-pipeline' |
| 583 | dependencies | No | array of :ref:`hydratordep <d_c5aa8c778f283571705fbe7a21d0f5c7>` | | | represents a list of dependencies to be loaded for this pipeline. Not required. |
| 584 | namespace | Yes | string | | | the cdap namespace this is deployed into |
| 585 | pipeline_config_json_url | Yes | string | | | the URL of the config.json for this pipeline |
| 586 | streamname | Yes | string | | | name of the CDAP stream to ingest data into this app. Should come from the developer and Tosca model. |
| 587 | |
| 588 | .. code-block:: javascript |
| 589 | |
| 590 | { |
| 591 | "cdap_application_type": "hydrator-pipeline", |
| 592 | "dependencies": [ |
| 593 | { |
| 594 | "artifact_extends_header": "somestring", |
| 595 | "artifact_name": "somestring", |
| 596 | "artifact_url": "somestring", |
| 597 | "artifact_version_header": "somestring", |
| 598 | "ui_properties_url": "somestring" |
| 599 | }, |
| 600 | { |
| 601 | "artifact_extends_header": "somestring", |
| 602 | "artifact_name": "somestring", |
| 603 | "artifact_url": "somestring", |
| 604 | "artifact_version_header": "somestring", |
| 605 | "ui_properties_url": "somestring" |
| 606 | } |
| 607 | ], |
| 608 | "namespace": "somestring", |
| 609 | "pipeline_config_json_url": "somestring", |
| 610 | "streamname": "somestring" |
| 611 | } |
| 612 | |
| 613 | Responses |
| 614 | +++++++++ |
| 615 | |
| 616 | **200** |
| 617 | ^^^^^^^ |
| 618 | |
| 619 | Successful response |
| 620 | |
| 621 | |
| 622 | Type: :ref:`Application <d_2b315c86978b3cd8c6edfbe745f1afa2>` |
| 623 | |
| 624 | **Example:** |
| 625 | |
| 626 | .. code-block:: javascript |
| 627 | |
| 628 | { |
| 629 | "appname": "somestring", |
| 630 | "connectionurl": "somestring", |
| 631 | "healthcheckurl": "somestring", |
| 632 | "metricsurl": "somestring", |
| 633 | "serviceendpoints": [ |
| 634 | { |
| 635 | "method": "somestring", |
| 636 | "url": "somestring" |
| 637 | }, |
| 638 | { |
| 639 | "method": "somestring", |
| 640 | "url": "somestring" |
| 641 | } |
| 642 | ], |
| 643 | "url": "somestring" |
| 644 | } |
| 645 | |
| 646 | **400** |
| 647 | ^^^^^^^ |
| 648 | |
| 649 | put was performed but the appname was already registered with the broker, or Invalid PUT body |
| 650 | |
| 651 | |
| 652 | |
| 653 | |
| 654 | |
| 655 | |
| 656 | PUT ``/application/{appname}/reconfigure`` |
| 657 | ------------------------------------------ |
| 658 | |
| 659 | |
| 660 | |
| 661 | Description |
| 662 | +++++++++++ |
| 663 | |
| 664 | .. raw:: html |
| 665 | |
| 666 | Reconfigures the application. |
| 667 | |
| 668 | Parameters |
| 669 | ++++++++++ |
| 670 | |
| 671 | .. csv-table:: |
| 672 | :delim: | |
| 673 | :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description" |
| 674 | :widths: 20, 15, 10, 10, 10, 20, 30 |
| 675 | |
| 676 | appname | path | Yes | string | text | | Name of the application. |
| 677 | |
| 678 | |
| 679 | Request |
| 680 | +++++++ |
| 681 | |
| 682 | |
| 683 | |
| 684 | .. _d_2a32645bc6d3020744d3d17500c34bc3: |
| 685 | |
| 686 | Body |
| 687 | ^^^^ |
| 688 | |
| 689 | .. csv-table:: |
| 690 | :delim: | |
| 691 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 692 | :widths: 20, 10, 15, 15, 30, 25 |
| 693 | |
| 694 | config | Yes | :ref:`config <i_6a9d9951a40bf655fda365aa310e1ddc>` | | | the config JSON |
| 695 | reconfiguration_type | Yes | string | | {'enum': ['program-flowlet-app-config', 'program-flowlet-app-preferences', 'program-flowlet-smart']} | the type of reconfiguration |
| 696 | |
| 697 | .. _i_6a9d9951a40bf655fda365aa310e1ddc: |
| 698 | |
| 699 | **Config schema:** |
| 700 | |
| 701 | |
| 702 | the config JSON |
| 703 | |
| 704 | |
| 705 | |
| 706 | .. code-block:: javascript |
| 707 | |
| 708 | { |
| 709 | "config": {}, |
| 710 | "reconfiguration_type": "program-flowlet-app-config" |
| 711 | } |
| 712 | |
| 713 | Responses |
| 714 | +++++++++ |
| 715 | |
| 716 | **200** |
| 717 | ^^^^^^^ |
| 718 | |
| 719 | Successful response |
| 720 | |
| 721 | |
| 722 | **400** |
| 723 | ^^^^^^^ |
| 724 | |
| 725 | Bad request. Can happen with 1) {appname} is not registered with the broker, 2) the required PUT body is wrong, or 3) the smart interface was chosen and none of the config keys match anything in app_config or app_preferences |
| 726 | |
| 727 | |
| 728 | |
| 729 | |
| 730 | |
| 731 | Data Structures |
| 732 | ~~~~~~~~~~~~~~~ |
| 733 | |
| 734 | .. _d_2b315c86978b3cd8c6edfbe745f1afa2: |
| 735 | |
| 736 | Application Model Structure |
| 737 | --------------------------- |
| 738 | |
| 739 | .. csv-table:: |
| 740 | :delim: | |
| 741 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 742 | :widths: 20, 10, 15, 15, 30, 25 |
| 743 | |
| 744 | appname | No | string | | | application name |
| 745 | connectionurl | No | string | | | input URL that you can POST data into (URL of the CDAP stream) |
| 746 | healthcheckurl | No | string | | | fully qualified url to perform healthcheck |
| 747 | metricsurl | No | string | | | fully qualified url to get metrics from |
| 748 | serviceendpoints | No | array of :ref:`service_method <d_e5edc5fd82a1190817cf350e70cb7e0e>` | | | a list of HTTP services exposed by this CDAP application |
| 749 | url | No | string | | | fully qualified url of the resource |
| 750 | |
| 751 | .. _d_5d4c5a47c1043833affa67eb27bf3d9d: |
| 752 | |
| 753 | MetricsObject Model Structure |
| 754 | ----------------------------- |
| 755 | |
| 756 | key,value object where the key is 'appmetrics' and the value is an app dependent json and specified by the component developer |
| 757 | |
| 758 | .. csv-table:: |
| 759 | :delim: | |
| 760 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 761 | :widths: 20, 10, 15, 15, 30, 25 |
| 762 | |
| 763 | appmetrics | No | :ref:`appmetrics <i_6cb44a56118e2966acccfb86f18d0570>` | | | |
| 764 | |
| 765 | .. _i_6cb44a56118e2966acccfb86f18d0570: |
| 766 | |
| 767 | **Appmetrics schema:** |
| 768 | |
| 769 | |
| 770 | |
| 771 | |
| 772 | .. _d_2f6991f1775468c3ce48a2778455be93: |
| 773 | |
| 774 | appname Model Structure |
| 775 | ----------------------- |
| 776 | |
| 777 | an application name |
| 778 | |
| 779 | .. csv-table:: |
| 780 | :delim: | |
| 781 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 782 | :widths: 20, 10, 15, 15, 30, 25 |
| 783 | |
| 784 | appname | No | string | | | an application name |
| 785 | |
| 786 | .. _d_a151b00939024528c17a91cf47a4eae3: |
| 787 | |
| 788 | appput Model Structure |
| 789 | ---------------------- |
| 790 | |
| 791 | .. csv-table:: |
| 792 | :delim: | |
| 793 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 794 | :widths: 20, 10, 15, 15, 30, 25 |
| 795 | |
| 796 | app_config | No | :ref:`app_config <i_13b2658afc25a955a6b4b48b9898c1a3>` | | | the application config JSON |
| 797 | app_preferences | No | :ref:`app_preferences <i_57297f6d8a6251aeb045f0872bf38d81>` | | | the application preferences JSON |
| 798 | artifact_name | No | string | | | the name of the CDAP artifact to be added |
| 799 | cdap_application_type | No | string | | {'enum': ['program-flowlet']} | denotes whether this is a program-flowlet style application or a hydrator pipeline. For program-flowlet style apps, this value must be 'program-flowlet' |
| 800 | jar_url | No | string | | | the URL that the JAR you're deploying resides |
| 801 | namespace | No | string | | | the cdap namespace this is deployed into |
| 802 | program_preferences | No | array of :ref:`programpref <d_610742fa78204adc388d0f7fbe30ad61>` | | | |
| 803 | programs | No | array of :ref:`programs <d_7bc8b39312a070aee5928f4e730192ae>` | | | |
| 804 | services | No | array of :ref:`service_endpoint <d_ad781f0dd64e16123fc1cbfefb4b9ded>` | | | |
| 805 | streamname | No | string | | | name of the CDAP stream to ingest data into this app. Should come from the developer and Tosca model. |
| 806 | |
| 807 | .. _i_13b2658afc25a955a6b4b48b9898c1a3: |
| 808 | |
| 809 | **App_config schema:** |
| 810 | |
| 811 | |
| 812 | the application config JSON |
| 813 | |
| 814 | |
| 815 | |
| 816 | .. _i_57297f6d8a6251aeb045f0872bf38d81: |
| 817 | |
| 818 | **App_preferences schema:** |
| 819 | |
| 820 | |
| 821 | the application preferences JSON |
| 822 | |
| 823 | |
| 824 | |
| 825 | .. _d_d43078a75182938dccdbeac654cea43c: |
| 826 | |
| 827 | hydratorappput Model Structure |
| 828 | ------------------------------ |
| 829 | |
| 830 | .. csv-table:: |
| 831 | :delim: | |
| 832 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 833 | :widths: 20, 10, 15, 15, 30, 25 |
| 834 | |
| 835 | cdap_application_type | Yes | string | | {'enum': ['hydrator-pipeline']} | denotes whether this is a program-flowlet style application or a hydrator pipeline. For hydrator, this value must be 'hydrator-pipeline' |
| 836 | dependencies | No | array of :ref:`hydratordep <d_c5aa8c778f283571705fbe7a21d0f5c7>` | | | represents a list of dependencies to be loaded for this pipeline. Not required. |
| 837 | namespace | Yes | string | | | the cdap namespace this is deployed into |
| 838 | pipeline_config_json_url | Yes | string | | | the URL of the config.json for this pipeline |
| 839 | streamname | Yes | string | | | name of the CDAP stream to ingest data into this app. Should come from the developer and Tosca model. |
| 840 | |
| 841 | .. _d_c5aa8c778f283571705fbe7a21d0f5c7: |
| 842 | |
| 843 | hydratordep Model Structure |
| 844 | --------------------------- |
| 845 | |
| 846 | represents a hydrator pipeline dependency. An equivelent to the following CURLs are formed with the below four params shown in CAPS 'curl -v -w'\n' -X POST http://cdapurl:11015/v3/namespaces/setelsewhere/artifacts/ARTIFACT_NAME -H 'Artifact-Extends:ARTIFACT_EXTENDS_HEADER' -H “Artifact-Version:ARTIFACT_VERSION_HEADER” --data-binary @(DOWNLOADED FROM ARTIFACT_URL)','curl -v -w'\n' -X PUT http://cdapurl:11015/v3/namespaces/setelsewhere/artifacts/ARTIFACT_NAME/versions/ARTIFACT_VERSION_HEADER/properties -d (DOWNLOADED FROM UI_PROPERTIES_URL)' |
| 847 | |
| 848 | .. csv-table:: |
| 849 | :delim: | |
| 850 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 851 | :widths: 20, 10, 15, 15, 30, 25 |
| 852 | |
| 853 | artifact_extends_header | Yes | string | | | the value of the header that gets passed in for artifact-extends, e.g., 'Artifact-Extends:system:cdap-data-pipeline[4.0.1,5.0.0)' |
| 854 | artifact_name | Yes | string | | | the name of the artifact |
| 855 | artifact_url | Yes | string | | | the URL of the artifact JAR |
| 856 | artifact_version_header | Yes | string | | | the value of the header that gets passed in for artifact-version, e.g., 'Artifact-Version:1.0.0-SNAPSHOT' |
| 857 | ui_properties_url | No | string | | | the URL of the properties.json if the custom artifact has UI properties. This is optional. |
| 858 | |
| 859 | .. _d_060ca512d6d771a97a7d0f50886f6b14: |
| 860 | |
| 861 | info Model Structure |
| 862 | -------------------- |
| 863 | |
| 864 | some broker information |
| 865 | |
| 866 | .. csv-table:: |
| 867 | :delim: | |
| 868 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 869 | :widths: 20, 10, 15, 15, 30, 25 |
| 870 | |
| 871 | broker API version | No | string | | | the API version of this running broker |
| 872 | cdap GUI port | No | integer | | | The GUI port of the CDAP cluster this broker is managing. Mostly to help users of this API check their application in cdap. Note, will return UNKNOWN_CDAP_VERSION if it cannot be determined. |
| 873 | cdap cluster version | No | string | | | the version of the CDAP cluster this broker is managing. Note, will return UKNOWN_CDAP_VERSION if it cannot be determined. |
| 874 | managed cdap url | No | string | | | the url of the CDAP cluster API this broker is managing |
| 875 | number of applications registered | No | integer | | | |
| 876 | uptime (s) | No | integer | | | |
| 877 | |
| 878 | .. _d_c0830b0f8b495da06c2fef152ce05dba: |
| 879 | |
| 880 | multideleteput Model Structure |
| 881 | ------------------------------ |
| 882 | |
| 883 | .. csv-table:: |
| 884 | :delim: | |
| 885 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 886 | :widths: 20, 10, 15, 15, 30, 25 |
| 887 | |
| 888 | appnames | No | array of :ref:`appname <d_2f6991f1775468c3ce48a2778455be93>` | | | |
| 889 | |
| 890 | .. _d_610742fa78204adc388d0f7fbe30ad61: |
| 891 | |
| 892 | programpref Model Structure |
| 893 | --------------------------- |
| 894 | |
| 895 | the list of programs in this CDAP app |
| 896 | |
| 897 | .. csv-table:: |
| 898 | :delim: | |
| 899 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 900 | :widths: 20, 10, 15, 15, 30, 25 |
| 901 | |
| 902 | program_id | No | string | | | the name of the program |
| 903 | program_pref | No | :ref:`program_pref <i_07225a64d44b62a92699f22d603b563c>` | | | the preference JSON to set for this program |
| 904 | program_type | No | string | | | must be one of flows, mapreduce, schedules, spark, workflows, workers, or services |
| 905 | |
| 906 | .. _i_07225a64d44b62a92699f22d603b563c: |
| 907 | |
| 908 | **Program_pref schema:** |
| 909 | |
| 910 | |
| 911 | the preference JSON to set for this program |
| 912 | |
| 913 | |
| 914 | |
| 915 | .. _d_7bc8b39312a070aee5928f4e730192ae: |
| 916 | |
| 917 | programs Model Structure |
| 918 | ------------------------ |
| 919 | |
| 920 | the list of programs in this CDAP app |
| 921 | |
| 922 | .. csv-table:: |
| 923 | :delim: | |
| 924 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 925 | :widths: 20, 10, 15, 15, 30, 25 |
| 926 | |
| 927 | program_id | No | string | | | the name of the program |
| 928 | program_type | No | string | | | must be one of flows, mapreduce, schedules, spark, workflows, workers, or services |
| 929 | |
| 930 | .. _d_2a32645bc6d3020744d3d17500c34bc3: |
| 931 | |
| 932 | reconfigput Model Structure |
| 933 | --------------------------- |
| 934 | |
| 935 | .. csv-table:: |
| 936 | :delim: | |
| 937 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 938 | :widths: 20, 10, 15, 15, 30, 25 |
| 939 | |
| 940 | config | Yes | :ref:`config <i_6a9d9951a40bf655fda365aa310e1ddc>` | | | the config JSON |
| 941 | reconfiguration_type | Yes | string | | {'enum': ['program-flowlet-app-config', 'program-flowlet-app-preferences', 'program-flowlet-smart']} | the type of reconfiguration |
| 942 | |
| 943 | .. _i_6a9d9951a40bf655fda365aa310e1ddc: |
| 944 | |
| 945 | **Config schema:** |
| 946 | |
| 947 | |
| 948 | the config JSON |
| 949 | |
| 950 | |
| 951 | |
| 952 | .. _d_5a28f16eed72be7d9a8279c0e1f05386: |
| 953 | |
| 954 | returncode Model Structure |
| 955 | -------------------------- |
| 956 | |
| 957 | an httpreturncode |
| 958 | |
| 959 | .. csv-table:: |
| 960 | :delim: | |
| 961 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 962 | :widths: 20, 10, 15, 15, 30, 25 |
| 963 | |
| 964 | returncode | No | integer | | | an httpreturncode |
| 965 | |
| 966 | .. _d_ad781f0dd64e16123fc1cbfefb4b9ded: |
| 967 | |
| 968 | service_endpoint Model Structure |
| 969 | -------------------------------- |
| 970 | |
| 971 | descirbes a service endpoint, including the service name, the method name, and the method type (GET, PUT, etc, most of the time will be GET) |
| 972 | |
| 973 | .. csv-table:: |
| 974 | :delim: | |
| 975 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 976 | :widths: 20, 10, 15, 15, 30, 25 |
| 977 | |
| 978 | endpoint_method | No | string | | | GET, POST, PUT, etc |
| 979 | service_endpoint | No | string | | | the name of the endpoint on the service |
| 980 | service_name | No | string | | | the name of the service |
| 981 | |
| 982 | .. _d_e5edc5fd82a1190817cf350e70cb7e0e: |
| 983 | |
| 984 | service_method Model Structure |
| 985 | ------------------------------ |
| 986 | |
| 987 | a URL and HTTP method exposed via a CDAP service |
| 988 | |
| 989 | .. csv-table:: |
| 990 | :delim: | |
| 991 | :header: "Name", "Required", "Type", "Format", "Properties", "Description" |
| 992 | :widths: 20, 10, 15, 15, 30, 25 |
| 993 | |
| 994 | method | No | string | | | HTTP method you can perform on the URL, e.g., GET, PUT, etc |
| 995 | url | No | string | | | the fully qualified URL in CDAP for this service |
| 996 | |