Skip to content

Move device PATCH nested under accounts #104

Description

@briggySmalls

At the moment the REST API has the following endpoints:

v1/accounts/{accountId} [GET, OPTIONS, PATCH]
v1/devices/{deviceId} [OPTIONS, PATCH]
v1/auth [OPTIONS, POST]
v1/accounts/{accountId}/devices [GET, OPTIONS]

This is inconsistent, we read a user's devices by a GET on /accounts/{accountId}/devices but then update them (change the name) with a PATCH on /devices/{deviceId}.

The only person who's ever going to update a device is the user themselves. Nobody else is allowed to touch it, or even know about its existence.

The /devices/{deviceId} route should be moved to /accounts/{accountId}/devices/{deviceId}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions