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

# Get training status

> Returns the training status of one or more data sources in a knowledge base, so you can tell whether each one is in progress, trained or failed.



## OpenAPI

````yaml GET /api/v1/ai/status/sources
openapi: 3.1.0
info:
  title: WotNot API
  version: 1.0.0
  description: 'WotNot API: Get training status.'
servers:
  - url: https://api.wotnot.io
    description: Production
security:
  - bearerAuth: []
paths:
  /api/v1/ai/status/sources:
    get:
      summary: Get training status
      description: >-
        Returns the training status of one or more data sources in a knowledge
        base, so you can tell whether each one is in progress, trained or
        failed.
      operationId: getTrainingStatus
      parameters:
        - name: source_ids
          in: query
          required: true
          description: >-
            The IDs of the data sources to check, as a comma-separated list, for
            example `330778,330783`.
          schema:
            type: string
        - name: Content-Type
          in: header
          required: true
          description: Always set this to `application/json`.
          schema:
            type: string
            enum:
              - application/json
          example: application/json
      responses:
        '200':
          description: >-
            Returns `ok` set to `true` and a `sources` list with the training
            status of each data source.
          content:
            application/json:
              schema:
                type: object
                required:
                  - sources
                  - ok
                properties:
                  sources:
                    type: array
                    description: >-
                      The data sources you asked about, with their training
                      status.
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - status
                        - knowledge_base_id
                      properties:
                        id:
                          type: integer
                          description: The data source's ID.
                          example: 330778
                        name:
                          type: string
                          description: >-
                            The data source's name, for example the file name
                            `sample.txt`.
                          example: sample.txt
                        status:
                          type: string
                          description: |-
                            Where training is.

                            - `in-progress`: training is still running.
                            - `trained`: training has finished.
                            - `failed`: training didn't succeed.
                          example: in-progress
                          enum:
                            - in-progress
                            - trained
                            - failed
                        knowledge_base_id:
                          type: integer
                          description: >-
                            The ID of the knowledge base the data source belongs
                            to.
                          example: 876
                  ok:
                    type: boolean
                    description: '`true` when the request worked. Errors return `false`.'
                    example: true
              example:
                sources:
                  - id: 330778
                    name: sample.txt
                    status: in-progress
                    knowledge_base_id: 876
                ok: true
        '401':
          description: >-
            Your token is invalid, or this feature isn't available on your
            account. Check `error` to see which.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CodedError'
                    title: Error with code
                  - $ref: '#/components/schemas/Error'
                    title: Error
              examples:
                invalid_jwt:
                  summary: Invalid token
                  value:
                    ok: false
                    error: JWT_SIGNATURE_EXCEPTION
                    message: Invalid JWT token
                    status: 401
                feature:
                  summary: Feature not available
                  value:
                    ok: false
                    error: UNAUTHORIZED_FEATURE
                    code: UNAUTHORIZED_FEATURE
                    status: 401
                    message: Please reach out to support to use this feature
        '404':
          description: Your account details weren't found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodedError'
              example:
                ok: false
                error: ACCOUNT_DETAILS_NOT_FOUND
                code: ACCOUNT_DETAILS_NOT_FOUND
                status: 404
                message: Account Details are Not Found!
components:
  schemas:
    CodedError:
      type: object
      description: An error with a short code that says what went wrong.
      required:
        - ok
        - message
        - error
        - code
      properties:
        ok:
          type: boolean
          description: Always `false` when something went wrong.
          example: false
        message:
          type: string
          description: What went wrong, in plain words.
          example: Please reach out to support to use this feature
        error:
          type: string
          description: >-
            A short error code in capital letters, for example
            `UNAUTHORIZED_FEATURE`. Check this in your code to tell errors
            apart.
          example: UNAUTHORIZED_FEATURE
        code:
          type: string
          description: A code for the result. In these examples it matches `error`.
          example: UNAUTHORIZED_FEATURE
        status:
          type: integer
          description: >-
            The HTTP status code, repeated in the body. Not every error includes
            it.
          example: 401
    Error:
      type: object
      description: Returned whenever a request fails.
      required:
        - error
        - ok
        - status
        - message
      properties:
        error:
          type: string
          description: >-
            A short error code in capital letters, for example `UNAUTHORIZED`.
            Check this in your code to tell errors apart.
          example: UNAUTHORIZED
        ok:
          type: boolean
          description: Always `false` when something went wrong.
          example: false
        status:
          type: integer
          description: The HTTP status code, repeated in the body, for example `401`.
          example: 401
        message:
          type: string
          description: What went wrong and how to fix it, in plain words.
          example: Invalid token. Provide the valid account token.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        All of WotNot's APIs use Bearer token authentication. Send your account
        token as `Bearer <token>`. You can find it in Settings > Account
        Settings > Developer. Keep it on your server: anyone who has it can call
        the API as your account.

````

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