Skip to content

Commit

Permalink
Documenting STATUS codes (#7693)
Browse files Browse the repository at this point in the history
* Documenting STATUS codes

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>

* Trying for a fix to show API doc changes

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Updated

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>

* Fixes for documentations

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>

* Error Fixes

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>

* Reformatting the document to list only the error codes

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Changing the Status code section header

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Fixing review comments

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

* Adding the missed json file

Signed-off-by: Kallol Roy <kallol.roy@progress.com>

---------

Signed-off-by: Pappu Kumar <pappu.kumar@progress.com>
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Co-authored-by: Kallol Roy <kallol.roy@progress.com>
  • Loading branch information
daveaugustus and kalroy committed Feb 6, 2023
1 parent fc421cd commit 42ea6f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,17 @@ info:
The Chef Automate documentation covers policies, authentication, and authorization in greater detail.
* **[API Tokens](https://automate.chef.io/docs/api-tokens/)** explains authentication in Chef Automate.
* **[Authorization Overview](https://automate.chef.io/docs/iam-v2-overview)** explains authorization in Chef Automate.
# Status Codes
| Status Code | Name | Description | Remark |
|-------------|-----------------------|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 200 | OK | Correct Id, Auth token and JSON body | The API worked as expected. |
| 400 | Bad Request | Wrong JSON body | The JSON body contains a key or value missing, sometimes when there is no JSON request passed. In some APIs like `IAM Project Rules`, the API request body validation is given the highest preference. And will return this error even before the Auth token validation. |
| 401 | Unauthorized | Wrong Auth token | Wrong or no auth token provided. |
| 403 | Forbidden | Unauthorized access to Resources | Unauthorised Resource ID is passed to the API. The error is returned in case of no Auth token is passed for some APIs like `Node Export` and `ReportExport`. |
| 404 | Not Found | Wrong Id in URL | Wrong or no Id while creating, updating, retrieving, or deleting resources. |
| 409 | Conflict | Existing id | Existing resource id provided while creating resources. |
| 405 | Method Not Allowed | Server does support the method | Server knows the request, but unfortunately, the target resource does not have a method to serve the request. |
| 500 | Internal Server Error | Server encountered error | Generic status code returned while processing an invalid request or server logics. |
| 503 | Service Unavailable | Server is down or unable to serve | Generic status code returned when the server gets too busy or into an unserviceable state. This can be because of overwhelming requests like calling `Bulk Delete Nodes by Filter` without JSON body. |

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 42ea6f9

Please sign in to comment.