brocaar / chirpstack-application-server

ChirpStack Application Server is an open-source LoRaWAN application-server.
https://www.chirpstack.io
MIT License
502 stars 325 forks source link

GET /api/service-profiles #530

Closed noppsi closed 3 years ago

noppsi commented 4 years ago

What happened?

Hello

As soon as I use the ChirpStack Application Server REST API and use the URL "/api/service-profiles" to get a list of all service profiles I always get an error message. I tested it on two existing and one newly installed Chirpstack server and always got the same output. I also tried to give the Parameters "?limit=10&offset=0&organizationID=1" but it dident make any change.

Thank you

What did you expect?

Somthing like this:

{
  "result": [
    {
      "createdAt": "2020-09-06T18:23:42.694Z",
      "id": "string",
      "name": "string",
      "networkServerID": "string",
      "networkServerName": "string",
      "organizationID": "string",
      "updatedAt": "2020-09-06T18:23:42.694Z"
    }
  ],
  "totalCount": "string"
}

Steps to reproduce this issue

Steps:

  1. Call the API URL "http://{ip-adress}:8080/api/service-profiles" (and over the thes site http://{ip-adress}:8080/api#!/ServiceProfileService/List)
  2. It answers the error

Could you share your log output?

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

Your Environment

Component Version
Application Server v3.12.1
Network Server v3.10.0
Gateway Bridge v3.9.2
jskillen commented 4 years ago

Do let me know if you want me to open another ticket.

This also occurs when using the api to enumerate the network servers at the /api/network-servers endpoint when using an API key.

Safrone commented 4 years ago

I also face this issue on listing devices /api/devices/

It seems like when you have an api key it requires you to specify which application to query against even though it should be an optional filter

brocaar commented 3 years ago

Sorry for the late follow-op @Safrone, but please create a separate issue for this :) This issue has been solved with #532.