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

# Fetch component text by project id

> Returns the components used in the specified project. Format is identical to the format used by the Fetch components endpoint.



## OpenAPI

````yaml openapi-legacy.json get /projects/{id}/components
openapi: 3.0.0
info:
  version: 1.0.0
  title: Ditto API
  description: Programmatically read and write data in your Ditto workspace.
servers:
  - url: https://api.dittowords.com/v1
security: []
paths:
  /projects/{id}/components:
    get:
      tags:
        - Projects
      summary: Fetch component text by project id
      description: >-
        Returns the components used in the specified project. Format is
        identical to the format used by the Fetch components endpoint.
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
        - schema:
            type: string
            description: >-
              The API ID of the variant. If specified, will filter for
              components that have the variant, and will return the attributes
              (e.g. text, status) of that component's variant.
            example: french
          required: false
          description: >-
            The API ID of the variant. If specified, will filter for components
            that have the variant, and will return the attributes (e.g. text,
            status) of that component's variant.
          name: variant
          in: query
        - schema:
            type: string
            enum:
              - flat
              - structured
              - nested
              - icu
              - android
              - ios-strings
              - ios-stringsdict
            example: structured
          required: false
          name: format
          in: query
        - schema:
            type: string
            enum:
              - NONE
              - WIP
              - REVIEW
              - FINAL
            example: FINAL
          required: false
          name: status
          in: query
        - schema:
            type: boolean
          required: false
          name: includeRichText
          in: query
      responses:
        '200':
          description: Returns components a project
          content:
            application/json:
              schema:
                anyOf:
                  - type: string
                  - type: object
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: object
                          additionalProperties:
                            type: string
                  - type: object
                    additionalProperties:
                      type: object
                      properties:
                        name:
                          type: string
                        text:
                          type: string
                        status:
                          type: string
                        notes:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        folder:
                          type: string
                          nullable: true
                        characterLimit:
                          type: number
                        variables:
                          type: object
                          additionalProperties:
                            type: object
                            properties: {}
                        plurals:
                          type: object
                          additionalProperties:
                            type: string
                          nullable: true
                        variants:
                          type: object
                          additionalProperties:
                            type: object
                            properties:
                              text:
                                type: string
                              variables:
                                type: object
                                additionalProperties:
                                  type: object
                                  properties: {}
                              plurals:
                                type: object
                                additionalProperties:
                                  type: string
                            required:
                              - text
                              - variables
                              - plurals
                      required:
                        - text
                example:
                  introduction:
                    name: Introduction
                    text: Welcome to Ditto
                    status: FINAL
                    folder: null
                    tags:
                      - HOMEPAGE
                    notes: Show on the homepage for new users
                    variants: {}
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````