Retrieve Count of Devices

get

/iot/api/v2/devices/count

Retrieve devices count. This request supports querying device. That allows retrieving count of the devices by various filters

Request

Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : RecordsCount_receive
Type: object
Show Source

400 Response

Bad Request. The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

401 Response

Unauthorized. The request requires user authentication.

406 Response

Request Not Acceptable. The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.
Back to Top

Examples

curl -X GET 
   -u <username>:<password>
   http://iotserver/iot/api/v2/devices/count

Example of Response Body

The following example shows the content of the response body in JSON format


{
"count":2,
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
]
}



Complete cURL Example

The following example shows compete cURL comand that can be used to perform described operation

curl -X GET 
   -u <username>:<password>
   http://iotserver/iot/api/v2/devices/count



Note that in the request, http://iotserver will be replaced by the name and port of your assigned IoT Cloud Service instance. The format of the Cloud Service instance is https:// myinstance-myidentitydomain.iot.us.oraclecloud.com and the default port is 443.
Back to Top