# Overview

## Overview

Jfamerwork exposes the following APIs for developers to consume in their applications.

## Compatibility rules

### Input parameters

* Requests are compatible irrespective of the order in which the query parameters appear.
* Requests are compatible irrespective of the order in which the properties of the JSON parameters appear.
* New query parameters may be added to future versions of requests.
* Existing query parameters can’t be removed from future versions of requests.
* Existing properties can’t be removed from the JSON parameters in future versions of requests.

### JSON responses

* Responses are compatible irrespective of the order in which the properties appear.
* New properties may be added to future versions of the response.
* Existing properties can’t be removed from future versions of the response.
* Properties with null values may be omitted by responses.

## Media types

The API currently supports only JSON as an exchange format. Be sure to set both the `Content-Type` and Accept headers for every request as `application/json`.

## HTTP verbs

Where possible, the Jframework API strives to use appropriate HTTP verbs for each action.

<table><thead><tr><th width="169">Verb</th><th>Description</th></tr></thead><tbody><tr><td>GET</td><td>Used to retrieve objects.</td></tr><tr><td>POST</td><td>Used to create objects or perform custom actions.</td></tr><tr><td>PUT</td><td>Used to replace objects or collections.</td></tr><tr><td>DELETE</td><td>Used to delete objects.</td></tr></tbody></table>

## HTTP Code

The API uses standard HTTP status codes to indicate the success or failure of a request.

### Standard HTTP Status Codes

| Code | Meaning                                                  |
| ---- | -------------------------------------------------------- |
| 200  | OK - The request was successful.                         |
| 201  | Created - A new resource was created.                    |
| 204  | No Content - The request succeeded, no content returned. |
| 400  | Bad Request - The request was invalid.                   |
| 401  | Unauthorized - Authentication failed.                    |
| 403  | Forbidden - Access is not allowed.                       |
| 404  | Not Found - The resource was not found.                  |
| 405  | Method Not Allowed - HTTP verb not supported.            |
| 409  | Conflict - A conflict occurred (e.g. duplicate).         |
| 429  | Too Many Requests - Rate limit exceeded.                 |
| 500  | Internal Server Error - Unexpected server error.         |

## Pagination

Requests that return a list of objects may support pagination. Pagination is implemented using a cursor-based system, rather than traditional page numbers. The cursor is an opaque value (not interpretable by the client) and is specified using either the `pageNumber` or `pageSize` query parameter.

<table><thead><tr><th width="164">Param</th><th>Description</th></tr></thead><tbody><tr><td>pageNumber</td><td>Specifies the cursor for pagination. The value is opaque and client-specific.</td></tr><tr><td>pageSize</td><td>Specifies the number of items to return per page.</td></tr></tbody></table>

**Response Object**

The response object includes the following field:

* `totalItems`: The total number of items available across all pages.

## Errors

{% content-ref url="errors" %}
[errors](https://jframework.gitbook.io/developers/references/api-reference/errors)
{% endcontent-ref %}

## Rate Limiting

{% content-ref url="rate-limiting" %}
[rate-limiting](https://jframework.gitbook.io/developers/references/api-reference/rate-limiting)
{% endcontent-ref %}

## Authentication

{% content-ref url="authentication" %}
[authentication](https://jframework.gitbook.io/developers/references/api-reference/authentication)
{% endcontent-ref %}
