![]() |
This could work with other web requests. But for this particular article, I will be using the curl command. |
![]() |
Currently, the Gateway has no way to authenticate a Windows login. The gateway only supports HTTP basic access authentication for REST requests. (https://resources.itrsgroup.com/docs/geneos/current/Gateway_Reference_Guide/geneos_authentication_tr.html) |
![]() |
Requirements 1) Gateway version of GA3.7.0 or higher with restService enabled. We recommend that, when authentication is enabled, the REST service is restricted to run on secure connections only. 2) The curl command. |
Using the -u
option to include the username and password separated by a colon:
curl -u username:password -X POST -s --data '{ "command" : "/SNOOZE:severityTo", "target" : "/geneos/gateway[(@name=\"GatewayName\")]/directory/probe[(@name=\"ProbeName\")]/managedEntity[(@name=\"EntityName\")]", "args": { "1": "Some Snooze Comment", "2": 3, "4": 1 } }' http://localhost:7039/rest/runCommand
If you want to keep your password from being shown in your bash_history. You can simply just use the -u
option to include the username, and curl will prompt for a password. You should also be using a secure connection to the Gateway, as shown:
curl -u username -X POST -s --data '{ "command" : "/SNOOZE:severityTo", "target" : "/geneos/gateway[(@name=\"GatewayName\")]/directory/probe[(@name=\"ProbeName\")]/managedEntity[(@name=\"EntityName\")]", "args": { "1": "Some Snooze Comment", "2": 3, "4": 1 } }' https://localhost:7038/rest/runCommand
-
Tags:
Comments
0 comments
Please sign in to leave a comment.