28 shows some information about this service
33 +---------+----------------------------------------------------+----------------+
34 | HTTP | Description | Schema |
36 +=========+====================================================+================+
37 | **200** | successful response | `info <#_info> |
39 +---------+----------------------------------------------------+----------------+
47 get all applications registered with this broker
52 +---------+----------------------------------------------------+----------------+
53 | HTTP | Description | Schema |
55 +=========+====================================================+================+
56 | **200** | successful response | < |
57 | | | `appname <#_ap |
60 +---------+----------------------------------------------------+----------------+
62 PUT /application\*/{appname}
63 ----------------------------
68 (This is a hacky way of supporting "oneOf" because Swagger does not
69 support oneOf https://github.com/OAI/OpenAPI-Specification/issues/333.
70 This is the same endpoint as PUT /application/appname, except the PUT
73 Register a hydrator app for service and configuration discovery. This
74 will light up a metrics and health endpoint for this app. ``appname`` is
75 assumed to also be the key in consul.
80 +---------+-------------+--------------------------------------+------------------+
81 | Type | Name | Description | Schema |
82 +=========+=============+======================================+==================+
83 | **Path* | | **appname | Name of the application. | string (text) |
87 +---------+-------------+--------------------------------------+------------------+
88 | **Body* | | **putbody | required put body | `hydratorappput |
89 | * | ** | | <#_hydratorapppu |
90 | | | *required | | t>`__ |
92 +---------+-------------+--------------------------------------+------------------+
97 +---------+----------------------------------------------------+----------------+
98 | HTTP | Description | Schema |
100 +=========+====================================================+================+
101 | **200** | Successful response | `Application < |
102 | | | #_application> |
104 +---------+----------------------------------------------------+----------------+
105 | **400** | put was performed but the appname was already | No Content |
106 | | registered with the broker, or Invalid PUT body | |
107 +---------+----------------------------------------------------+----------------+
112 - ``application/json``
117 - ``application/json``
119 POST /application/delete
120 ------------------------
125 endpoint to delete multiple applications at once. Returns an array of
126 status codes, where statuscode[i] = response returned from
127 DELETE(application/i)
132 +---------+-------------+--------------------------------------+------------------+
133 | Type | Name | Description | Schema |
134 +=========+=============+======================================+==================+
135 | **Body* | | **postbod | required post body | `multideleteput |
136 | * | y** | | <#_multideletepu |
137 | | | *required | | t>`__ |
139 +---------+-------------+--------------------------------------+------------------+
144 +---------+----------------------------------------------------+----------------+
145 | HTTP | Description | Schema |
147 +=========+====================================================+================+
148 | **200** | successful response | < |
149 | | | `returncode <# |
150 | | | _returncode>`_ |
153 +---------+----------------------------------------------------+----------------+
155 GET /application/{appname}
156 --------------------------
161 Returns the representation of the application resource, including the
162 links for healthcheck and metrics.
167 +---------+-------------+--------------------------------------+------------------+
168 | Type | Name | Description | Schema |
169 +=========+=============+======================================+==================+
170 | **Path* | | **appname | Name of the application. | string (text) |
172 | | | *required | | |
174 +---------+-------------+--------------------------------------+------------------+
179 +---------+----------------------------------------------------+----------------+
180 | HTTP | Description | Schema |
182 +=========+====================================================+================+
183 | **200** | Successful response | `Application < |
184 | | | #_application> |
186 +---------+----------------------------------------------------+----------------+
187 | **404** | no app with name 'appname' registered with this | No Content |
189 +---------+----------------------------------------------------+----------------+
191 PUT /application/{appname}
192 --------------------------
197 Register an app for service and configuration discovery. This will light
198 up a metrics and health endpoint for this app. ``appname`` is assumed to
199 also be the key in consul.
204 +---------+-------------+--------------------------------------+------------------+
205 | Type | Name | Description | Schema |
206 +=========+=============+======================================+==================+
207 | **Path* | | **appname | Name of the application. | string (text) |
209 | | | *required | | |
211 +---------+-------------+--------------------------------------+------------------+
212 | **Body* | | **putbody | required put body | `appput <#_apppu |
214 | | | *required | | |
216 +---------+-------------+--------------------------------------+------------------+
221 +---------+----------------------------------------------------+----------------+
222 | HTTP | Description | Schema |
224 +=========+====================================================+================+
225 | **200** | Successful response | `Application < |
226 | | | #_application> |
228 +---------+----------------------------------------------------+----------------+
229 | **400** | put was performed but the appname was already | No Content |
230 | | registered with the broker, or Invalid PUT body | |
231 +---------+----------------------------------------------------+----------------+
236 - ``application/json``
241 - ``application/json``
243 DELETE /application/{appname}
244 -----------------------------
249 Remove an app for service and configuration discovery. This will remove
250 the metrics and health endpoints for this app.
255 +---------+-------------+--------------------------------------+------------------+
256 | Type | Name | Description | Schema |
257 +=========+=============+======================================+==================+
258 | **Path* | | **appname | Name of the application. | string (text) |
260 | | | *required | | |
262 +---------+-------------+--------------------------------------+------------------+
267 +---------+----------------------------------------------------+----------------+
268 | HTTP | Description | Schema |
270 +=========+====================================================+================+
271 | **200** | Successful response | No Content |
272 +---------+----------------------------------------------------+----------------+
273 | **404** | no app with name 'appname' registered with this | No Content |
275 +---------+----------------------------------------------------+----------------+
277 GET /application/{appname}/healthcheck
278 --------------------------------------
283 Perform a healthcheck on the running app appname.
288 +---------+-------------+--------------------------------------+------------------+
289 | Type | Name | Description | Schema |
290 +=========+=============+======================================+==================+
291 | **Path* | | **appname | Name of the application to get the | string (test) |
292 | * | ** | healthcheck for. | |
293 | | | *required | | |
295 +---------+-------------+--------------------------------------+------------------+
300 +---------+----------------------------------------------------+----------------+
301 | HTTP | Description | Schema |
303 +=========+====================================================+================+
304 | **200** | Successful response, healthcheck pass | No Content |
305 +---------+----------------------------------------------------+----------------+
306 | **404** | no app with name 'appname' registered with this | No Content |
307 | | broker, or the healthcheck has failed (though I | |
308 | | would like to disambiguiate from the first case, | |
309 | | CDAP returns a 404 for this). | |
310 +---------+----------------------------------------------------+----------------+
312 GET /application/{appname}/metrics
313 ----------------------------------
318 Get live (real-time) app specific metrics for the running app appname.
319 Metrics are customized per each app by the component developer
324 +---------+-------------+--------------------------------------+------------------+
325 | Type | Name | Description | Schema |
326 +=========+=============+======================================+==================+
327 | **Path* | | **appname | Name of the application to get | string (test) |
328 | * | ** | metrics for. | |
329 | | | *required | | |
331 +---------+-------------+--------------------------------------+------------------+
336 +---------+----------------------------------------------------+----------------+
337 | HTTP | Description | Schema |
339 +=========+====================================================+================+
340 | **200** | Successful response | `MetricsObject |
341 | | | <#_metricsobj |
343 +---------+----------------------------------------------------+----------------+
344 | **404** | no app with name 'appname' registered with this | No Content |
346 +---------+----------------------------------------------------+----------------+
348 PUT /application/{appname}/reconfigure
349 --------------------------------------
354 Reconfigures the application.
359 +---------+-------------+--------------------------------------+------------------+
360 | Type | Name | Description | Schema |
361 +=========+=============+======================================+==================+
362 | **Path* | | **appname | Name of the application. | string (text) |
364 | | | *required | | |
366 +---------+-------------+--------------------------------------+------------------+
367 | **Body* | | **putbody | required put body | `reconfigput <#_ |
368 | * | ** | | reconfigput>`__ |
369 | | | *required | | |
371 +---------+-------------+--------------------------------------+------------------+
376 +---------+----------------------------------------------------+----------------+
377 | HTTP | Description | Schema |
379 +=========+====================================================+================+
380 | **200** | Successful response | No Content |
381 +---------+----------------------------------------------------+----------------+
382 | **400** | Bad request. Can happen with 1) {appname} is not | No Content |
383 | | registered with the broker, 2) the required PUT | |
384 | | body is wrong, or 3) the smart interface was | |
385 | | chosen and none of the config keys match anything | |
386 | | in app\_config or app\_preferences | |
387 +---------+----------------------------------------------------+----------------+
395 +-------------+---------------------------------------------+------------------+
396 | Name | Description | Schema |
397 +=============+=============================================+==================+
398 | | **appname | application name | string |
402 +-------------+---------------------------------------------+------------------+
403 | | **connect | input URL that you can POST data into (URL | string |
404 | ionurl** | of the CDAP stream) | |
407 +-------------+---------------------------------------------+------------------+
408 | | **healthc | fully qualified url to perform healthcheck | string |
412 +-------------+---------------------------------------------+------------------+
413 | | **metrics | fully qualified url to get metrics from | string |
417 +-------------+---------------------------------------------+------------------+
418 | | **service | a list of HTTP services exposed by this | < |
419 | endpoints** | CDAP application | `service\_method |
420 | | *optional | | <#_service_meth |
423 +-------------+---------------------------------------------+------------------+
424 | | **url** | fully qualified url of the resource | string |
427 +-------------+---------------------------------------------+------------------+
432 key,value object where the key is 'appmetrics' and the value is an app
433 dependent json and specified by the component developer
435 +--------------------------------+-------------------------------------------+
437 +================================+===========================================+
438 | | **appmetrics** | object |
440 +--------------------------------+-------------------------------------------+
452 +-------------+---------------------------------------------+------------------+
453 | Name | Description | Schema |
454 +=============+=============================================+==================+
455 | | **app\_co | the application config JSON | object |
459 +-------------+---------------------------------------------+------------------+
460 | | **app\_pr | the application preferences JSON | object |
464 +-------------+---------------------------------------------+------------------+
465 | | **artifac | the name of the CDAP artifact to be added | string |
469 +-------------+---------------------------------------------+------------------+
470 | | **cdap\_a | denotes whether this is a program-flowlet | enum |
471 | pplication\ | style application or a hydrator pipeline. | (program-flowlet |
472 | _type** | For program-flowlet style apps, this value | ) |
473 | | *optional | must be "program-flowlet" | |
475 +-------------+---------------------------------------------+------------------+
476 | | **jar\_ur | the URL that the JAR you’re deploying | string |
480 +-------------+---------------------------------------------+------------------+
481 | | **namespa | the cdap namespace this is deployed into | string |
485 +-------------+---------------------------------------------+------------------+
486 | | **program | | < |
487 | \_preferenc | | `programpref <#_ |
488 | es** | | programpref>`__ |
489 | | *optional | | > array |
491 +-------------+---------------------------------------------+------------------+
492 | | **program | | < |
493 | s** | | `programs <#_pro |
494 | | *optional | | grams>`__ |
496 +-------------+---------------------------------------------+------------------+
497 | | **service | | < |
498 | s** | | `service\_endpoi |
499 | | *optional | | nt <#_service_en |
502 +-------------+---------------------------------------------+------------------+
503 | | **streamn | name of the CDAP stream to ingest data into | string |
504 | ame** | this app. Should come from the developer | |
505 | | *optional | and Tosca model. | |
507 +-------------+---------------------------------------------+------------------+
512 +-------------+---------------------------------------------+------------------+
513 | Name | Description | Schema |
514 +=============+=============================================+==================+
515 | | **cdap\_a | denotes whether this is a program-flowlet | enum |
516 | pplication\ | style application or a hydrator pipeline. | (hydrator-pipeli |
517 | _type** | For hydrator, this value must be | ne) |
518 | | *required | "hydrator-pipeline" | |
520 +-------------+---------------------------------------------+------------------+
521 | | **depende | represents a list of dependencies to be | < |
522 | ncies** | loaded for this pipeline. Not required. | `hydratordep <#_ |
523 | | *optional | | hydratordep>`__ |
525 +-------------+---------------------------------------------+------------------+
526 | | **namespa | the cdap namespace this is deployed into | string |
530 +-------------+---------------------------------------------+------------------+
531 | | **pipelin | the URL of the config.json for this | string |
532 | e\_config\_ | pipeline | |
536 +-------------+---------------------------------------------+------------------+
537 | | **streamn | name of the CDAP stream to ingest data into | string |
538 | ame** | this app. Should come from the developer | |
539 | | *required | and Tosca model. | |
541 +-------------+---------------------------------------------+------------------+
546 represents a hydrator pipeline dependency. An equivelent to the
547 following CURLs are formed with the below four params shown in CAPS
548 "curl -v -w"\\n" -X POST
549 http://cdapurl:11015/v3/namespaces/setelsewhere/artifacts/ARTIFACT_NAME
550 -H "Artifact-Extends:ARTIFACT\_EXTENDS\_HEADER" -H
551 “Artifact-Version:ARTIFACT\_VERSION\_HEADER” –data-binary @(DOWNLOADED
552 FROM ARTIFACT\_URL)","curl -v -w"\\n" -X PUT
553 http://cdapurl:11015/v3/namespaces/setelsewhere/artifacts/ARTIFACT_NAME/versions/ARTIFACT_VERSION_HEADER/properties
554 -d (DOWNLOADED FROM UI\_PROPERTIES\_URL)"
556 +-------------+---------------------------------------------+------------------+
557 | Name | Description | Schema |
558 +=============+=============================================+==================+
559 | | **artifac | the value of the header that gets passed in | string |
560 | t\_extends\ | for artifact-extends, e.g., | |
561 | _header** | "Artifact-Extends:system:cdap-data-pipeline | |
562 | | *required | [4.0.1,5.0.0)" | |
564 +-------------+---------------------------------------------+------------------+
565 | | **artifac | the name of the artifact | string |
569 +-------------+---------------------------------------------+------------------+
570 | | **artifac | the URL of the artifact JAR | string |
574 +-------------+---------------------------------------------+------------------+
575 | | **artifac | the value of the header that gets passed in | string |
576 | t\_version\ | for artifact-version, e.g., | |
577 | _header** | "Artifact-Version:1.0.0-SNAPSHOT" | |
580 +-------------+---------------------------------------------+------------------+
581 | | **ui\_pro | the URL of the properties.json if the | string |
582 | perties\_ur | custom artifact has UI properties. This is | |
583 | l** | optional. | |
586 +-------------+---------------------------------------------+------------------+
591 some broker information
593 +-------------+---------------------------------------------+------------------+
594 | Name | Description | Schema |
595 +=============+=============================================+==================+
596 | | **broker | the API version of this running broker | string |
601 +-------------+---------------------------------------------+------------------+
602 | | **cdap | The GUI port of the CDAP cluster this | integer |
603 | GUI | broker is managing. Mostly to help users of | |
604 | port** | this API check their application in cdap. | |
605 | | *optional | Note, will return UNKNOWN\_CDAP\_VERSION if | |
606 | * | it cannot be determined. | |
607 +-------------+---------------------------------------------+------------------+
608 | | **cdap | the version of the CDAP cluster this broker | string |
609 | cluster | is managing. Note, will return | |
610 | version** | UKNOWN\_CDAP\_VERSION if it cannot be | |
611 | | *optional | determined. | |
613 +-------------+---------------------------------------------+------------------+
614 | | **managed | the url of the CDAP cluster API this broker | string |
615 | cdap | is managing | |
619 +-------------+---------------------------------------------+------------------+
620 | | **number | | integer |
628 +-------------+---------------------------------------------+------------------+
629 | | **uptime | | integer |
633 +-------------+---------------------------------------------+------------------+
638 +--------------------------------+-------------------------------------------+
640 +================================+===========================================+
641 | | **appnames** | < `appname <#_appname>`__ > array |
643 +--------------------------------+-------------------------------------------+
648 the list of programs in this CDAP app
650 +-------------+---------------------------------------------+------------------+
651 | Name | Description | Schema |
652 +=============+=============================================+==================+
653 | | **program | the name of the program | string |
657 +-------------+---------------------------------------------+------------------+
658 | | **program | the preference JSON to set for this program | object |
662 +-------------+---------------------------------------------+------------------+
663 | | **program | must be one of flows, mapreduce, schedules, | string |
664 | \_type** | spark, workflows, workers, or services | |
667 +-------------+---------------------------------------------+------------------+
672 the list of programs in this CDAP app
674 +-------------+---------------------------------------------+------------------+
675 | Name | Description | Schema |
676 +=============+=============================================+==================+
677 | | **program | the name of the program | string |
681 +-------------+---------------------------------------------+------------------+
682 | | **program | must be one of flows, mapreduce, schedules, | string |
683 | \_type** | spark, workflows, workers, or services | |
686 +-------------+---------------------------------------------+------------------+
691 +-------------+---------------------------------------------+------------------+
692 | Name | Description | Schema |
693 +=============+=============================================+==================+
694 | | **config* | the config JSON | object |
698 +-------------+---------------------------------------------+------------------+
699 | | **reconfi | the type of reconfiguration | enum |
700 | guration\_t | | (program-flowlet |
701 | ype** | | -app-config, |
702 | | *required | | program-flowlet- |
703 | * | | app-preferences, |
704 | | | program-flowlet- |
706 +-------------+---------------------------------------------+------------------+
718 descirbes a service endpoint, including the service name, the method
719 name, and the method type (GET, PUT, etc, most of the time will be GET)
721 +-------------+---------------------------------------------+------------------+
722 | Name | Description | Schema |
723 +=============+=============================================+==================+
724 | | **endpoin | GET, POST, PUT, etc | string |
728 +-------------+---------------------------------------------+------------------+
729 | | **service | the name of the endpoint on the service | string |
734 +-------------+---------------------------------------------+------------------+
735 | | **service | the name of the service | string |
739 +-------------+---------------------------------------------+------------------+
744 a URL and HTTP method exposed via a CDAP service
746 +-------------+---------------------------------------------+------------------+
747 | Name | Description | Schema |
748 +=============+=============================================+==================+
749 | | **method* | HTTP method you can perform on the URL, | string |
750 | * | e.g., GET, PUT, etc | |
753 +-------------+---------------------------------------------+------------------+
754 | | **url** | the fully qualified URL in CDAP for this | string |
755 | | *optional | service | |
757 +-------------+---------------------------------------------+------------------+