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

# List all inputs of a batch

> Returns a page of the batch's event-backed inputs using the same row shape as `input_data`. Defaults to data point id order; sorts use id as a tie-breaker. Fields select the data_point or event section, including in summary samples. Requires the `read:batch` token scope.



## OpenAPI

````yaml GET /batches/{batch_id}/inputs
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
  description: >
    ## Filtering and sorting


    List endpoints that accept `filter` take one query parameter per condition,
    written `filter[field][comparator]=value`, for example
    `filter[name][contains]=North`. The comparators are `eq`, `neq`, `gt`,
    `geq`, `lt`, `leq` and `contains`, and `filter[field]=value` is short for
    `eq`. Conditions combine with AND. `contains` matches part of the value, is
    case-sensitive, and applies only to text fields. An unknown field or
    comparator, a value that doesn't fit the field's type, or a list or object
    as the value returns 400 with a message naming the problem. Each list
    operation names its filterable fields; some take only `eq`, and say so.


    `sort` takes a comma-separated list of fields, for example
    `sort=-created_at,name`. Each field sorts ascending, or descending with a
    `-` prefix. Unknown sort fields are ignored. Sorting by `id` orders by the
    record's internal ID, not its friendly ID. Each list operation names its
    sortable fields.
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /batches/{batch_id}/inputs:
    get:
      summary: List all inputs of a batch
      description: >-
        Returns a page of the batch's event-backed inputs using the same row
        shape as `input_data`. Defaults to data point id order; sorts use id as
        a tie-breaker. Fields select the data_point or event section, including
        in summary samples. Requires the `read:batch` token scope.
      operationId: list-batch-inputs
      parameters:
        - $ref: '#/components/parameters/BatchId'
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PageSize'
        - name: sort
          in: query
          description: >-
            Sortable fields: `id`, `start_time`, `end_time`, `created_at`,
            `updated_at`, `status`.
          schema:
            type: string
        - name: fields
          in: query
          description: >-
            Comma-separated sections to return in each row: `data_point`,
            `event`. Any other name returns 400.
          schema:
            type: string
        - $ref: '#/components/parameters/SummaryResponseMode'
        - name: filter[slug]
          in: query
          description: >-
            Only inputs whose data point type has this slug. Supports only `eq`,
            and is also accepted as a top-level `slug` parameter; sending both
            with different values returns 400.
          schema:
            type: string
        - name: filter[status]
          in: query
          description: >-
            Only inputs with this data point status. Filterable fields: `slug`,
            `status`, `start_time`, `end_time`.
          schema:
            type: string
      responses:
        '200':
          description: >-
            A page of the batch's inputs. With `response_mode=summary`, a count
            and up to 10 samples instead.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    required:
                      - data
                      - info
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/BatchInputRow'
                      info:
                        $ref: '#/components/schemas/PaginationInfo'
                  - type: object
                    required:
                      - count
                      - samples
                      - response_mode
                    properties:
                      count:
                        type: integer
                      samples:
                        type: array
                        maxItems: 10
                        items:
                          $ref: '#/components/schemas/BatchInputRow'
                      response_mode:
                        type: string
                        const: summary
        '400':
          description: >-
            An unsupported filter, an unknown field, or
            `response_mode=summary_with_export`. An unknown field answers with
            `error` and the `valid_fields`; the rest use the shared error shape.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - type: object
                    required:
                      - error
                      - valid_fields
                    properties:
                      error:
                        type: string
                        example: 'Invalid fields: value'
                      valid_fields:
                        type: array
                        items:
                          type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    BatchId:
      name: batch_id
      in: path
      required: true
      description: The batch's friendly ID (e.g. `ba_aBcD1234eFgH5678`).
      schema:
        type: string
    Page:
      name: page
      in: query
      description: >-
        The page to return, starting at 1. A value below 1 or a non-numeric
        value returns 400.
      schema:
        type: integer
        format: int32
        default: 1
        minimum: 1
    PageSize:
      name: page_size
      in: query
      description: >-
        Rows per page, from 1 to 200. A value below 1 counts as 1 and a value
        above 200 as 200; a non-numeric value uses the default.
      schema:
        type: integer
        format: int32
        default: 20
        minimum: 1
        maximum: 200
    SummaryResponseMode:
      name: response_mode
      in: query
      description: >-
        `default` returns a page of rows. `summary` returns the number of
        matching records and up to 10 sample rows. This endpoint doesn't support
        `summary_with_export`, which returns 400.
      schema:
        type: string
        enum:
          - default
          - summary
  schemas:
    BatchInputRow:
      type: object
      description: >
        One data point a batch read, and the event that produced it: one
        `input_data` row, and one row of `GET /api/v1/batches/{id}/inputs`.
        Evidence, rule results and the event's full record come from their own
        endpoints:

        - evidences: `GET /api/v1/batches/{id}/evidences`;

        - an event's full record: `GET
        /api/v1/projects/{project_id}/events/{event_id}` with the row's
        `event.project_id` and `event.id`;

        - failing rule results: the batch's `rule_alerts`; dismissed ones: the
        data point endpoints, e.g. `GET
        /api/v1/projects/{project_id}/events/{event_id}/data_points/{data_point_id}`.


        Replacement endpoints require additional token scopes: evidences require
        `read:project` alongside `read:batch`; event and data point detail
        require `read:project` and `read:event`. The token must also have access
        to the input event's project. A `read:batch` token alone cannot retrieve
        these records.
      properties:
        data_point:
          type: object
          properties:
            id:
              type: string
            slug:
              type:
                - string
                - 'null'
            data_point_type:
              type:
                - string
                - 'null'
              description: Name of the data point type.
            value:
              oneOf:
                - type: number
                - type: string
                - type: boolean
                - type: 'null'
            unit:
              type:
                - string
                - 'null'
            status:
              type:
                - string
                - 'null'
            substituted:
              type: boolean
              description: A value existed on this data point and a correction replaced it.
            imputed:
              type: boolean
              description: >-
                No value ever existed on this data point and a correction
                supplied one.
            raw_value:
              description: >-
                The value as captured, before any correction. Null on an imputed
                data point, and on one that was never corrected.
              oneOf:
                - type: number
                - type: string
                - type: boolean
                - type: 'null'
            substitution:
              $ref: '#/components/schemas/DataPointSubstitutionSummary'
        event:
          type: object
          properties:
            id:
              type: string
            slug:
              type: string
              description: Slug of the event type.
            event_type:
              type: string
              description: Name of the event type.
            tracking_id:
              type:
                - string
                - 'null'
            start_time:
              type:
                - string
                - 'null'
              format: date-time
            end_time:
              type:
                - string
                - 'null'
              format: date-time
            project_id:
              type:
                - string
                - 'null'
              description: >-
                The friendly ID of the event's project (e.g.
                `prj_aBcD1234eFgH5678`).
    PaginationInfo:
      type: object
      description: >-
        Where this page sits in the full result, and the sort, filters and
        fields the request applied.
      properties:
        items:
          type: integer
          description: Rows on this page.
          example: 2
        page_size:
          type: integer
          description: Rows per page.
          example: 20
        total_items:
          type: integer
          description: Rows matching the request across all pages.
          example: 2
        current_page:
          type: integer
          description: This page's number, starting at 1.
          example: 1
        next_page:
          type:
            - integer
            - 'null'
          description: The next page's number, or null on the last page.
        previous_page:
          type:
            - integer
            - 'null'
          description: The previous page's number, or null on the first page.
        total_pages:
          type: integer
          description: Pages in the full result.
          example: 1
        sort:
          type: array
          description: >-
            The sort applied, one entry per field, in order. Present on list
            endpoints that accept `sort`.
          items:
            type: object
            properties:
              field:
                type: string
              direction:
                type: string
                enum:
                  - asc
                  - desc
        filter:
          type: array
          description: >-
            The filters applied, one entry per field and comparator. Present on
            list endpoints that accept `filter`.
          items:
            type: object
            properties:
              field:
                type: string
              comparator:
                type: string
                enum:
                  - eq
                  - neq
                  - gt
                  - geq
                  - lt
                  - leq
                  - contains
              value: {}
        fields:
          type:
            - array
            - 'null'
          description: >-
            The requested `fields`, or null when none were requested. Present on
            list endpoints that accept `fields`.
          items:
            type: string
    ErrorResponse:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            required:
              - message
            properties:
              message:
                type: string
                description: Human-readable error message
              field:
                type: string
                description: Attribute the error applies to (validation errors only)
              code:
                type: string
                description: Machine-readable error code (validation errors only)
              blocking:
                type: array
                description: >-
                  Bounded preview of the records blocking a destroy
                  (blocked-destroy errors only)
                items:
                  $ref: '#/components/schemas/DeletionBlockingRecord'
              blocking_count:
                type: integer
                description: >-
                  Total count of records blocking a destroy (blocked-destroy
                  errors only)
              config_key:
                type: string
                description: >-
                  The data feed source config setting to fix, when the error is
                  on `config` (data feed source validation errors only)
              count:
                type: number
                description: >-
                  The limit or comparison value the failed validation checked
                  against, e.g. a maximum length or a numeric bound (validation
                  errors only, when the validation has one)
              value:
                description: >-
                  The rejected value, e.g. on an inclusion or uniqueness failure
                  (validation errors only, when the validation reports one)
    DataPointSubstitutionSummary:
      type:
        - object
        - 'null'
      description: >-
        The data point's most recent correction, or null when it has none. After
        a revert this is the revert entry. Overrides scoped to a single value
        stream are not included. The full history is on the corrections
        endpoint.
      properties:
        source:
          type: string
          enum:
            - manual
            - api
            - rule
            - transformation
          description: >-
            Where the correction came from. A correction written through this
            API is `api`.
        method:
          type: string
          description: >-
            How the replacement value was arrived at. A correction written by
            hand carries `manual_entry`, and a revert carries `revert`.
          example: manual_entry
        from_value:
          description: >-
            The value before this correction. Null where it filled an empty
            slot.
          allOf:
            - $ref: '#/components/schemas/DataPointValue'
        to_value:
          description: >-
            The value this correction put in place. Null only on a revert of an
            imputed value, which restores the empty slot.
          allOf:
            - $ref: '#/components/schemas/DataPointValue'
        created_at:
          type: string
          format: date-time
        created_by:
          type:
            - string
            - 'null'
          description: >-
            Name of the user the correction is attributed to, or null when there
            is none.
          example: Example User
        rule:
          type:
            - object
            - 'null'
          description: The rule that wrote the correction. Null unless a rule wrote it.
          properties:
            name:
              type: string
              example: Feedstock volume within expected range
            friendly_id:
              type: string
              example: rule_aBcD1234eFgH5678
    DeletionBlockingRecord:
      type: object
      required:
        - type
      properties:
        type:
          type: string
        friendly_id:
          type: string
        name:
          type:
            - string
            - 'null'
          description: >-
            Display label, and the only identifier for records that have no
            friendly_id
    DataPointValue:
      description: >-
        Follows the data point type's `value_type`: a number for `number`, a
        string for `string` and `enumeration`, and `true` or `false` for
        `boolean`.
      oneOf:
        - type: number
        - type: string
        - type: boolean
        - type: 'null'
  responses:
    Unauthorized:
      description: >-
        The API token is missing, invalid or expired. The body is empty, except
        for an expired token, which returns the error below.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
              - message: API token has expired
    Forbidden:
      description: >-
        The token lacks the scope the operation's description names, or a
        condition the description states applies, such as a feature that isn't
        enabled for your account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
              - message: You are not authorized to perform this action
    NotFound:
      description: >-
        A resource named in the path doesn't exist in your account, or the token
        can't see it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
              - message: Record not found
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.