Niels
June 18, 2020, 8:56am
#1
Hi all,
I am using docker to run ChirpStack. We use the Application Server API, but since we updated from LoRaServer to ChirpStack, the API gives a strange result.
API Call:
http://localhost:8080/api/network-servers
Result:
"error": "object does not exist",
"code": 5,
"message": "object does not exist",
"details": []
I am sure that there is at least one network server as the following API call still works:
http://localhost:8080/api/network-servers/1
Result:
"networkServer": {
"id": "1",
"name": "default-network-server",
"server": "chirpstack-network-server:8000",
"caCert": "",
"tlsCert": "",
"tlsKey": "",
"routingProfileCACert": "",
"routingProfileTLSCert": "",
"routingProfileTLSKey": "",
"gatewayDiscoveryEnabled": false,
"gatewayDiscoveryInterval": 0,
"gatewayDiscoveryTXFrequency": 0,
"gatewayDiscoveryDR": 0
}
"createdAt": "2020-06-11T13:42:28.548529Z",
"updatedAt": "2020-06-18T08:47:48.322773Z",
"version": "3.9.0",
"region": "EU868"
Does anyone know why the first API call gives this result?
Thanks in advance!
login first to get JWT token
Niels
June 18, 2020, 9:39am
#3
Hi eugenev,
I already got a JWT token (created in the new API menu in ChirpStack Application Server) and as you can see, the second API call has no problems.
I don’t think it is an authentication issue.
Edit:
BTW, If you dont add a JWT token the error is different.
Niels
June 18, 2020, 1:49pm
#5
@bconway
The documentation does not state that the ‘limit’ querystring parameter is required. To be sure, I just executed the following api request with postman:
http://localhost:8080/api/network-servers?limit=10&offset=0
With the same result:
{
“error”: “object does not exist”,
“code”: 5,
“message”: “object does not exist”,
“details”: []
}
Niels
June 24, 2020, 1:20pm
#6
Today I tried again and discoverd the following:
When I create an API key in the Chirpstack Application Server (1) and use this for the authentication (2) then the API returns an error (3).
When I create a JWT using the ‘http://localhost:8080/api/internal/login ’ endpoint, the same request returns the network servers:
It seems like that the API key created in the Chirpstack Application Server is not valid or working as expected. Can someone confirm this?
Niels
June 24, 2020, 1:28pm
#7
@brocaar Could this be a bug in the newly added ‘API keys’ feature in the Application Server?
Yes, that could be. Could you please create an issue at https://github.com/brocaar/chirpstack-network-server with the above info?
1 Like
Niels
July 1, 2020, 11:32am
#10
I created an issue here:
opened 02:05PM - 24 Jun 20 UTC
The issue is present in the latest release.
I have searched the issues of this repository and believe that this is...
Hopefully, someone can fix this.
1 Like