I am using the following curl command which is fetching me the first available IP address from my subnet ID.
curl -k -v -u "myuser:password" https://mysolarwinds:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+TOP+1+STATUS,+DisplayName+FROM+IPAM.IPNode+WHERE+Status=2+AND+SubnetId=10
Output
* About to connect() to mysolarwinds port 17778 (#0)
* Trying mysolarwinds...
* Connected to mysolarwinds (mysolarwinds) port 17778 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
* subject: CN=SolarWinds-Orion
* start date: Nov 23 00:21:10 2017 GMT
* expire date: Dec 31 23:59:59 2039 GMT
* common name: SolarWinds-Orion
* issuer: CN=SolarWinds-Orion
* Server auth using Basic with user 'myuser'
> GET /SolarWinds/InformationService/v3/Json/Query?query=SELECT+TOP+1+STATUS,+DisplayName+FROM+IPAM.IPNode+WHERE+Status=2+AND+SubnetId=100 HTTP/1.1
> Authorization: Basic XYZW245R
> User-Agent: curl/7.29.0
> Host: mysolarwinds:17778
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 56
< Content-Type: application/json
< Server: Microsoft-HTTPAPI/2.0
< Date: Wed, 19 Dec 2018 13:06:40 GMT
<
* Connection #0 to host mysolarwinds left intact
{"results":[{"STATUS":2,"DisplayName":"10.248.1.10"}]}
Now what do I have to do to my above curl commad to mar the fetched IP address as reserved or used, so that next time when I run the above command it will fetch the second IP instead of he first one. Kindly assist me on this
Thanks and Regards,
Azhar