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

Non RESTful calls in API #1134

Closed
amouat opened this issue Jul 27, 2015 · 3 comments
Closed

Non RESTful calls in API #1134

amouat opened this issue Jul 27, 2015 · 3 comments

Comments

@amouat
Copy link

amouat commented Jul 27, 2015

Hi,

I was just wondering about the /v1/agent/check/deregister/<checkId> endpoint (https://consul.io/docs/agent/http/agent.html#agent_check_deregister). It seems that it works via a normal GET request, which seems pretty non-RESTful to me. The major problem is that it is easy to hit such endpoints without realising you're about to change the system.

Was there a reason not to favour an API where services were deregistered by a DELETE request to a URL such as /v1/agent/services/<checkid>?

I feel like I'm missing something as I don't see any other issues about this.

@armon
Copy link
Member

armon commented Jul 27, 2015

This is an unfortunate legacy hangover, which we are forced to support for the life of the V1 API. Not much to be said or done about it at this point.

@amouat
Copy link
Author

amouat commented Jul 27, 2015

Fair enough, feel free to close. I was just surprised not to find a mention of this elsewhere.

Couldn't you support both DELETE and /deregister though?

@armon
Copy link
Member

armon commented Jul 27, 2015

We could, it would just add more complexity I feel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants