TOKEN=$(curl -u "<username>:<password>" -k -X GET "https://<hostname or ip address>:<port number>/security/user/authenticate?raw=true")
curl -k -X POST -d '{"name":"<agentname>"}' "https://<hostname or ip address>:<port number>/agents?pretty=true" -H "Content-Type:application/json" -H "Authorization: Bearer $TOKEN"
No comments:
Post a Comment