Home Explore Blog Models CI



ragit

6th chunk of `docs/ragithub/openapi.yaml`
a466b8a441fdc2d89d5d126fd2753786e40ff96869a5403e0000000100000fa0
 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: path
          required: true
          description: repository name
          schema:
            type: string
      responses:
        '200':
          description: "The response has 15 keys: \"all\" and 14 dates. \"all\" has the number of push/clone for all time. Each date has the number of push/clone at that date. A date has format \"2025-06-01\". It gives 14 most recent days."
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    push:
                      type: integer
                      format: int64
                    clone:
                      type: integer
                      format: int64
  /{user}/{repo}/chat/{chat-id}:
    get:
      operationId: getChat
      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: chat-id
          in: path
          required: true
          description: chat-id
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: a chat with history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatWithHistory'
    post:
      description: Ragithub's chat interface is WIP and we're not working on it anymore.
  /{user}/{repo}/chat-list:
    get:
      description: Ragithub's chat interface is WIP and we're not working on it anymore.
    post:
      description: Ragithub's chat interface is WIP and we're not working on it anymore.
  /health:
    get:
      operationId: GetHealth
      responses:
        '200':
          description: ""
  /version:
    get:
      operationId: GetServerVersion
      responses:
        '200':
          description: version of the server
          content:
            text/plain:
              schema:
                type: string
                example: "0.4.0-dev"
  /user-list:
    get:
      operationId: GetUserList
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 50
        - 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/UserSimple'
    post:
      description: It creates a new user. If it's the first user, the user becomes an admin.
      operationId: CreateUser
 

Title: API Endpoints for Repository, User, and Server Management
Summary
This section describes various API endpoints for managing repositories, including push and clone traffic, chat interfaces, as well as endpoints for retrieving server and user information, such as version numbers, health checks, and user lists, with support for query parameters and different response formats like JSON and plain text.