Versions Compared

Key

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

...

All APIs are relative to a base path. For example, cask.co/marketplace/v1. 

Note

This will become increasingly difficult to manage as CDAP evolves. We may soon need a service to search for packages, filtering on categories or filtering out packages that are incompatible with a specific version of cdap, etc.

List Categories

Code Block
GET /categories.json
[
  {
    "name": "examples",
    "label": "Examples",
    "description": "Example applications to get started with CDAP."
  },
  {
    "name": "use-cases",
    "label": "Use Cases",
    "description": "Common Use Cases."
  },
  ...
]

List Latest Version of all Packages

Code Block
GET /packages.json
[
  {
    "name": "PurchaseExample",
    "label": "Purchase History",
    "description": "Example Application demonstrating usage of flows, workflows, mapreduce, and services.",
    "author": "Cask",
    "org": "Cask Data Inc.",
    "latestVersionversion": "4.0.1",
    "categories": [ "examples" ]
  },
  {
    "name": "HelloWorld",
    "label": "Hello World",
    "description": "Simple application demonstrating usage of flows and services.",
    "author": "Cask",
    "org": "Cask Data Inc.",
    "latestVersionversion": "4.0.10",
    "categories": [ "examples" ]
  },
  ...
]

List Latest Version of all Packages in a Category

Code Block
GET /packages-<category>.json
ex: GET /packages-examples.json
[
  {
    "name": "PurchaseExample",
    "label": "Purchase History",
    "description": "Example Application demonstrating usage of flows, workflows, mapreduce, and services.",
    "author": "Cask",
    "org": "Cask Data Inc.",
    "latestVersionversion": "4.0.1",
    "categories": [ "examples" ]
  },
  {
    "name": "HelloWorld",
    "label": "Hello World",
    "description": "Simple application demonstrating usage of flows and services.",
    "author": "Cask",
    "org": "Cask Data Inc.",
    "latestVersionversion": "4.0.10",
    "categories": [ "examples" ]
  },
  ...
]

List Package Versions

Code Block
GET /packages/<package-name>/versions.json
ex: GET /packages/PurchaseExample/versions.json
[
  {    
    "versionname": "4.0.1PurchaseExample",
    "createdlabel": 1234567899"Purchase History",
    "changelogdescription": "fixedExample aApplication smalldemonstrating parsingusage bug"of flows, workflows, }mapreduce, and  {services.",
    "author": "Cask",
    "org": "Cask Data Inc.",
    "version": "4.0.0"1",
    "categories": [ "examples" ],
    "created": 12345678901234567899,
    "changelog": "updated APIs to work with CDAP 4.0.0"
  },
  ...
]

...

fixed a small parsing bug",
    "dependencies": {
      "cdap": {
        "minVersion": "4.0.0",
        "maxVersion": "4.1.0"
      }
    }
  },
  {    
    "name": "PurchaseExample",
    "label": "Purchase History",
    "description": "Example Application demonstrating usage of flows, workflows, mapreduce, and services.",
    "author": "Cask",
    "org": "Cask Data Inc.",
    "categories": [ "examples" ],
    "version": "4.0.0",
    "created": 1234567890,
    "changelog": "updated APIs to work with CDAP 4.0.0",
    "dependencies": {
      "cdap": {
        "minVersion": "4.0.0",
        "maxVersion": "4.1.0"
      }
    }
  },
  ...
]

Get Package Archive

Code Block
GET /packages/<package-name>/<version>/archive.zip
ex: GET /packages/PurchaseExample/4.0.1/archive.zip
[ binary archive contents] 

Get Package Archive Signature

Code Block
GET /packages/<package-name>/<version>/archive.zip.asc
ex: GET /packages/PurchaseExample/4.0.1/archive.zip.asc
[ archive signature ] 

Get Package Spec

Code Block
GET /packages/<package-name><package>/<version>/archivespec.zipjson
ex: GET /packages/PurchaseExample/4.0.1/archivespec.zipjson
[{
binary archive contents] 

Get Package Archive Signature

Code Block
GET /packages/<package-name>/<version>/archive.zip.asc
ex: GET /packages/PurchaseExample/4.0.1/archive.zip.asc
[ archive signature ] 

Get Package Spec

Code Block
GET /packages/<package>/<version>/spec.json
ex: GET /packages/PurchaseExample/4.0.1/spec.json
{
  "spec-version": "1.0 "spec-version": "1.0",
  "name": "PurchaseExample",
  "label": "Purchase History",
  "description": "Example Application demonstrating usage of flows, workflows, mapreduce, and services.",
  "author": "Cask",
  "org": "Cask Data Inc.",
  "nameversion": "PurchaseExample4.0.1",
  "labelcreated": "Purchase History"1234567899,
  "descriptionchangelog": "Examplefixed Applicationa demonstratingsmall usageparsing ofbug",
flows, workflows, mapreduce, and services." "categories": [ "examples" ],
  "authordependencies": "Cask",{
    "orgcdap": "Cask{
  Data Inc.",   "versionminVersion": "4.0.10",
      "maxVersion": "created4.1.0":
1234567899,   "changelog": "fixed a small parsing bug"
   }
  },
  "actions": [
    {
      "type": "create_artifact",
      "arguments": [
        {
          "name": "name",
          "value": "PurchaseHistoryExample"
        },
        {
          "name": "version",
          "value": "4.0.1"
        },
        {
          "name": "scope",
          "value": "user"
        },
        {
          "name": "jar",
          "value": "PurchaseHistoryExample-4.0.1.jar"
        }
      ]
    },
    {
      "type": "create_app",
      "arguments": [
        {
          "name": "name",
          "default": "PurchaseHistory"
        }
      ]
    }
  ],
  "dependencies": {
    "cdap": {
      "minVersion": "4.0.0",
      "maxVersion": "4.1.0"
    }
  }
}

Get Package Spec Signature

...