Note: There is no way to get a login shell on the ScoutAM servers, but you can execute certain commands. Either via a RestAPI or using ssh.
RestAPI
- These examples use bash, curl, and jq, feel free to use the language of your choice
- To use the RestAPI you will need a TOKEN:
TOKEN=$(curl -s -k -H 'Accept: application/json' -H 'Content-Type: application/json' -X POST --data '{"acct":"'filestat'","pass":"'filestat'"}' https://hssrv2.dmawi.de:8080/v1/security/login | jq -r '.response')
- The token lifespan is 24 h and not client/server dependent
ssh hssrv2
- You can execute (some) commands on the ScoutAM servers using ssh hssrv2 <command>
Specific taks
filestat (e.g. online/offline)
- RestAPI
curl -s -k -H 'Accept: application/json' -H 'Content-Type: application/json' -H "Authorization: Bearer $TOKEN" -X GET https://hssrv2.dmawi.de:8080/v1/file?path="/hs/store"
Task | RestAPI | ssh hssrv |
---|---|---|
filestat |
|