Gitee Pull Requests API

Pull requests - create, review, merge, and inspect changes.

Business capability
Software Construction Management BC-4200.40

Operations 6

GET /repos/{owner}/{repo}/pulls List pull requests #
POST /repos/{owner}/{repo}/pulls Create a pull request #
GET /repos/{owner}/{repo}/pulls/{number} Get a single pull request #
GET /repos/{owner}/{repo}/pulls/{number}/merge Check whether a pull request has been merged #
PUT /repos/{owner}/{repo}/pulls/{number}/merge Merge a pull request #
GET /repos/{owner}/{repo}/pulls/{number}/files List the changed files of a pull request (up to 300 diffs) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gitee-pull-requests-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gitee-pull-requests-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Gitee Open API v5 (core subset) Pull Requests API
  description: A curated, representative subset of the Gitee (码云) Open API v5, the documented REST API of the China-based Git hosting and DevOps platform operated by OSChina / Shenzhen Oschina (开源中国).
  version: 5.4.92
  contact:
    name: Gitee
    url: https://gitee.com
servers:
- url: https://gitee.com/api/v5
  description: Gitee Open API v5 (production)
security:
- accessTokenQuery: []
- bearerAuth: []
- oauth2:
  - projects
tags:
- name: Pull Requests
  description: Pull requests - create, review, merge, and inspect changes.
paths:
  /repos/{owner}/{repo}/pulls:
    parameters:
    - $ref: '#/components/parameters/Owner'
    - $ref: '#/components/parameters/Repo'
    get:
      operationId: listPullRequests
      tags:
      - Pull Requests
      summary: List pull requests
      parameters:
      - name: state
        in: query
        schema:
          type: string
          enum:
          - open
          - closed
          - merged
          - all
          default: open
      - name: page
        in: query
        schema:
          type: integer
          default: 1
      - name: per_page
        in: query
        schema:
          type: integer
          default: 20
          maximum: 100
      responses:
        '200':
          description: A list of pull requests.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PullRequest'
    post:
      operationId: createPullRequest
      tags:
      - Pull Requests
      summary: Create a pull request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - title
              - head
              - base
              properties:
                title:
                  type: string
                head:
                  type: string
                  description: Source branch.
                base:
                  type: string
                  description: Target branch.
                body:
                  type: string
      responses:
        '201':
          description: The created pull request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /repos/{owner}/{repo}/pulls/{number}:
    parameters:
    - $ref: '#/components/parameters/Owner'
    - $ref: '#/components/parameters/Repo'
    - name: number
      in: path
      required: true
      schema:
        type: integer
      description: The pull request number.
    get:
      operationId: getPullRequest
      tags:
      - Pull Requests
      summary: Get a single pull request
      responses:
        '200':
          description: The requested pull request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequest'
        '404':
          $ref: '#/components/responses/NotFound'
  /repos/{owner}/{repo}/pulls/{number}/merge:
    parameters:
    - $ref: '#/components/parameters/Owner'
    - $ref: '#/components/parameters/Repo'
    - name: number
      in: path
      required: true
      schema:
        type: integer
      description: The pull request number.
    get:
      operationId: isPullRequestMerged
      tags:
      - Pull Requests
      summary: Check whether a pull request has been merged
      responses:
        '204':
          description: The pull request has been merged.
        '404':
          description: The pull request has not been merged.
    put:
      operationId: mergePullRequest
      tags:
      - Pull Requests
      summary: Merge a pull request
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                merge_method:
                  type: string
                  enum:
                  - merge
                  - squash
                  - rebase
      responses:
        '200':
          description: The pull request was merged.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /repos/{owner}/{repo}/pulls/{number}/files:
    parameters:
    - $ref: '#/components/parameters/Owner'
    - $ref: '#/components/parameters/Repo'
    - name: number
      in: path
      required: true
      schema:
        type: integer
      description: The pull request number.
    get:
      operationId: listPullRequestFiles
      tags:
      - Pull Requests
      summary: List the changed files of a pull request (up to 300 diffs)
      responses:
        '200':
          description: A list of changed files.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties: true
components:
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    Owner:
      name: owner
      in: path
      required: true
      description: The repository owner (user or organization path).
      schema:
        type: string
    Repo:
      name: repo
      in: path
      required: true
      description: The repository path.
      schema:
        type: string
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
    PullRequest:
      type: object
      properties:
        id:
          type: integer
        number:
          type: integer
        title:
          type: string
        state:
          type: string
        body:
          type: string
        html_url:
          type: string
        head:
          type: object
          additionalProperties: true
        base:
          type: object
          additionalProperties: true
        mergeable:
          type: boolean
  securitySchemes:
    accessTokenQuery:
      type: apiKey
      in: query
      name: access_token
      description: Personal access token passed as the `access_token` query parameter. Present on the large majority of Gitee v5 operations.
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Personal access token passed as `Authorization: Bearer <token>`.'
    oauth2:
      type: oauth2
      description: Gitee OAuth2. Authorize at https://gitee.com/oauth/authorize and exchange for a token at https://gitee.com/oauth/token.
      flows:
        authorizationCode:
          authorizationUrl: https://gitee.com/oauth/authorize
          tokenUrl: https://gitee.com/oauth/token
          refreshUrl: https://gitee.com/oauth/token
          scopes:
            user_info: Read the user's profile.
            projects: Read and manage repositories.
            pull_requests: Read and manage pull requests.
            issues: Read and manage issues.
            notes: Read and manage comments.
            keys: Read and manage SSH keys.
            hook: Read and manage webhooks.
            groups: Read and manage organizations.
            gists: Read and manage gists.
            enterprises: Read and manage enterprises.
            emails: Read the user's email addresses.