-
Notifications
You must be signed in to change notification settings - Fork 100
[HOW TO] Register a plugin via the REST API
Jorge edited this page Apr 18, 2024
·
5 revisions
- Get the plugin representation JSON file by running a container from the plugin's docker image
- Edit the JSON file by adding the
name
anddock_image
keys and their values to the JSON dictionary - An admin user (like
chris
) uploads the JSON file to CUBE through a POST request to the admin API/chris-admin/api/v1/
For instance, using the httpie client and assuming that the ChRIS service is running at localhost:8000
:
1.Get the plugin representation:
mkdir ~/plugin_json_files
docker run --rm fnndsc/pl-dircopy dircopy --json > ~/plugin_json_files/pl-dircopy.json
-
Add
"name": "pl-dircopy", "dock_image": "fnndsc/pl-dircopy"
key-value pairs to the JSON dictionary -
Upload the JSON file to CUBE:
http -a chris:chris1234 -f POST http://localhost:8000/chris-admin/api/v1/ fname@~/plugin_json_files/pl-dircopy.json compute_names='host' Accept:application/vnd.collection+json