REST API access: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Using this function, you can manage the system remotely using the Representational State Transfer (REST). For authentication HTTP Basic authentication (BA) is used. | Using this function, you can manage the system remotely using the Representational State Transfer (REST). For authentication HTTP Basic authentication (BA) is used. | ||
Options to set: | Options to set: | ||
*Port | *'''Port''' | ||
The default port is 82. You cannot indicate ports already in use. | The default port is 82. You cannot indicate ports already in use. | ||
*Username | *'''Username''' | ||
Authentication user name. Default is “'''admin'''”. | Authentication user name. Default is “'''admin'''”. | ||
*Password | *'''Password''' | ||
Password used for authentication. | Password used for authentication. | ||
*Confirm password | *'''Confirm password''' | ||
Please retype your new password | Please retype your new password | ||
| Line 25: | Line 27: | ||
curl -X GET -u '''admin:mypassword''' -i -k -H "Content-type: application/json" https://'''ip_address:port'''/api/v3/product | curl -X GET -u '''admin:mypassword''' -i -k -H "Content-type: application/json" https://'''ip_address:port'''/api/v3/product | ||
<br/>- for PUT request: | |||
- for PUT request: | |||
curl -X PUT -u '''admin:password''' -i -k -H "Content-Type: application/json" -d '{"ip_address": "121.123.123.123", "enabled": true, "port": 1, "protocol": "udp"}' https://'''ip_address:port'''/api/v3/services/remote-logging | curl -X PUT -u '''admin:password''' -i -k -H "Content-Type: application/json" -d '{"ip_address": "121.123.123.123", "enabled": true, "port": 1, "protocol": "udp"}' https://'''ip_address:port'''/api/v3/services/remote-logging | ||
Revision as of 12:04, 15 March 2019
Using this function, you can manage the system remotely using the Representational State Transfer (REST). For authentication HTTP Basic authentication (BA) is used.
Options to set:
- Port
The default port is 82. You cannot indicate ports already in use.
- Username
Authentication user name. Default is “admin”.
- Password
Password used for authentication.
- Confirm password
Please retype your new password
Below examples of requests using curl command:
- for GET request:
curl -X GET -u admin:mypassword -i -k -H "Content-type: application/json" https://ip_address:port/api/v3/product
- for PUT request:
curl -X PUT -u admin:password -i -k -H "Content-Type: application/json" -d '{"ip_address": "121.123.123.123", "enabled": true, "port": 1, "protocol": "udp"}' https://ip_address:port/api/v3/services/remote-logging