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

# List all datasets

> Returns a paginated list of all created datasets



## OpenAPI

````yaml api-reference/openapi.yaml GET /api/v1/datasets
openapi: 3.0.1
info:
  title: MathFi.ai API
  description: >
    The MathFi.ai REST API runs the two products end to end.


    **Feature Refinery** takes your labelled data and works out which columns

    actually carry the signal. It returns a reduced train and test pair, a

    per-column keep/remove decision, and the performance target the refined data

    reached.


    **Model Crucible** takes a dataset, trains every algorithm family against it

    at once, ranks the results on held-out data by fewest wrong decisions, and

    keeps the best three as versions of one model. You pick which one
    predictions

    run against.


    Everything is asynchronous: you create a thing, upload to a signed URL,
    start

    it, then poll until the state is terminal. Nothing streams and nothing
    blocks.
  contact:
    name: MathFi.ai
    url: https://mathfi.ai
    email: support@mathfi.ai
  license:
    name: MathFi.ai
    url: https://mathfi.ai
  version: 1.0.0
servers:
  - url: https://{tenant}-api.mathfi.ai
    description: >-
      Your tenant's API. Each customer has their own, so the host varies.
      Replace {tenant} with the name issued when your tenant was created.
    variables:
      tenant:
        default: your-tenant
        description: The tenant name issued to you.
security:
  - BearerAuth: []
tags:
  - name: Authentication
    description: Exchange credentials for a bearer token
  - name: Feature Refinery
    description: Reduce a dataset to the columns that earn their place
  - name: Datasets
    description: >-
      Prepare labelled data for training, from uploads or from a finished
      refinement
  - name: Training
    description: Run the Crucible against a dataset and choose the champion model
  - name: Models
    description: Trained models and their versions
  - name: Predictions
    description: Score unlabelled data against a champion model
paths:
  /api/v1/datasets:
    get:
      tags:
        - Datasets
      summary: List all datasets
      description: Returns a paginated list of all created datasets
      operationId: listDatasets
      parameters:
        - name: offset
          in: query
          description: >-
            Specifies the number of elements to skip before starting to collect
            the result
          required: true
          schema:
            minimum: 0
            type: integer
            format: int64
        - name: limit
          in: query
          description: Specifies the maximum number of items to return
          required: true
          schema:
            minimum: 1
            type: integer
            format: int64
        - name: state
          in: query
          description: Specifies the dataset state to filter for
          required: false
          schema:
            $ref: '#/components/schemas/DatasetCreationStatus'
        - name: withModelOnly
          in: query
          description: >-
            Specifies whether or not the datasets returned should have a model
            associated
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Datasets successfully listed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetList'
              examples:
                Successful listing of datasets:
                  summary: Successful listing of datasets paginated
                  value:
                    datasets: |
                      [{
                        "datasetKey": "3a1a9a83-d549-4f25-b7ed-8174e0c955de",
                        "datasetName": "Dataset 11",
                        "description": "Description 11"
                        "status": "PROCESSING",
                        "datasetCreationProgressUrl": "http://server/3a1a9a83-d549-4f25-b7ed-8174e0c955de/progress",
                        "createdOn": ""
                      },
                      {
                        "datasetKey": "7a1a9a83-d549-4f25-b7ed-8174e0c955dd",
                        "datasetName": "Dataset 12",
                        "description": "Description 12",
                         "status": "COMPLETED",
                        "datasetCreationProgressUrl": "http://server/3a1a9a83-d549-4f25-b7ed-8174e0c955de/progress",
                        "createdOn": ""
                      }]
                    offset: 10
                    limit: 10
                    nextOffset: 127919133
                    total: 12
        '400':
          description: Invalid pagination parameters supplied
        '500':
          description: Internal server error
components:
  schemas:
    DatasetCreationStatus:
      type: string
      description: >+
        Status of dataset creation: 


        * `PENDING` - The dataset has been created and is pending further
        actions. Mainly data addition

        * `PROCESSING` - The dataset is currently being processed. When this
        status is returned an url to check status is returned too

        * `COMPLETED` - The dataset has been processed and is completed. The
        dataset is now ready to be used for training models

        * `FAILED` - The dataset processing has failed

      enum:
        - PENDING
        - PROCESSING
        - COMPLETED
        - FAILED
    DatasetList:
      required:
        - datasets
        - limit
        - offset
        - total
      type: object
      properties:
        datasets:
          type: array
          items:
            $ref: '#/components/schemas/DatasetListItem'
        offset:
          type: integer
          format: int64
        nextOffset:
          type: integer
          format: int64
        limit:
          type: integer
          format: int64
        total:
          type: integer
          format: int64
    DatasetListItem:
      required:
        - datasetKey
        - datasetName
        - status
      type: object
      properties:
        datasetKey:
          type: string
          format: uuid
        modelKey:
          type: string
          format: uuid
        datasetName:
          type: string
        numberOfBuckets:
          type: integer
          format: int64
        status:
          $ref: '#/components/schemas/DatasetCreationStatus'
        createdOn:
          type: string
        inputDataDownloadUrl:
          type: string
        inputDatasource:
          description: >-
            Where this dataset's inputs came from: UPLOAD when the caller
            uploaded them, FEATURE_REFINERY when they came from a completed
            refinement, CLOUD_STORAGE on the older single-file route. The same
            value the detail carries, offered here so a caller choosing from the
            list does not have to fetch each one to find out.
          type: string
          nullable: true
        recommendedThreshold:
          description: >-
            The performance target a training on this dataset should start from
            — the threshold the refinement it came from trained to. Absent when
            the files were uploaded directly, in which case the client's own
            default applies.
          type: number
          format: double
          nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````