> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datanumia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the execution status of all indexes jobs

> Returns a list of **jobs** between two dates, with their **state** and an overview of the OK/KO operations
Results are paginated.

**State** | Description
---------|----------
**SUBMITTED**  | The archive is received but processing has not started. 
**IN_PROGRESS**  | The archive is being processed. 
**DONE**  | Archive processing is completed without errors. 
**ERROR**  | Archive processing is completed but has encountered at least one functional or internal error. The details are available in the detailed report. Actions on the customer's side are necessary to correct them and resend the corresponding contracts.
**INTERNAL_ERROR**  |  Archive processing was interrupted due to a series of internal errors that occurred while processing a JSON file. Datanumia requires intervention to correct these errors. 
**DELETED** | Archive has been deleted (occurs 60 days after processing). Detailed status report is no more available.



## OpenAPI

````yaml /api-reference/indexes-collect-api.yaml get /indexes-collect-jobs
openapi: 3.0.3
info:
  title: Indexes collect lifecycle
  description: |
    This API manages the indexes collection.
  contact:
    email: api@datanumia.com
  version: 0.0.1
servers:
  - url: https://api.home.datanumia.com/api/v2
    description: Production Server
security:
  - Bearer: []
paths:
  /indexes-collect-jobs:
    get:
      summary: Get the execution status of all indexes jobs
      description: >-
        Returns a list of **jobs** between two dates, with their **state** and
        an overview of the OK/KO operations

        Results are paginated.


        **State** | Description

        ---------|----------

        **SUBMITTED**  | The archive is received but processing has not
        started. 

        **IN_PROGRESS**  | The archive is being processed. 

        **DONE**  | Archive processing is completed without errors. 

        **ERROR**  | Archive processing is completed but has encountered at
        least one functional or internal error. The details are available in the
        detailed report. Actions on the customer's side are necessary to correct
        them and resend the corresponding contracts.

        **INTERNAL_ERROR**  |  Archive processing was interrupted due to a
        series of internal errors that occurred while processing a JSON file.
        Datanumia requires intervention to correct these errors. 

        **DELETED** | Archive has been deleted (occurs 60 days after
        processing). Detailed status report is no more available.
      operationId: get bulk
      parameters:
        - name: beginTs
          in: query
          description: >
            Define the start timestamp for the range of jobs. Jobs objects
            having their state updated within the range are returned.


            The supported format is as defined by RFC 3339, section 5.6
            restricted to : full-date'T'partial-time'Z'


            Default is now -7 days. Period between beginTs and endTs is at most
            30 days.
          schema:
            type: string
          example: '2021-07-21T17:32:28Z'
        - name: endTs
          in: query
          description: >
            Define the end timestamp for the range of jobs. Jobs objects having
            their state updated within the range are returned.


            The supported format is as defined by RFC 3339, section 5.6
            restricted to : full-date'T'partial-time'Z'


            Default is now. Period between beginTs and endTs is at most 30 days.
          schema:
            type: string
          example: '2021-07-21T17:32:28Z'
        - name: page
          in: query
          description: The page to be fetched. Default value is 0
          schema:
            type: integer
            format: int32
          example: 0
        - name: size
          in: query
          description: The page size to be fetched. Default value is 100. Max value is 100
          schema:
            type: integer
            format: int32
          example: 10
        - name: state
          in: query
          description: The state of the jobs be fetched
          schema:
            type: string
            enum:
              - ERROR
              - DONE
              - IN_PROGRESS
              - SUBMITTED
              - INTERNAL_ERROR
              - DELETED
          example: DONE
      responses:
        '200':
          description: Jobs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobsReportDTO'
        '400':
          description: Functional Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    JobsReportDTO:
      type: object
      properties:
        _embedded:
          $ref: '#/components/schemas/Embedded'
        _links:
          $ref: '#/components/schemas/Link'
        page:
          $ref: '#/components/schemas/Page'
    ApiError:
      type: object
      properties:
        errorCode:
          type: string
          description: The error code.
        errorDescription:
          type: string
          description: The error description
      required:
        - errorCode
        - errorDescription
    Embedded:
      type: object
      properties:
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/JobListDTO'
    Link:
      type: object
      properties:
        href:
          type: string
        hreflang:
          type: string
        title:
          type: string
        type:
          type: string
        deprecation:
          type: string
        profile:
          type: string
        name:
          type: string
        templated:
          type: boolean
    Page:
      type: object
      properties:
        size:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
    JobListDTO:
      type: object
      properties:
        archive:
          type: string
          description: Name of the archive associated with this job execution.
          example: myOperationsArchive.tar.gz
        state:
          $ref: '#/components/schemas/JobListStateDTO'
        report:
          $ref: '#/components/schemas/JobListReportDTO'
        _links:
          $ref: '#/components/schemas/Links'
    JobListStateDTO:
      type: object
      properties:
        current:
          type: string
          enum:
            - SUBMITTED
            - IN_PROGRESS
            - DONE
            - ERROR
            - INTERNAL_ERROR
            - DELETED
          description: "Current state of the bulk job \r\nState | Description \r\n---------|----------\r\nSUBMITTED | The archive is received but processing has not started\r\nIN_PROGRESS | The archive is being processed.\r\nDONE | Archive processing is completed without errors and a detailed report on each operation is accessible.\r\nERROR | Archive processing is completed but has encountered at least one functional or internal error. The details are available in the detailed report. Actions on the customer's side are necessary to correct them and resend the corresponding contracts.\r\nINTERNAL_ERROR | Archive processing was interrupted due to a series of internal errors that occurred while processing a JSON file. Datanumia requires intervention to correct these errors.\r\nDELETED | Archive has been deleted (occurs 60 days after processing). Detailed status report is no more available"
        ts:
          type: string
          format: date-time
    JobListReportDTO:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ArchiveErrorDTO'
        overview:
          $ref: '#/components/schemas/OverviewDTO'
    Links:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/Link'
    ArchiveErrorDTO:
      type: object
      properties:
        code:
          type: string
          description: "Error code | Error case  \r\n---------|----------\r\nINVALID_ARCHIVE_FORMAT | Archive format must be .tar.gz\r\nTOO_MANY_FILES | The archive must contain between 1 and 5 JSON files\r\nINTERNAL_ERROR | Archive processing was interrupted due to a series of internal errors that occurred while processing a JSON file. Datanumia requires intervention to correct these errors."
          enum:
            - INVALID_ARCHIVE_FORMAT
            - TOO_MANY_FILES
            - INTERNAL_ERROR
          example: INVALID_ARCHIVE_FORMAT
        message:
          type: string
          description: Error message
    OverviewDTO:
      type: object
      properties:
        nbOperationsTotal:
          type: integer
          format: int32
          description: Number of executed operations
          example: 146
        nbOperationsOK:
          type: integer
          format: int32
          description: Number of succeeded operations
          example: 146
        nbOperationsKO:
          type: integer
          format: int32
          description: Number of failed operations
          example: 0
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````