Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Artifact upload and listing:

In order to create applications with versions, the artifact jars (which contains CDAP application) needs to be uploaded first. Once an artifact is uploaded, an application can be created from it by optionally providing a configuration.

Uploading artifact

Code Block
themeEmacs
languagebash
POST /v3/namespaces/<namespace-id>/artifacts/<artifact-id> --data-binary @path/to/file-1.1.0.jar

           You You can view the information about artifacts deployed using the listing endpoint.  

Listing artifacts

Code Block
themeEmacs
languagebash
GET /v3/namespaces/<namespace-id>/artifacts 

 


Creating applications from artifacts:

REST call to create application from artifact

Code Block
themeEmacs
languagebash
POST /v3/namespaces/<namespace-id>/apps/<app-id>/versions/<version-id>/create Body:-d { "artifact": { "name": "WordCount", "version": "3.5.1", "scope": "user"}, "config": {"stream": "purchaseStream"} }
 

version-id: Needs to be composed only of alphanumeric, -, _ and . 

...

  • If a version-id is not specified during application creation, '-SNAPSHOT' is used as the application version
  •  If a version-id ends with '-SNAPSHOT', then that version is mutable and it can be updated using the update app endpoint (more details below). 

 

...

Starting/

...

Stopping programs of a particular version of an Application:

Code Block
themeEmacs
languagebash
POST /v3/namespaces/<namespace-id>/apps/<app-id>/versions/<version-id>/services/<service-id>/start

...

 
 
POST /v3/namespaces/<namespace-id>/apps/<app-id>/versions/<version-id>/services/<service-id>/stop


Note: We don't support concurrent runs of the same Flow and Worker across multiple versions. That is, flow F1 in v2 of app MyApp can't be started when flow F1 in v1 of app MyApp is running.

  •  How to delete a version of an Application:

    DELETE /v3/namespaces/<namespace-id>/apps/<app-id>/versions/<version-id> 

    Note: No program of this version should be running.

...