Language Endpoints
In the context of our API, a language represents an entity.
Common Language Characteristics
-
Unique Identification: Each language has a unique identifier
idthat distinguishes them from other languages in the system. -
Language Data: A language has associated information such as name, iso (country code) and code.
Endpoints
GET/Language/getLanguage
Retrieve all Languages stored in the system.
Description
This endpoint retrieves a paginated list of languages from the system. It allows clients to get language data based on pagination parameters such as page number (page) and number of items per page (pageSize). The response includes detailed information about each language, including its ID, name, iso (country code), and code.
Parameters
| Name | Description | Type | Default Value |
|---|---|---|---|
page | Page number | Integer | 1 |
pageSize | Number of items per page | Integer | 10 |
Responses
JSON
{
"data": [
{
"id": "string",
"code": "string",
"iso": "string",
"name": "string"
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XML
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<code>string</code>
<iso>string</iso>
<name>string</name>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
Possible Response Errors
| Error | Response Status | Response Body |
|---|---|---|
| This error occurs when the database name is not registered. It indicates an internal server problem. | 500 | {"code": 500,"error": "This dbs name is not register"} |
| This error occurs when the system cannot insert or update records in the test database. | 500 | {"code": 500,"error": "Invalid connection name, you cannot insert in default"} |
| This error indicates that the server rejects the request. | 400 | {"code": 400,"error": "Bad Request"} |
| This error occurs when you are not authorized. | 401 | {"code": 401,"error": "Unauthorized."} |
| This error occurs when the Language could not be found. | 404 | {"code": 404,"error": "No entity found for Language."} |
| This error occurs when you try to send too many requests in a short period of time. | 429 | {"code": 429,"error": "Too Many Requests"} |