Skip to main content
added 10 characters in body; edited tags; edited title
Source Link
Glorfindel
  • 6.9k
  • 3
  • 22
  • 49

I wonder why StackExchange Why are Stack Exchange API methods named it like this when it made API

I'm curious about https://api.stackexchange.com/docs . I looked up and studied the naming convention to make a restREST api. I've seen that in the naming convention, don't use verbs and in the case of the http method, don't put them in the URI.

However, if you look at the code below, you can see that the delete of the http method is in the URI. Is there a reason why Ithey did this?
comments/{id}/delete

Also, if you look at the code below, is there a reason why the verb add was used at the end?
/posts/{id}/comments/add
As far as I'm concerned, since the http method POST is used, I think it's better to delete the add or use it as an addition.

Additional questions, is there a reason why you postPOST is used as the http method instead of deleting it on the answers/{id}/upvote/undo.

I'm not sure if it's right to leave this question here, but I'm leaving a question. You might think it's a silly question, but I'd really appreciate it if you could answer it.

I wonder why StackExchange named it like this when it made API

I'm curious about https://api.stackexchange.com/docs . I looked up and studied the naming convention to make a rest api. I've seen that in the naming convention, don't use verbs and in the case of the http method, don't put them in the URI.

However, if you look at the code below, you can see that the delete of the http method is in the URI. Is there a reason why I did this?
comments/{id}/delete

Also, if you look at the code below, is there a reason why the verb add was used at the end?
/posts/{id}/comments/add
As far as I'm concerned, since the http method POST is used, I think it's better to delete the add or use it as an addition.

Additional questions, is there a reason why you post the http method instead of deleting it on the answers/{id}/upvote/undo.

I'm not sure if it's right to leave this question here, but I'm leaving a question. You might think it's a silly question, but I'd really appreciate it if you could answer it.

Why are Stack Exchange API methods named like this

I'm curious about https://api.stackexchange.com/docs . I looked up and studied the naming convention to make a REST api. I've seen that in the naming convention, don't use verbs and in the case of the http method, don't put them in the URI.

However, if you look at the code below, you can see that the delete of the http method is in the URI. Is there a reason why they did this?
comments/{id}/delete

Also, if you look at the code below, is there a reason why the verb add was used at the end?
/posts/{id}/comments/add
As far as I'm concerned, since the http method POST is used, I think it's better to delete the add or use it as an addition.

Additional questions, is there a reason why POST is used as the http method instead of deleting it on the answers/{id}/upvote/undo.

I'm not sure if it's right to leave this question here, but I'm leaving a question. You might think it's a silly question, but I'd really appreciate it if you could answer it.

Source Link

I wonder why StackExchange named it like this when it made API

I'm curious about https://api.stackexchange.com/docs . I looked up and studied the naming convention to make a rest api. I've seen that in the naming convention, don't use verbs and in the case of the http method, don't put them in the URI.

However, if you look at the code below, you can see that the delete of the http method is in the URI. Is there a reason why I did this?
comments/{id}/delete

Also, if you look at the code below, is there a reason why the verb add was used at the end?
/posts/{id}/comments/add
As far as I'm concerned, since the http method POST is used, I think it's better to delete the add or use it as an addition.

Additional questions, is there a reason why you post the http method instead of deleting it on the answers/{id}/upvote/undo.

I'm not sure if it's right to leave this question here, but I'm leaving a question. You might think it's a silly question, but I'd really appreciate it if you could answer it.