Home Explore Blog Models CI



ragit

4th chunk of `docs/ragithub/openapi.yaml`
d07882e18ae9b3de240eb9ba13716cccab94da8e2dca4da00000000100000fa2
         $ref: '#/components/schemas/FileDetail'
  /{user}/{repo}/cat-file/{uid}:
    get:
      description: If you want to get a content of a file or a chunk, I recommend you use `/{user}/{repo}/content/{uid}` api instead of this. This api exists for historical reasons.
      operationId: GetCatFile
      parameters:
        - name: user
          in: path
          required: true
          description: user id
          schema:
            type: string
        - name: repo
          in: path
          required: true
          description: repository name
          schema:
            type: string
        - name: uid
          in: path
          required: true
          description: uid of a file or a chunk
          schema:
            type: string
      responses:
        '200':
          description: It's exactly same as running `rag cat-file` with the uid.
          content:
            text/plain:
              schema:
                type: string
  /{user}/{repo}/content/{uid}:
    get:
      description: It's useful when you want to render a content of a chunk or a file. It doesn't give you the content of the original file, but a version that LLMs actually see when they RAG.
      operationId: GetContent
      parameters:
        - name: user
          in: path
          required: true
          description: user id
          schema:
            type: string
        - name: repo
          in: path
          required: true
          description: repository name
          schema:
            type: string
        - name: uid
          in: path
          required: true
          description: uid of a file or a chunk
          schema:
            type: string
      responses:
        '200':
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MultiModalContent'
  /{user}/{repo}/archive-list:
    get:
      description: Ragit client uses this API to clone knowledge-bases.
  /{user}/{repo}/archive/{archive-id}:
    get:
      description: Ragit client uses this API to clone knowledge-bases.
  /{user}/{repo}/meta:
    get:
      operationId: GetMeta
      parameters:
        - name: user
          in: path
          required: true
          description: user id
          schema:
            type: string
        - name: repo
          in: path
          required: true
          description: repository name
          schema:
            type: string
      responses:
        '200':
          description: meta.json
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
  /{user}/{repo}/meta/{key}:
    get:
      operationId: GetMetaByKey
      parameters:
        - name: user
          in: path
          required: true
          description: user id
          schema:
            type: string
        - name: repo
          in: path
          required: true
          description: repository name
          schema:
            type: string
        - name: key
          in: path
          required: true
          description: metadata key
          schema:
            type: string
      responses:
        '200':
          description: metadata value
          content:
            application/json:
              schema:
                type: string
                nullable: true
  /{user}/{repo}/version:
    get:
      operationId: GetRepoVersion
      parameters:
        - name: user
          in: path
          required: true
          description: user id
          schema:
            type: string
        - name: repo
          in: path
          required: true
          description: repository name
          schema:
            type: string
      responses:
        '200':
          description: version of the repository
          content:
            text/plain:
              schema:

Title: API Endpoints for Repository and Meta Data
Summary
This section of the API documentation describes endpoints for retrieving repository metadata, archive lists, and specific metadata keys, as well as endpoints for getting the content of files and chunks, with responses in various formats including JSON, plain text, and arrays of multi-modal content, often used for cloning knowledge-bases and rendering content for LLMs.