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

# Cancel a load, or clear one that has ended

> What it does depends on where the table's load stands. A load that is still live is cancelled: it stops at its next commit, the request's `on_failure` decides what becomes of the table, and the notice the request asked for is withdrawn. A load that has ended is cleared: its record is removed, so the table can be loaded again; the table and its rows are not touched. For a table loaded with `sync`, clearing stops keeping it matching its source. If a record cannot be removed the request fails and the load is kept: send the `DELETE` again.

Preview: this route may change between releases.



## OpenAPI

````yaml /api-reference/openapi.json delete /v1/hydrate/{database}
openapi: 3.1.0
info:
  title: Infino API
  description: >-
    The Infino hosted data-plane API: per-database table operations — create,
    ingest, search, and SQL.
  version: 0.1.0
servers:
  - url: https://api.platform.infino.ws
    description: Infino Cloud
security:
  - api_key: []
tags:
  - name: Databases
    description: Create, list, and delete the databases in your account.
  - name: Tables
    description: Create, drop, and list tables, and describe a table's schema.
  - name: Rows
    description: Append, update, and delete rows.
  - name: Search
    description: BM25, vector, and hybrid search, token and exact match, count, and SQL.
  - name: Agent
    description: >-
      Preview routes for agents: table cards, join keys, line search, result
      checks, graph lookups, and the retrieval sub-agent. They need the agent
      APIs enabled on your account.
  - name: Hydrate
    description: >-
      Preview routes for loading a dataset: start a load of files from object
      storage into a table, follow it, cancel or clear it, and run a sync pass.
paths:
  /v1/hydrate/{database}:
    delete:
      tags:
        - Hydrate
      summary: Cancel a load, or clear one that has ended
      description: >-
        What it does depends on where the table's load stands. A load that is
        still live is cancelled: it stops at its next commit, the request's
        `on_failure` decides what becomes of the table, and the notice the
        request asked for is withdrawn. A load that has ended is cleared: its
        record is removed, so the table can be loaded again; the table and its
        rows are not touched. For a table loaded with `sync`, clearing stops
        keeping it matching its source. If a record cannot be removed the
        request fails and the load is kept: send the `DELETE` again.


        Preview: this route may change between releases.
      operationId: hydrate_cancel
      parameters:
        - name: database
          in: path
          description: The database the load writes to.
          required: true
          schema:
            type: string
        - name: table
          in: query
          description: The table whose load to cancel or clear.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The load had ended and its record is cleared. No body.
        '202':
          description: >-
            The load was live and is being cancelled: state `cancelling`. Or it
            was stopped and waiting to be started again by the service: the wait
            is ended and it stays `stopped`, resumable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HydrateAccepted'
              example:
                job: hydrate/cust_example/analytics/support_tickets
                state: cancelling
        '400':
          description: >-
            `table` is missing, a query parameter is unknown, or the database or
            table name is not valid.
        '401':
          description: Missing or invalid API key.
        '403':
          description: The key may not write to this database.
        '404':
          description: The table has no load on record.
        '412':
          description: >-
            The load's record changed while the request was being applied.
            Nothing was lost: send the same request again.
        '429':
          description: The account's request rate limit is exceeded. Retry later.
        '500':
          description: >-
            A record of the load could not be read or removed. The load is kept:
            send the request again.
        '501':
          description: Loading is not available on this deployment.
        '503':
          description: The service is shedding load. Retry after a short wait.
      security:
        - api_key: []
components:
  schemas:
    HydrateAccepted:
      type: object
      description: >-
        A load of one table, accepted, or a cancel of one, accepted: the load's
        name and where it stands. Follow it with `GET ?table=`.
      required:
        - job
        - state
      properties:
        job:
          type: string
          description: The load's name.
        state:
          $ref: '#/components/schemas/HydrateJobState'
          description: |-
            Where the load stands: `admitting` or `pending` for a load just
            accepted, `cancelling` or `stopped` for one just cancelled.
    HydrateJobState:
      type: string
      description: >-
        Where a load stands. `admitting`: accepted, and its source is still
        being read to check it; it becomes `pending`, or `failed` with the
        refusal the check found. `pending`: waiting to start. `running`: rows
        are being committed. `cancelling`: a cancel was asked for, and the load
        stops at its next commit. `stopped`: stopped at a commit; it can be
        resumed. `succeeded`: every row is in the table. `synced`: as
        `succeeded`, for a table loaded with `sync`, which is kept matching its
        source from then on. `failed`: failed for good; what became of the table
        is the request's `on_failure`. `unknown`: a state this version of the
        service does not name; treat it as ended. `admitting`, `pending`,
        `running` and `cancelling` are live; the rest have ended.
      enum:
        - admitting
        - pending
        - running
        - cancelling
        - stopped
        - succeeded
        - synced
        - failed
        - unknown
  securitySchemes:
    api_key:
      type: http
      scheme: bearer

````

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