-
Notifications
You must be signed in to change notification settings - Fork 4
Module Upload
<< HTTP/SaaS API | Debugging >> |
---|---|
*** We are improving this documentation all the time. Please feel free to contribute!! *** |
After building a Component Module, you'll need to upload it to your account on WEAVE@cloud. To build/assemble the module, cd
into the module directory and execute the following command (remember, you need [Gradle](Component Module Dev Overview)):
$ gradle clean distZip
After this command completes, the module will have a distribution .zip
file located in the
target/distributions
folder e.g. if your component is called "myfunkyapp", the distribution .zip
file
would be target/distributions/myfunkyapp.zip
.
You now need to upload the assembled distribution .zip
file to your account on WEAVE@cloud. This is very easy. You just POST it to https://dev.foxweave.io/component, including your apiKey as a query parameter.
The following is an example using curl:
curl -X POST / -T target/distributions/myfunkyapp.zip / -H "Content-Type: application/zip" / https://dev.foxweave.io/component/myfunkyapp?apiKey=XXXXXX
As you can see from the above example, the target URL includes the module name plus the target account apiKey:
https://dev.foxweave.io/component/{module-name}?apiKey={account-api-key}
Your account API key can be found in your profile after logging into your account on WEAVE@cloud. Just follow "Settings->API" from the top menu bar.
Note that when you upload a module to WEAVE@cloud, it will:
- Only be visible/usable from your account i.e. other WEAVE@cloud accounts cannot use any of the components in your module. You will need to get in contact with us if you'd like to make the module public.
- Only be runnable on a PaaS or On-Premise. This is obviously for security reasons.
You don't want the trouble of building and uploading a full module distribution .zip file every time you make a change while you are developing a module. To avoid this, you can simply update and then PUT individual resources. For example, to update and PUT local changes to the foxweave-components.json module descriptor file:
curl -X PUT / -T src/main/resources/foxweave-components.json / -H "Content-Type: application/json" / https://dev.foxweave.io/component/myfunkyapp/foxweave-components.json?apiKey=XXXXXX
- If you spot a typo, please feel free to edit the wiki directly
- If you have have a longer contribution, please clone the wiki repo and submit a pull request
- For anything else... please contact Tom Fennelly