Web Services
This command is for advanced users wanting to directly access to the REST API of Mica server.
mica rest ws <CREDENTIALS> [OPTIONS] [EXTRA]
Arguments
Argument |
Description |
---|---|
|
Web service path, for instance: /user/xxx |
Options
Option |
Description |
---|---|
|
HTTP method: GET (default), POST, PUT, DELETE, OPTIONS. |
|
Accept header (default is application/json). |
|
Content-Type header (default is application/json). |
|
Pretty JSON formatting of the response. |
Credentials
Authentication is done by username/password credentials.
Option |
Description |
---|---|
|
Mica server base url. |
|
User name. User with appropriate permissions is expected depending of the REST resource requested. |
|
User password. |
Extras
Option |
Description |
---|---|
|
Show the command help’s message |
|
Verbose output |
Example
Get all the published studies visible to an anonymous user.
mica rest /studies -m GET -mk https://mica-demo.obiba.org -u anonymous -p password -a application/json -j
Add a new individual study document:
mica rest /draft/individual-studies -m POST -u administrator -p password -mk https://mica-demo.obiba.org -ct application/json < patate-study.json
Search all files of the draft version of a network:
mica rest /draft/files-search/network/some-network -m GET -mk https://mica-demo.obiba.org -u administrator -p password -a application/json -j