Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Should we formalize JSend for API responses? #63

Open
siemensikkema opened this issue Jul 11, 2017 · 1 comment
Open

Should we formalize JSend for API responses? #63

siemensikkema opened this issue Jul 11, 2017 · 1 comment

Comments

@siemensikkema
Copy link
Contributor

siemensikkema commented Jul 11, 2017

Looking into our API guidelines and wondering why we should return 200 + {"status": "ok"} when there is no data (eg. for DELETE) instead of using 204 with an empty body I found this (JSend).
The guidelines mostly already follow this (except for "ok" instead of "success"). It does not seem to be an official spec but "success" pops up everywhere I find it mentioned.

I see 3 options:

  • change nothing
  • mention JSend
  • mention JSend and change "ok" to "success"

What do you think?

@steffendsommer

@siemensikkema
Copy link
Contributor Author

Actually, looking into it a bit more there are many more differences. We don't always return a "status" value and we don't wrap our responses under a "data" key. Also error handling is different.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants