Versions Compared

Key

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

...

Code Block
GET /namespaces/default/apps?artifactName=myapp&artifactVersion=1.0.0
[
  {
    "name": "purchaseDump",
    "description": "",   
    "artifactName": "myapp",
    "version": "1.0.0"
  }
]

Calls are made to stop running programs. Another call is then made to update the app:

Code Block
POST /namespaces/default/apps/purchaseDump/update -d '
{ 
  "artifact": {
    "name": "myapp",
    "version": "1.0.1"
  },
  "config": {
    "stream": "purchases",
    "table": "events" 
  }
}'

1.4 Rolling Back an Application

Actually, version 1.The config section is optional. If none is given, the previous config will be used. If it is given, it will replace the old config (no merging is done).

1.4 Rolling Back an Application

Actually, version 1.0.1 has a bug that's even worse and needs to be rolled back. The same update call can be made:

...

TypePathBodyHeadersDescription
GET/v3/namespaces/<namespace-id>/artifacts   
GET/v3/namespaces/<namespace-id>/artifacts/<artifact-name>  Get data about all artifact versions
POST/v3/namespaces/<namespace-id>/artifacts/<artifact-name>jar contents

Artifact-Version: <version>

Artifact-Plugins: <json of plugins in the artifact>

Add a new artifact. Version header only needed if Bundle-Version is not in jar Manifest. If both present, header wins.

Artifact plugins can be explicitly given as a header.

This is to support the use case of 3rd party classes used as plugins, such as jdbc drivers

GET/v3/namespaces/<namespace-id>/artifacts/<artifact-name>/versions/<version>  Get details about the artifact, such as what plugins and applications are in the artifact and properties they supportPUT/v3/namespaces/<namespace-id>/artifacts/<artifact-name>/versions/<version>/classeslist of classes contained in the jar This is required for 3rd party jars, such as the mysql jdbc connector. It is the equivalent of the .json file we have in 3.0
GET/v3/namespaces/<namespace-id>/artifacts/<artifact-name>/versions/<version>/extensions  

 

GET/v3/namespaces/<namespace-id>/artifacts/<artifact-name>/versions/<version>/extensions/<plugin-type>   
GET/v3/namespaces/<namespace-id>/artifacts/<artifact-name>/versions/<version>/extensions/<plugin-type>/plugins/<plugin-name>  

config properties can be nested now. For example:

Code Block
{
  "className": "co.cask.cdap.example.MyPlugin",
  "description": "My Plugin",
  "name": "MyPlugin",
  "properties": {
    "threshold": { "name": "thresh", "type": "int", "required": false },
    "user": { "name": "user", "type": "config", "required": true,
      "fields": {
        "id": { "name": "id", "type": "long", "required": true },
        "digits": { "name": "phoneNumber", "type": "string", "required": true }
      }
    }
  }
}
GET/v3/namespaces/<namespace-id>/appClasses   
GET/v3/namespaces/<namespace-id>/appClasses/<app-classname>   

...