Keywords:
It is possible to use a token instead of user/password combination. However, the token is valid for 7 days only.
It works in two steps: 1) fetch a token from the API and 2) pass that token to gemma-client using the --bearer parameter.
Here is an example showing how to request the token. HTTPie was used when constructing this article, Curl, postman etc., should also work.
$ http --verify=no --print=b POST https://<SImA_server>/api/1.1/authentication/tokenuserName=<username> password=<password>
{
"token": "aade1b86-9404-4392-9c73-272a918d7f7e",
"urls": [
"/api/1.0/import/*"
]
}
...
Example Commands
$ gemma-client upload --no-verify --hostname <IP_address> --bearer aade1b86-9404-4392-9c73-272a918d7f7e <Screen_UUID> "<Import_format>" <path_to_import_data>
$ gemma-client upload --no-verify --hostname 192.168.0.10 --bearer aade1b86-9404-4392-9c73-272a918d7f7e 6ff75aee-a39a-11ec-8619-02420a000544 "Harmony IDX/TIF" /tmp/import_data
Comments
0 comments
Article is closed for comments.