...
Code Block |
---|
GET /packages/<package-name>/<version>/spec.json
ex: GET /packages/PurchaseExample/4.0.0/spec.json
{
"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.",
"version": "4.0.0",
"created": 1234567899,
"changelog": "fixed a small parsing bug",
"categories": [ "examples" ],
"dependencies": { },
"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"
}
]
}
]
} |
...
Code Block |
---|
GET /packages/sfdc-lead-dump/1.0.1/archive.tgzzip GET /packages/sfdc-lead-dump/1.0.1/archive.tgzzip.asc |
Based on the package spec, the UI can setup the relevant wizards and make the relevant CDAP calls to first create the plugin artifact, and next create the Hydrator pipeline.
...
Code Block |
---|
GET /packages/mysql-jdbc-driver/5.1.39/spec.json { "name": "mysql-jdbc-driver", "label": "MySQL JDBC Driver", "description": "JDBC Driver for MySQL databases.", "author": "MySQL", "org": "Oracle", "version": "5.1.39", "categories": [ "hydrator-plugins" ] "created": 1234567899, "actions": [ { "type": "create_artifact", "arguments": [ { "name": "scope", "value": "user" }, { "name": "name", "value": "mysql-connector-java" }, { "name": "version", "value": "5.1.39" }, { "name": "parents", "value": "system:cdap-data-pipeline[3.0.0,10.0.0]/system:cdap-data-streams[3.0.0,10.0.0]" }, { "name": "externalArchive" "value": "https://dev.mysql.com/downloads/file/?id=462849" }, { "name": "externalArchiveSignature", "value": "https://dev.mysql.com/downloads/gpg/?file=mysql-connector-java-5.1.39.zip.gz" }, { "name": "externalArchiveJar", "value": "mysql-connector-java-5.1.39-bin.zip.gzjar" }, { "name": "config", "value": "mysql-connector-java-5.1.39.json" // file in the archive containing parents and plugins } ] } ] } |
The UI also makes a call to get the spec signature to make sure it is valid:
...