Closed SeWaS closed 3 years ago
Using chirpstack-as 3.17.2. We have two gateways in the network. When calling /api/gateways this is the response:
/api/gateways
{ "totalCount": "2", "result": [] }
Swagger docs indicate the following response model:
{ "result": [ { "createdAt": "2021-10-14T10:44:32.039Z", "description": "string", "firstSeenAt": "2021-10-14T10:44:32.039Z", "id": "string", "lastSeenAt": "2021-10-14T10:44:32.039Z", "location": { "accuracy": 0, "altitude": 0, "latitude": 0, "longitude": 0, "source": "UNKNOWN" }, "name": "string", "networkServerID": "string", "networkServerName": "string", "organizationID": "string", "updatedAt": "2021-10-14T10:44:32.039Z" } ], "totalCount": "string" }
I don't expect the list "result" to be empty. Works when querying api/gateways/{id}, by the way.
"result"
api/gateways/{id}
Steps:
Create API key with is_admin=true
is_admin=true
Call
curl -X GET --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: Bearer <API_TOKEN>' 'https://<CHIRPSTACK_AS_HOST>/api/gateways'
Result will be as described above
Figured out that you just have to set a limit which is big enough. Leaving it empty is the same as limit=0. Will close that issue
limit
limit=0
What happened?
Using chirpstack-as 3.17.2. We have two gateways in the network. When calling
/api/gateways
this is the response:What did you expect?
Swagger docs indicate the following response model:
I don't expect the list
"result"
to be empty. Works when queryingapi/gateways/{id}
, by the way.Steps to reproduce this issue
Steps:
Create API key with
is_admin=true
Call
Result will be as described above
Could you share your log output?
Your Environment