Home Explore Blog Models CI



ragit

5th chunk of `docs/ragithub/openapi.yaml`
67c120c9b27b37622f0f9019f7e9e1f417d4c7422f52412e0000000100000fa2
 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:
                type: string
                example: "0.4.0-dev"
  /{user}/{repo}/build-search-index:
    post:
      description: "This is the same as running `rag ii-build` in a local repository. It is helpful when you want to search for chunks in the server."
      operationId: PostBuildSearchIndex
      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: "It doesn't return anything."
  /{user}/{repo}/search:
    get:
      description: search for chunks in this repository. There's no `sort-by` or `sort-ord` option. If you provide `query` parameter, it sorts the result by tfidf-score. Otherwise, it uses `chunk.sortable_string()` methods which usually sorts the chunks by file name.
      operationId: searchChunk
      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: file
          in: query
          description: search for chunks that belong to this file or directory
          schema:
            type: string
        - name: uid
          in: query
          description: search for chunks whose uid starts or equal to this parameter
          schema:
            type: string
        - name: query
          in: query
          description: full-text search on chunks.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 100
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 0
      responses:
        '200':
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ChunkDetail'
  /{user}/{repo}/begin-push:
    post:
      description: Ragit client uses this API to push knowledge-bases.
  /{user}/{repo}/archive:
      description: Ragit client uses this API to push knowledge-bases.
  /{user}/{repo}/finalize-push:
      description: Ragit client uses this API to push knowledge-bases.
  /{user}/{repo}/traffic:
    get:
      description: It gives you numbers of push/clone of this repository.
      operationId: GetTraffic
      parameters:
        - name: user
          in: path
          required: true
          description: user id
          schema:
            type: string
        - name: repo
          in:

Title: API Endpoints for Repository Management and Search
Summary
This section of the API documentation describes endpoints for retrieving repository version, building search indexes, searching for chunks, pushing knowledge-bases, and tracking repository traffic, with various query parameters and response formats including JSON arrays and plain text, often used for managing and searching repository content.