REST-API issues while fetching events

Hello,

I’m very new to the LoraWAN topic and tried to achive following tasks:

  1. Setup a Chirpstack docker environment: OK
  2. Setup a Gateway DLOS8N-EC25: OK
  3. Join a LDS03A doorsensor: OK

Now I’m stuck at fetching the payload with curl over the REST-API. Following command I tried yet:

curl -X GET -H “Grpc-Metadata-Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9blablalabla” http://mmyserver.com:8090/api/devices/a84041e50188c89f

Answer:

{“device”:{“devEui”:“a84041e50188c89F”, “name”:“Door Sensor1”, “description”:“”, “applicationId”:“9d88519a-06ab-4d33-b45c-40ffae03e896”, “deviceProfileId”:“a034a954-cb07-40db-b22d-2a502088ed09”, “skipFcntCheck”:false, “isDisabled”:false, “variables”:{}, “tags”:{}, “joinEui”:“a840410000000101”}, “createdAt”:“2023-12-07T09:31:50.909702Z”, “updatedAt”:“2023-12-07T09:31:50.909702Z”, “lastSeenAt”:“2023-12-07T14:57:33.038634Z”, “deviceStatus”:{“margin”:8, “externalPowerSource”:false, “batteryLevel”:100}, “classEnabled”:“CLASS_C”}

So I can fetch the Device. But when I would like to fetch the sensor events (ChirpStack Application Server REST API)

curl -X GET -H “Grpc-Metadata-Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9blablalabla” http://mmyserver.com:8090/api/devices/a84041e50188c89f/events

This messages shows up:

{“code”:5, “message”:“Not Found”, “details”:}

With MQTT I can see that there are coming messages into the system
Does anyone know what I’m doing wrong?

Best Regards,
Martin

Looking at the output, you are using ChirpStack v4, which does not expose the events endpoint. Basically, since you should never use this endpoint for building integrations. It can change any time and it is only implemented to support the web-interface.

You should use one of the available integrations instead.

1 Like

This topic was automatically closed after 90 days. New replies are no longer allowed.