chirpstack-application-server icon indicating copy to clipboard operation
chirpstack-application-server copied to clipboard

Cannot send REST request to /api/devices without applicationID

Open zakini opened this issue 4 years ago • 1 comments

  • [x] The issue is present in the latest release.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

What happened?

GET requests to /api/devices always result in a 500 response with the body:

{
  "error": "subject must be user",
  "code": 2,
  "message": "subject must be user",
  "details": []
}

What did you expect?

A 200 response with a list of devices

Steps to reproduce this issue

Steps:

  1. Send a request to /api/devices with a grpc-metadata-authorization header with a valid API token (no query params, no request body)
  2. Get a 500 response

Your Environment

Component Version
Application Server v3.16
Network Server v3.14

This was raised in #530 in this comment and @brocaar asked for a separate ticket but as far as I can tell that didn't get created. As mentioned in that comment, specifying an applicationID fixes the issue, but the API docs don't mention this param being required.

zakini avatar Sep 06 '21 18:09 zakini

send REST request to /api/devices without applicationID

Work from my side. tested two version.

~ # ./lora-app-server version
3.4.0
~ # ./lora-app-server version
3.3.1

liangyuanpeng avatar Dec 30 '21 12:12 liangyuanpeng