17 DELETE ``/application/{appname}``
18 ---------------------------------
27 Remove an app for service and configuration discovery. This will remove the metrics and health endpoints for this app.
34 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
35 :widths: 20, 15, 10, 10, 10, 20, 30
37 appname | path | Yes | string | text | | Name of the application.
56 no app with name 'appname' registered with this broker.
73 shows some information about this service
89 Type: :ref:`info <d_060ca512d6d771a97a7d0f50886f6b14>`
93 .. code-block:: javascript
96 "broker API version": "somestring",
98 "cdap cluster version": "somestring",
99 "managed cdap url": "somestring",
100 "number of applications registered": 1,
118 get all applications registered with this broker
134 Type: array of :ref:`appname <d_2f6991f1775468c3ce48a2778455be93>`
139 .. code-block:: javascript
150 GET ``/application/{appname}``
151 ------------------------------
160 Returns the representation of the application resource, including the links for healthcheck and metrics.
167 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
168 :widths: 20, 15, 10, 10, 10, 20, 30
170 appname | path | Yes | string | text | | Name of the application.
186 Type: :ref:`Application <d_2b315c86978b3cd8c6edfbe745f1afa2>`
190 .. code-block:: javascript
193 "appname": "somestring",
194 "connectionurl": "somestring",
195 "healthcheckurl": "somestring",
196 "metricsurl": "somestring",
197 "serviceendpoints": [
199 "method": "somestring",
203 "method": "somestring",
213 no app with name 'appname' registered with this broker.
220 GET ``/application/{appname}/healthcheck``
221 ------------------------------------------
230 Perform a healthcheck on the running app appname.
237 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
238 :widths: 20, 15, 10, 10, 10, 20, 30
240 appname | path | Yes | string | test | | Name of the application to get the healthcheck for.
253 Successful response, healthcheck pass
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).
266 GET ``/application/{appname}/metrics``
267 --------------------------------------
276 Get live (real-time) app specific metrics for the running app appname. Metrics are customized per each app by the component developer
283 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
284 :widths: 20, 15, 10, 10, 10, 20, 30
286 appname | path | Yes | string | test | | Name of the application to get metrics for.
302 Type: :ref:`MetricsObject <d_5d4c5a47c1043833affa67eb27bf3d9d>`
306 .. code-block:: javascript
315 no app with name 'appname' registered with this broker.
322 POST ``/application/delete``
323 ----------------------------
332 endpoint to delete multiple applications at once. Returns an array of status codes, where statuscode[i] = response returned from DELETE(application/i)
340 .. _d_c0830b0f8b495da06c2fef152ce05dba:
347 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
348 :widths: 20, 10, 15, 15, 30, 25
350 appnames | No | array of :ref:`appname <d_2f6991f1775468c3ce48a2778455be93>` | | |
352 .. code-block:: javascript
370 Type: array of :ref:`returncode <d_5a28f16eed72be7d9a8279c0e1f05386>`
375 .. code-block:: javascript
386 PUT ``/application/{appname}``
387 ------------------------------
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.
403 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
404 :widths: 20, 15, 10, 10, 10, 20, 30
406 appname | path | Yes | string | text | | Name of the application.
414 .. _d_a151b00939024528c17a91cf47a4eae3:
421 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
422 :widths: 20, 10, 15, 15, 30, 25
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.
435 .. _i_13b2658afc25a955a6b4b48b9898c1a3:
437 **App_config schema:**
440 the application config JSON
444 .. _i_57297f6d8a6251aeb045f0872bf38d81:
446 **App_preferences schema:**
449 the application preferences JSON
453 .. code-block:: javascript
457 "app_preferences": {},
458 "artifact_name": "somestring",
459 "cdap_application_type": "program-flowlet",
460 "jar_url": "somestring",
461 "namespace": "somestring",
462 "program_preferences": [
464 "program_id": "somestring",
466 "program_type": "somestring"
469 "program_id": "somestring",
471 "program_type": "somestring"
476 "program_id": "somestring",
477 "program_type": "somestring"
480 "program_id": "somestring",
481 "program_type": "somestring"
486 "endpoint_method": "somestring",
487 "service_endpoint": "somestring",
488 "service_name": "somestring"
491 "endpoint_method": "somestring",
492 "service_endpoint": "somestring",
493 "service_name": "somestring"
496 "streamname": "somestring"
508 Type: :ref:`Application <d_2b315c86978b3cd8c6edfbe745f1afa2>`
512 .. code-block:: javascript
515 "appname": "somestring",
516 "connectionurl": "somestring",
517 "healthcheckurl": "somestring",
518 "metricsurl": "somestring",
519 "serviceendpoints": [
521 "method": "somestring",
525 "method": "somestring",
535 put was performed but the appname was already registered with the broker, or Invalid PUT body
542 PUT ``/application*/{appname}``
543 -------------------------------
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.)
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.
561 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
562 :widths: 20, 15, 10, 10, 10, 20, 30
564 appname | path | Yes | string | text | | Name of the application.
572 .. _d_d43078a75182938dccdbeac654cea43c:
579 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
580 :widths: 20, 10, 15, 15, 30, 25
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.
588 .. code-block:: javascript
591 "cdap_application_type": "hydrator-pipeline",
594 "artifact_extends_header": "somestring",
595 "artifact_name": "somestring",
596 "artifact_url": "somestring",
597 "artifact_version_header": "somestring",
598 "ui_properties_url": "somestring"
601 "artifact_extends_header": "somestring",
602 "artifact_name": "somestring",
603 "artifact_url": "somestring",
604 "artifact_version_header": "somestring",
605 "ui_properties_url": "somestring"
608 "namespace": "somestring",
609 "pipeline_config_json_url": "somestring",
610 "streamname": "somestring"
622 Type: :ref:`Application <d_2b315c86978b3cd8c6edfbe745f1afa2>`
626 .. code-block:: javascript
629 "appname": "somestring",
630 "connectionurl": "somestring",
631 "healthcheckurl": "somestring",
632 "metricsurl": "somestring",
633 "serviceendpoints": [
635 "method": "somestring",
639 "method": "somestring",
649 put was performed but the appname was already registered with the broker, or Invalid PUT body
656 PUT ``/application/{appname}/reconfigure``
657 ------------------------------------------
666 Reconfigures the application.
673 :header: "Name", "Located in", "Required", "Type", "Format", "Properties", "Description"
674 :widths: 20, 15, 10, 10, 10, 20, 30
676 appname | path | Yes | string | text | | Name of the application.
684 .. _d_2a32645bc6d3020744d3d17500c34bc3:
691 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
692 :widths: 20, 10, 15, 15, 30, 25
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
697 .. _i_6a9d9951a40bf655fda365aa310e1ddc:
706 .. code-block:: javascript
710 "reconfiguration_type": "program-flowlet-app-config"
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
734 .. _d_2b315c86978b3cd8c6edfbe745f1afa2:
736 Application Model Structure
737 ---------------------------
741 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
742 :widths: 20, 10, 15, 15, 30, 25
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
751 .. _d_5d4c5a47c1043833affa67eb27bf3d9d:
753 MetricsObject Model Structure
754 -----------------------------
756 key,value object where the key is 'appmetrics' and the value is an app dependent json and specified by the component developer
760 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
761 :widths: 20, 10, 15, 15, 30, 25
763 appmetrics | No | :ref:`appmetrics <i_6cb44a56118e2966acccfb86f18d0570>` | | |
765 .. _i_6cb44a56118e2966acccfb86f18d0570:
767 **Appmetrics schema:**
772 .. _d_2f6991f1775468c3ce48a2778455be93:
774 appname Model Structure
775 -----------------------
781 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
782 :widths: 20, 10, 15, 15, 30, 25
784 appname | No | string | | | an application name
786 .. _d_a151b00939024528c17a91cf47a4eae3:
788 appput Model Structure
789 ----------------------
793 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
794 :widths: 20, 10, 15, 15, 30, 25
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.
807 .. _i_13b2658afc25a955a6b4b48b9898c1a3:
809 **App_config schema:**
812 the application config JSON
816 .. _i_57297f6d8a6251aeb045f0872bf38d81:
818 **App_preferences schema:**
821 the application preferences JSON
825 .. _d_d43078a75182938dccdbeac654cea43c:
827 hydratorappput Model Structure
828 ------------------------------
832 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
833 :widths: 20, 10, 15, 15, 30, 25
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.
841 .. _d_c5aa8c778f283571705fbe7a21d0f5c7:
843 hydratordep Model Structure
844 ---------------------------
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)'
850 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
851 :widths: 20, 10, 15, 15, 30, 25
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.
859 .. _d_060ca512d6d771a97a7d0f50886f6b14:
864 some broker information
868 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
869 :widths: 20, 10, 15, 15, 30, 25
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 | | |
878 .. _d_c0830b0f8b495da06c2fef152ce05dba:
880 multideleteput Model Structure
881 ------------------------------
885 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
886 :widths: 20, 10, 15, 15, 30, 25
888 appnames | No | array of :ref:`appname <d_2f6991f1775468c3ce48a2778455be93>` | | |
890 .. _d_610742fa78204adc388d0f7fbe30ad61:
892 programpref Model Structure
893 ---------------------------
895 the list of programs in this CDAP app
899 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
900 :widths: 20, 10, 15, 15, 30, 25
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
906 .. _i_07225a64d44b62a92699f22d603b563c:
908 **Program_pref schema:**
911 the preference JSON to set for this program
915 .. _d_7bc8b39312a070aee5928f4e730192ae:
917 programs Model Structure
918 ------------------------
920 the list of programs in this CDAP app
924 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
925 :widths: 20, 10, 15, 15, 30, 25
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
930 .. _d_2a32645bc6d3020744d3d17500c34bc3:
932 reconfigput Model Structure
933 ---------------------------
937 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
938 :widths: 20, 10, 15, 15, 30, 25
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
943 .. _i_6a9d9951a40bf655fda365aa310e1ddc:
952 .. _d_5a28f16eed72be7d9a8279c0e1f05386:
954 returncode Model Structure
955 --------------------------
961 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
962 :widths: 20, 10, 15, 15, 30, 25
964 returncode | No | integer | | | an httpreturncode
966 .. _d_ad781f0dd64e16123fc1cbfefb4b9ded:
968 service_endpoint Model Structure
969 --------------------------------
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)
975 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
976 :widths: 20, 10, 15, 15, 30, 25
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
982 .. _d_e5edc5fd82a1190817cf350e70cb7e0e:
984 service_method Model Structure
985 ------------------------------
987 a URL and HTTP method exposed via a CDAP service
991 :header: "Name", "Required", "Type", "Format", "Properties", "Description"
992 :widths: 20, 10, 15, 15, 30, 25
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