# Fetch paginated records

Retrieves a paginated list of records. If a preview type is specified in the request, returns records formatted for preview; otherwise, returns full record details.

Endpoint: POST /api/v2/records/index
Version: 2.0
Security: Bearer Authentication

## Query parameters:

  - `parse` (boolean)
    If set to 'true', records are parsed to human-readable values (for example, unix timestamps are formatted as dates).

  - `archived` (boolean)
    When 'true', archived records are returned instead of active records. Defaults to 'false'.

  - `relatedRecordUuid` (string)
    UUID of a record used for relation-aware filtering. If supplied and the request body contains a filter, that filter will be smartened based on this related record. If no filter is supplied, a default filter will be applied that returns all records related in any way (any relation) to this record.

  - `recordReturnFormat` (string)
    Format of the records to return. LEGACY, USER_FRIENDLY, EXPANDED.

## Request fields (application/json):

  - `page` (integer)
    The page index (one-based) to request.
    Example: 1

  - `limit` (integer)
    The number of records to retrieve per page.
    Example: 10

  - `filter` (object)
    Filters applied to the query.

  - `filter.groups` (array)
    A collection of filter groups.

  - `filter.groups.items` (object)
    A set of filter items included in the group.

  - `filter.groups.items.object` (string)
    The name of the object to which this pagination item belongs.
    Example: "User"

  - `filter.groups.items.relation` (string)
    The relationship between objects.
    Example: "hasProperty"

  - `filter.groups.items.property` (string)
    The name of the property within the object.
    Example: "email"

  - `filter.groups.items.relationIncluded` (boolean)
    Specifies whether the relation is included.
    Example: true

  - `filter.groups.items.operator` (string)
    Defines the operator used in the filter. Available operators are defined in the API documentation.
    Example: "EQUALS"

  - `filter.groups.items.value` (any)
    Represents the value to filter against.
    Example: 12345

  - `filter.groups.items.smartContent` (boolean)
    When true, filter fields contain smart content placeholders resolved at runtime.
    Example: true

  - `sort` (array)
    Sorting options for the query.

  - `show` (array)
    Specifies what data to show in the response.

  - `query` (string)
    A free-text search query applied to the records.
    Example: "keyword"

  - `preview` (string)
    Preview information for the records, if supported.
    Example: "summary preview"

  - `mainObject` (string)
    The main object for categorization or context.
    Example: "user"

  - `column` (string)
    The column to group the records by.
    Example: "open"

## Response 200 fields (application/json):

  - `message` (string)
    A message detailing the result of the operation.
    Example: "Success"

  - `data` (array)
    The data returned in the current page of the pagination.
    Example: [{"id":1,"name":"Item1"},{"id":2,"name":"Item2"}]

  - `total` (integer)
    The total number of items available.
    Example: 100

  - `page` (integer)
    The current page number (starts from 1).
    Example: 1

  - `perPage` (integer)
    The number of items displayed per page.
    Example: 10

  - `lastPage` (integer)
    The last page number available for the pagination.
    Example: 10

## Response 400 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (object)
    A list of error types providing further details about the error.
    Example: [{"field":"name","message":"Name is required.","correctionSuggestion":"Please provide a name."}]

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)

## Response 500 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (object)
    A list of error types providing further details about the error.
    Example: [{"field":"name","message":"Name is required.","correctionSuggestion":"Please provide a name."}]

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)


