Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add Device Profile without knowing Regions? #16

Open
lorenwest opened this issue Oct 1, 2023 · 1 comment
Open

How to add Device Profile without knowing Regions? #16

lorenwest opened this issue Oct 1, 2023 · 1 comment

Comments

@lorenwest
Copy link

lorenwest commented Oct 1, 2023

The POST device-profile API has a regions element, but there is no API for listing regions. The ListRegions GRPC call appears to be an internalService (hidden).

What value can I supply in the region parameter for adding a device-profile in a particular ChirpStack install?

@lorenwest
Copy link
Author

I needed the same thing, and found a list of available regions in the properties object of the ListGateways GRPC call. Here's an example response using the JSON api. You could cycle through the regions in the result to get the full list, then sort -u to get the unique list.

{
  "totalCount": 1,
  "result": [
    {
      "tenantId": "5bd0463e-403f-4cf5-bd75-236e47ee6410",
      "gatewayId": "00005813d3165d7f",
      "name": "Browan",
      "description": "",
      "location": {
        "latitude": 0,
        "longitude": 0,
        "altitude": 0,
        "source": "UNKNOWN",
        "accuracy": 0
      },
      "properties": {
        "region_common_name": "US915",
        "region_config_id": "us915_1"
      },
      "createdAt": "2024-02-29T20:32:48.108102Z",
      "updatedAt": "2024-02-29T20:32:48.108102Z",
      "lastSeenAt": "2024-03-05T04:55:49.633266Z",
      "state": "ONLINE"
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant