Skip to content

[RFC] Modify "Archive users not In discord" API endpoint name #149

@manish591

Description

@manish591

Summary

The API that deals with updating the Archived role to true if the user is not in our discord was put under the PATCH /users endpoint with a request body differentiating it from the previous API that exists for the same route.

But, this API is not following the best API naming convention as it is not representing the resources it is modifying correctly.

This RFC aims at finding the API name that follows a better API naming convention.

Description

We have created a new API that will mark all the users Archived that are not in our discord i.e. set the archived=true for users that have in_discord=false.

Initially, the API name was PATCH /users/update-archived. As this is not correct because the verb is defined by the action PATCH so adding update in the endpoint is not correct.

Then, possible route names are proposed.

  1. PATCH /users/archived
  2. PATCH /users/archivedUsers

As in these routes archived is not representing a resource another solution proposed was,

Put the API under PATCH /users by defining the proper body. This is the current implementation.

Here is the API contact: https://github.com/Real-Dev-Squad/website-api-contracts/tree/main/users#patch-users

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions