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 DELETE /devices/:topic in Python Client Library #338

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

Implement DELETE /devices/:topic in Python Client Library #338

davidraker opened this issue Jul 10, 2020 · 0 comments

Comments

@davidraker
Copy link
Owner

Resets the value of the specified point(s) and returns its new value(s) and meta-data.

Note: 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.

If an attempt is made to set a point which is not writable, the response will be 405 Method Not Allowed.

If the request uses partial topics and/or query parameters to select more than one point to set, the query parameter write-all must be set. If write-all is not set, the request will fail with 405 Method Not Allowed. The request will also fail unless all writes are successful, and any points which would otherwise be set will be reverted to their previous value.

Request:

  • Authorization: BEARER <jwt_token>

Response:

  • With valid BEARER token on success: 200 OK
    • Content Type: application/json
    • Body:
      {
          "value": <new_value>,
          "meta": <meta_data>       
      }
      
  • With valid BEARER token if any point is not writable: 405 Method Not Allowed:
    • Conent Type: application/json
    • Body:
      {
          "error": "<Error Message indicating unwritable points>"
      }
      
  • With valid BEARER token on any other 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