List all endpoints for a gateway

The list all endpoints for a gateway request allows the client applications to retrieve a list of all device serial numbers that are connected to a particular gateway by specifying the startOffset and endOffset values. It also allows the client application to retrieve the count of all devices that are connected to the specified gateway by setting the startOffset and endOffset values to 0.

List all endpoints for a gateway describes the structure of the API.

Table 1. List all endpoints for a gateway
Title List all endpoints for a gateway
URL http://<impact_url>/m2m/endpoints/gateway/{GatewaySerialNumber}?startOffset=<>&endOffset=<>
Method GET
Content-Type application/json
URL Params

The URL parameters are:

  • GatewaySerialNumber:[string]: Indicates the serial number of the gateway device. This is a mandatory parameter.

  • startOffset:[integer]: Offset specifying the first element of the endpoints list to retrieve. This is a mandatory parameter.

  • endOffset:[integer]: Offset specifying the last element of the endpoints list to retrieve that is connected to gateway. This is a mandatory parameter.

Data Params

None

Success Code
Response Code: 200
Error Code
401 : Unauthorized 
403 : Forbidden 
404 : Not Found
Sample Call Curl:
curl -X GET --header 'Accept: application/json'  --header 'Authorization: Basic YXJhdmludGg6VGVzdEAxMjM=' 'http://mfussip02.iot.nokia.com:9090/m2m/endpoints/gateway/636768664677774?startOffset=1&endOffset=10'

Response

{"impactGWId":"636768664677774",
"startOffset":1,
"endOffset":10,
"connectedEndpoints":["DEVKIT_779"],
"totalDevices":1}
Notes

With this request, client applications can also retrieve the total number of devices linked to a particular gateway by setting the startOffset and endOffset parameters to 0. In this case, IMPACT IoT does not return any device serial number.

Example:

{"impactGWId":"636768664677774",
"startOffset":0,
"endOffset":0,
"totalDevices":1}