Skip to main content
Version: 1.0.0 (beta)

HTTP Status Codes

In addition to HTTP methods, HTTP response status codes are particularly important, as they are used to identify the success or failure of an operation

The Five Main Categories of Status Codes

The five main categories of status codes, identified by the first digit of the code, are:

1xx: Informational

The server informs the client that the request has been received and processing is in progress.

2xx: Success

The operation was successfully completed. The server has received, processed, and accepted the client input, and the user typically sees the requested web page or resource.

3xx: Redirection

The server receives the request, but additional actions and steps on the client side are required to complete it correctly, as there are forwards and redirects.

4xx: Client Error

This is the first category of errors: the request cannot be completed due to client-side issues, such as incorrect syntax or a removed page. The user sees an automatic HTML page indicating the error.

5xx: Server Error

This type of code indicates server-side problems that prevent the successful completion of an apparently valid request. The server error may be temporary or permanent, and the user also receives an HTML page indicating the issue.

Status Codes in TeamSystem Enterprise WebAPI

The codes handled in standard operations in the TSEnterprise WebAPI are:

200: Success

Operation succeeded; this is the standard and most common response when an operation is executed correctly.

201: Created

Resource created; used in the POST method to create a NEW resource.

202: Accepted

Request accepted; used, for example, when using asynchronous services and indicates that the request has been taken in charge.

204: No Content

The server successfully processed the request and will not return any content.

400: Bad Request

Operation failed; this is the standard and most common response in case of errors during the execution of the operation.

401: Unauthorized

Used exclusively in case of authentication errors.

403: Forbidden

In case of permission/authorization errors.

404: Not Found

If the resource is not found (for example, when performing a GET on a resource specifying a non-existent ID).

405: Method Not Allowed

In case of unsupported HTTP methods (for example, a PUT on a resource that only supports read operations).

409: Conflict

Mainly used in two cases:

  • To indicate the failure of a “Create,” “Update,” or “Delete” operation due to business logic (e.g., entity validation errors or business warnings).
  • To indicate an INVALID resource in “Validation” and “PropertyValidation” operations.

500: Internal Server Error

In case of unhandled errors during the execution of the request