DeletedHistory Endpoints
To ensure data integrity in the context of our API, a history of deleted records is stored in the database. This is used to recover accidentally deleted records and keep track of data deletion operations.
Common DeletedHistory Characteristics
-
Unique Identification: Each entity of this type includes a unique identifier that distinguishes it from others.
-
Data included in Delete History: Entities of this type store information about the id of the deleted entity in the local
columnIdor remotecolumnIdRemotedatabase. It also stores the name of the table on which the delete operation was performedtableand the creation date of the delete recordcreatedAt. -
Entities with Delete History: Currently, all entities with endpoints that use the DELETE method are recorded in the system. For example, when deleting a company through the Delete Company method.
Endpoints
GET/DeletedHistory/getDeleted
Retrieves a list of all records in the deleted history in the database.
Description
Returns a paginated list of all existing records in the deleted history. The pagination options can be modified through the parameters described in the next point.
Parameters
| Name | Description | Type | Default Value |
|---|---|---|---|
page | Page number | Integer | 1 |
pageSize | Items per page | Integer | 10 |
Respuestas
JSON
{
"data": [
{
"id": "string",
"columnId": "string",
"columnIdRemote": "string",
"table": "string",
"createdAt": "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>
<columnId>string</columnId>
<columnIdRemote>string</columnIdRemote>
<table>string</table>
<createdAt>string</createdAt>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>
GET/DeletedHistory/updatedFrom
Retrieves a list of all records in the history of deletions in the database since the date provided in the parameters.
Description
Returns a paginated list of all existing records in the deleted history since the indicated date. The pagination and date options can be modified through the parameters described in the next point.
Parameters
| Name | Description | Type | Default Value |
|---|---|---|---|
date | Last updated date | String require | 1999-01-01 01:00:00 |
page | Page number | Integer | 1 |
pageSize | Items per page | Integer | 10 |
Responses
JSON
{
"data": [
{
"id": "string",
"columnId": "string",
"columnIdRemote": "string",
"table": "string",
"createdAt": "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>
<columnId>string</columnId>
<columnIdRemote>string</columnIdRemote>
<table>string</table>
<createdAt>string</createdAt>
</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 a connection to the database cannot be established. It is an internal server problem. | 500 | {"code": 500,"error": "Database connection failed."} |
| This error occurs when you cannot insert or update into the 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 indicates that the entity could not be found. | 404 | {"code": 404,"error": "No entity found for DeletedHistory with $id."} |
| This error occurs when you try to send too many requests in a short period of time. | 429 | {"code": 429,"error": "Too Many Requests"} |