You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, the message indicates to developer / user has to input his credentials.
An API has to use the status code HTTP which is standard (200 / 201 : creating, 200 : patching, 409 : One request is in conflict with the current state of server ;
And so on.
I don't have skills to know everything. But I know it's very important to structure APIs if we use them.
For example of my response after creating a project space :
After propositions by @StCyr in this PR : #72 .
He would like to add
/api/<resource>
in the route.But, for developers it can be misleading. Because, in a HTTP response we can have ;
For examples :
This here a Jira Cloud Platform's creating issue API : https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post-responses . We can see there is a
status
code to do if the resource is created or not. But also, there is the different message according to HTP response.In an API, we have to send a message to developer / user to guide him. This here an example a response GitHub's API to create a project :
Here, the message indicates to developer / user has to input his credentials.
An API has to use the status code HTTP which is standard (
200
/201
: creating,200
: patching,409
: One request is in conflict with the current state of server ;And so on.
I don't have skills to know everything. But I know it's very important to structure APIs if we use them.
For example of my response after creating a project space :
Here I write the
statuscode
to root of json.Maybe it's very interesting to write as it :
What do you think ?
How to build our structure API ?
The text was updated successfully, but these errors were encountered: