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

Implement GET /devices/:topic in JS Client Library #332

Open
davidraker opened this issue Jul 10, 2020 · 0 comments
Open

Implement GET /devices/:topic in JS Client Library #332

davidraker opened this issue Jul 10, 2020 · 0 comments

Comments

@davidraker
Copy link
Owner

Get routes matching a topic for devices for all connected platforms.

Note: Platform Device endpoints accept query parameters to refine their output, as described in the introduction to the Devices section.

Note: See the introduction to the Devices section for information on the use of topics.

Providing a partial topic returns all devices which share the given segements of the provided topic. Using a partial topic: /:campus/:building will produce the same dictionary as the response of GET /devices/ but with only the topics beginning with the segments :campus and :building.

Providing a full topic will usually produce a single result, except where more than one connected platform has the same topic, in which case the result will be the list of routes to that topic on each containing platform.

In the case where a device with the same topic appears on multiple platforms, the value for that topic in the result will be a list of routes where each element is the route to the device topic on on of the platforms where it appears.

Request:

  • Authorization: BEARER <jwt_token>

Response:

  • With valid BEARER token on success: 200 OK
    • Content Type: application/json
    • Body:
      {
          "<topic>": "/platform/:platform/devices/:topic",
          "<topic>": [
                      "/platform/:platform/devices/:topic",
                      "/platform/:platform/devices/:topic",
                     ]
          ...
      }
      
  • With valid BEARER token on failure: 400 Bad Request
    • Content Type: application/json
    • Body:
      {
          "error": "<Error Message>"
      }
      
  • With invalid BEARER token: 401 Unauthorized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant