Upload an Application
This walkthrough takes you through how to upload the application. It will cover creating the archive and uploading the application through the web interface.
Make archive
The DCH hello world example application has an "assembly.py" script that will help make the application archive.
Archive structure
Below you see the file structure of the archive that makes up a DCH application.

briqlQueries.json (optional) - contains the briql query mapping - see Walkthrough Application: Create BRIQL query
frontend.json (optional)- is the instructions on how to set the application dashboard - see Walkthrough Application: Create Dashboard
recipe.json (required) - describes application and its data flow - see Walkthrough Application: Setup Recipe File
operators (optional) - contains the operators that are bundled with the application - see Walkthrough Application: Creating an operator
documents (optional) - contains the documents that are bundled with the application, like default settings or supporting data.
Build Archive with assembly script
The assembly script can be found in the hello world example repository and will make the archive for you based on your application folder. To learn more about the hello world example read this create application walkthrough. The script require the project structure of the hello world example to work. You can build with the operator bundled with the operator or you can skip the operator. See commands below.
$ python assembly.py # builds application folder to an archive of the specified version in the recipe file.
$ python assembly.py --no-operator # builds application folder but ignores the operators. Handy if there are no changes in the operator
The archives will be placed in the builds folder of your project. The archive will get the version from the recipe version property and is ready to for upload. Note that you won't be allowed to upload the same version twice, nor upload an application with a lower version than one that already exists for that application.
Upload archive through DCH
From the Manage Applications page, you will find the "Upload a New Application" button. Fill in the information about your application and chose the build to upload.



Upload archive through API
It is also possible to upload the application directly through the DCH API. You can use the DCH Swagger docs or using curl, like the example below.
$ curl -X 'POST' \
'https://dataclearinghouse.org/api/metis/v1/manage/application/recipes/[VENDOR_UID]' \
-H 'accept: application/json' \
-H 'X-Api-Key: [YOU_API_KEY]' \
-H 'Content-Type: multipart/form-data' \
-F 'recipeArchive=@dch_hello_world_0.0.1.tar.gz;type=application/gzip'
Last updated