Skip to main content

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

  1. Unique Identification: Each entity of this type includes a unique identifier that distinguishes it from others.

  2. Data included in Delete History: Entities of this type store information about the id of the deleted entity in the local columnId or remote columnIdRemote database. It also stores the name of the table on which the delete operation was performed table and the creation date of the delete record createdAt.

  3. 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
NameDescriptionTypeDefault Value
pagePage numberInteger1
pageSizeItems per pageInteger10
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>

👉Try it out🌱

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
NameDescriptionTypeDefault Value
dateLast updated dateString require1999-01-01 01:00:00
pagePage numberInteger1
pageSizeItems per pageInteger10
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>

👉Try it out🌱

Possible Response Errors

ErrorResponse StatusResponse 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"}