Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTTP VervCRUDDescription
GETReadTo get a list of all the records.
PATCHUpdate/ModifyTo update a single record.
PUTCreateTo create a new record.
DELETEDeleteTo delete a single record.
POST
Universal method to get access to all console commands.

...

Code Block
languagepowershell
themeFadeToGrey
$ curl -k -u admin: https://10.155.101.214/rest/ip/address/*1
{".id":"*1","actual-interface":"ether2","address":"10.0.0.111/24","disabled":"false",
"dynamic":"false","interface":"ether2","invalid":"false","network":"10.0.0.0"}

If you want to return only specific properties, then append ?fields= to the end of the URL, followed by a comma-separated list of the needed properties. For example, to show only the address and if it's disabledIt is also possible to filter the output, for example, return only valid addresses that belong to the 10.155.101.0 network:

Code Block
languagepowershell
themeFadeToGrey
$ curl -k -u admin: "https://10.155.101.214/rest/ip/address?fields=address,disabled
network=10.155.101.0&dynamic=true"
[{".id":"*18","actual-interface":"ether2sfp12","address":"10.0155.0101.111214/24","disabled":"false",
"dynamic":"falsetrue","interface":"ether2sfp12","invalid":"false","network":"10.0155.0101.0"}]

If you want to return only specific properties, you can use a special filter 'fields', followed by the '=' and a lost of comma-separated properties. For example, to show only the address and if it's disabledIt is also possible to filter the output, for example, return only valid addresses that belong to the 10.155.101.0 network:

Code Block
languagepowershell
themeFadeToGrey
$ curl -k -u admin: "https://10.155.101.214/rest/ip/address?network=10.155.101.0&dynamic=true"fields=address,disabled
[{".idaddress":"*810.0.0.111/24","actual-interfacedisabled":"sfp12false"},{"address":"10.1550.1010.214109/24","disabled":"false",
"dynamic":"true","interface":"sfp12","invalid":"false","network":"10.155.101.0"}]

PATCH

This method is used to update a single record. Set PATCH call body as a JSON object which contains fields and values of the properties to be updated. For example, add a comment:

...