> ## 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.

# Retrieve dataset details

> Retrieve dataset details by dataset key



## OpenAPI

````yaml api-reference/openapi.yaml GET /api/v1/datasets/{datasetKey}
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/{datasetKey}:
    get:
      tags:
        - Datasets
      summary: Retrieve dataset details
      description: Retrieve dataset details by dataset key
      operationId: getDatasetByKey
      parameters:
        - name: datasetKey
          in: path
          required: true
          schema:
            pattern: >-
              ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
            type: string
            format: uuid
      responses:
        '200':
          description: Dataset details successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetDetailOutput'
        '400':
          description: Invalid dataset key supplied
        '404':
          description: Dataset not found
        '500':
          description: Internal server error
components:
  schemas:
    DatasetDetailOutput:
      required:
        - createdOn
        - datasetKey
        - datasetName
        - status
      type: object
      properties:
        datasetKey:
          type: string
          format: uuid
        datasetName:
          type: string
        status:
          $ref: '#/components/schemas/DatasetCreationStatus'
        createdOn:
          type: string
        updatedOn:
          type: string
        numberOfBuckets:
          type: integer
        inputDataDownloadUrl:
          type: string
        metadata:
          $ref: '#/components/schemas/DatasetMetadata'
        errors:
          $ref: '#/components/schemas/DatasetErrors'
        warnings:
          $ref: '#/components/schemas/DatasetWarnings'
        inputs:
          description: >-
            The dataset's input files and which are still missing — so a client
            can say which upload is outstanding rather than only that the
            dataset is not ready. Empty on the single-file pipeline.
          type: array
          items:
            $ref: '#/components/schemas/DatasetInputStatus'
        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. Settled
            when the dataset is created and never changes afterwards, so a
            client can decide once. In particular it is what says whether the
            refinement's column filter means anything here — it is offered only
            on a dataset that came from a refinement.
          type: string
          nullable: true
        featureRefinementKey:
          description: >-
            The refinement these inputs came from, when they did. Null
            otherwise. Present so a client can link back to the run without
            keeping its own record of which one was chosen. An opaque handle:
            pass it back as given rather than parsing it.
          type: string
          nullable: true
        uploadedTrainRowCount:
          description: >-
            How many training rows were uploaded. Absent on a dataset built
            before the count was kept.
          type: integer
          format: int64
          nullable: true
        trainRowCount:
          description: The number of training rows the dataset was prepared from.
          type: integer
          format: int64
          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
        recommendedNumberOfBuckets:
          description: >-
            The bucket count this dataset was founded at, when that came from a
            refinement. Absent on a direct upload, where the caller chose it. On
            this route it cannot be changed: the refined files were produced at
            this bucket count.
          type: integer
          nullable: true
    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
    DatasetMetadata:
      type: object
      properties:
        numberOfColumns:
          type: integer
        numberOfRows:
          type: integer
        numberOfClasses:
          type: integer
        titlesOfDataColumns:
          type: string
        columnTypes:
          type: string
        detectedTargetClassLabels:
          type: string
        numberOfFeaturesPerClass:
          type: string
        columnsWithUniqueValues:
          type: string
        columnsWithTooManyFeatures:
          type: string
    DatasetErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
    DatasetWarnings:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
    DatasetInputStatus:
      description: One of a dataset's input files and whether it has arrived yet.
      required:
        - kind
        - uploaded
      type: object
      properties:
        kind:
          type: string
          enum:
            - TRAIN
            - TEST
        uploaded:
          type: boolean
          description: >-
            Checked against storage on every read, so it reflects what is
            actually there.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````