I
I
Igor2021-07-05 11:49:53
RESTful API
Igor, 2021-07-05 11:49:53

REST API which method / response code to choose?

Endpoint
/projects/{project_id}/users/{user_ids}/join

Example
/projects/1/users/1,2,3,4,5,6,7,8,9,10,/join

Designed to add a new member to the project, re-execution has no actual effect.

Which HTTP method to choose in this case.
What is the response code in case the changes had no effect.

The question arose out of a difference of opinion.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
user_of_toster, 2021-07-05
@user_of_toster

I would do PUT, 201 CREATED to add, 200 OK if no effect

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question