GitHub Gists API

The GitHub Gists API lets you programmatically manage gistslightweight code snippets and notesover HTTP. You can create gists (public or secret/unlisted), read individual gists, list public gists, your own, a users, and those youve starred, fetch raw file contents, view version history and commits, update gists by adding/renaming/removing files or changing descriptions, and delete them. It also supports forking, starring/un-starring and checking star status, plus full CRUD for gist comments.

Operations 20

GET /gists GitHub List Gists for the Authenticated User #
POST /gists GitHub Create a Gist #
GET /gists/public GitHub List Public Gists #
GET /gists/starred GitHub List Starred Gists #
GET /gists/{gist_id} GitHub Get a Gist #
PATCH /gists/{gist_id} GitHub Update a Gist #
DELETE /gists/{gist_id} GitHub Delete a Gist #
GET /gists/{gist_id}/comments GitHub List Gist Comments #
POST /gists/{gist_id}/comments GitHub Create a Gist Comment #
GET /gists/{gist_id}/comments/{comment_id} GitHub Get a Gist Comment #
PATCH /gists/{gist_id}/comments/{comment_id} GitHub Update a Gist Comment #
DELETE /gists/{gist_id}/comments/{comment_id} GitHub Delete a Gist Comment #
GET /gists/{gist_id}/commits GitHub List Gist Commits #
GET /gists/{gist_id}/forks GitHub List Gist Forks #
POST /gists/{gist_id}/forks GitHub Fork a Gist #
GET /gists/{gist_id}/star GitHub Check if a Gist is Starred #
PUT /gists/{gist_id}/star GitHub Star a Gist #
DELETE /gists/{gist_id}/star GitHub Unstar a Gist #
GET /gists/{gist_id}/{sha} GitHub Get a Gist Revision #
GET /users/{username}/gists GitHub List Gists for a User #

Documentation

Specifications

Other Resources

🔗
APIsJSON
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/apis.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-commit-file-to-new-branch-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-create-label-and-triage-issue-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-create-milestone-and-issue-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-create-org-repository-and-issue-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-create-repository-and-issue-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-dispatch-workflow-and-poll-run-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-fork-and-branch-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-fork-gist-and-comment-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-inspect-latest-commit-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-onboard-org-member-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-open-and-merge-pull-request-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-open-pull-request-and-request-reviewers-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-propose-change-pull-request-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-provision-org-repo-with-webhook-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-publish-release-with-asset-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-report-bug-issue-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-review-and-merge-pull-request-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-star-and-comment-gist-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-tag-commit-and-release-workflow.yml
🔗
Arazzo
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/arazzo/github-verify-and-merge-branch-workflow.yml

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/github-gists-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

github-gists-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: GitHub v3 REST Gists API
  description: GitHub's v3 REST API.
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Gists
  description: View, modify your gists.
paths:
  /gists:
    get:
      summary: GitHub List Gists for the Authenticated User
      description: 'Lists the authenticated user''s gists or if called anonymously, this endpoint returns all public gists:'
      tags:
      - Gists
      operationId: gists/list
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#list-gists-for-the-authenticated-user
      parameters:
      - $ref: '#/components/parameters/since'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/base-gist'
              examples:
                default:
                  $ref: '#/components/examples/base-gist-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create a Gist
      description: 'Allows you to add a new gist with one or more files.


        **Note:** Don''t name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.'
      operationId: gists/create
      tags:
      - Gists
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#create-a-gist
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                description:
                  description: Description of the gist
                  example: Example Ruby script
                  type: string
                files:
                  description: Names and content for the files that make up the gist
                  example:
                    hello.rb:
                      content: puts "Hello, World!"
                  type: object
                  additionalProperties:
                    type: object
                    properties:
                      content:
                        description: Content of the file
                        readOnly: false
                        type: string
                    required:
                    - content
                public:
                  oneOf:
                  - description: Flag indicating whether the gist is public
                    example: true
                    type: boolean
                    default: false
                  - type: string
                    example: 'true'
                    default: 'false'
                    enum:
                    - 'true'
                    - 'false'
              required:
              - files
              type: object
            examples:
              default:
                summary: Creating a gist
                value:
                  description: Example of a gist
                  public: false
                  files:
                    README.md:
                      content: Hello World
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gist-simple'
              examples:
                default:
                  $ref: '#/components/examples/gist'
          headers:
            Location:
              example: https://api.github.com/gists/aa5a315d61ae9438b18d
              schema:
                type: string
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gists/public:
    get:
      summary: GitHub List Public Gists
      description: 'List public gists sorted by most recently updated to least recently updated.


        Note: With [pagination](https://docs.github.com/enterprise-server@3.9/rest/guides/using-pagination-in-the-rest-api), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.'
      tags:
      - Gists
      operationId: gists/list-public
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#list-public-gists
      parameters:
      - $ref: '#/components/parameters/since'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/base-gist'
              examples:
                default:
                  $ref: '#/components/examples/base-gist-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gists/starred:
    get:
      summary: GitHub List Starred Gists
      description: 'List the authenticated user''s starred gists:'
      tags:
      - Gists
      operationId: gists/list-starred
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#list-starred-gists
      parameters:
      - $ref: '#/components/parameters/since'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/base-gist'
              examples:
                default:
                  $ref: '#/components/examples/base-gist-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '304':
          $ref: '#/components/responses/not_modified'
        '401':
          $ref: '#/components/responses/requires_authentication'
        '403':
          $ref: '#/components/responses/forbidden'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gists/{gist_id}:
    get:
      summary: GitHub Get a Gist
      description: 'Gets a specified gist.


        This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."


        - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.

        - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences.'
      tags:
      - Gists
      operationId: gists/get
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#get-a-gist
      parameters:
      - $ref: '#/components/parameters/gist-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gist-simple'
              examples:
                default:
                  $ref: '#/components/examples/gist'
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden_gist'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update a Gist
      description: 'Allows you to update a gist''s description and to update, delete, or rename gist files. Files

        from the previous version of the gist that aren''t explicitly changed during an edit

        are unchanged.


        At least one of `description` or `files` is required.


        This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."


        - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.

        - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences.'
      tags:
      - Gists
      operationId: gists/update
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#update-a-gist
      parameters:
      - $ref: '#/components/parameters/gist-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                description:
                  description: The description of the gist.
                  example: Example Ruby script
                  type: string
                files:
                  description: 'The gist files to be updated, renamed, or deleted. Each `key` must match the current filename

                    (including extension) of the targeted gist file. For example: `hello.py`.


                    To delete a file, set the whole file to null. For example: `hello.py : null`. The file will also be

                    deleted if the specified object does not contain at least one of `content` or `filename`.'
                  example:
                    hello.rb:
                      content: blah
                      filename: goodbye.rb
                  type: object
                  additionalProperties:
                    type:
                    - object
                    - 'null'
                    properties:
                      content:
                        description: The new content of the file.
                        type: string
                      filename:
                        description: The new filename for the file.
                        type:
                        - string
                        - 'null'
              type:
              - object
              - 'null'
            examples:
              updateGist:
                summary: Updating a gist
                value:
                  description: An updated gist description
                  files:
                    README.md:
                      content: Hello World from GitHub
              deleteFile:
                summary: Deleting a gist file
                value:
                  files:
                    hello.py: null
              renameFile:
                summary: Renaming a gist file
                value:
                  files:
                    hello.py:
                      filename: goodbye.py
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gist-simple'
              examples:
                updateGist:
                  $ref: '#/components/examples/gist'
                deleteFile:
                  $ref: '#/components/examples/delete-gist-file'
                renameFile:
                  $ref: '#/components/examples/rename-gist-file'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete a Gist
      description: ''
      tags:
      - Gists
      operationId: gists/delete
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#delete-a-gist
      parameters:
      - $ref: '#/components/parameters/gist-id'
      responses:
        '204':
          description: Response
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gists/{gist_id}/comments:
    get:
      summary: GitHub List Gist Comments
      description: 'Lists the comments on a gist.


        This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."


        - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.

        - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences.'
      tags:
      - Gists
      operationId: gists/list-comments
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/comments#list-gist-comments
      parameters:
      - $ref: '#/components/parameters/gist-id'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/gist-comment'
              examples:
                default:
                  $ref: '#/components/examples/gist-comment-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: comments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create a Gist Comment
      description: 'Creates a comment on a gist.


        This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."


        - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.

        - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences.'
      tags:
      - Gists
      operationId: gists/create-comment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/comments#create-a-gist-comment
      parameters:
      - $ref: '#/components/parameters/gist-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                body:
                  description: The comment text.
                  type: string
                  maxLength: 65535
                  example: Body of the attachment
              type: object
              required:
              - body
            examples:
              default:
                summary: Creating a comment in a gist
                value:
                  body: This is a comment to a gist
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gist-comment'
              examples:
                default:
                  $ref: '#/components/examples/gist-comment'
          headers:
            Location:
              example: https://api.github.com/gists/a6db0bec360bb87e9418/comments/1
              schema:
                type: string
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: comments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gists/{gist_id}/comments/{comment_id}:
    get:
      summary: GitHub Get a Gist Comment
      description: 'Gets a comment on a gist.


        This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."


        - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.

        - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences.'
      tags:
      - Gists
      operationId: gists/get-comment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/comments#get-a-gist-comment
      parameters:
      - $ref: '#/components/parameters/gist-id'
      - $ref: '#/components/parameters/comment-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gist-comment'
              examples:
                default:
                  $ref: '#/components/examples/gist-comment'
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden_gist'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: comments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update a Gist Comment
      description: 'Updates a comment on a gist.


        This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."


        - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.

        - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences.'
      tags:
      - Gists
      operationId: gists/update-comment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/comments#update-a-gist-comment
      parameters:
      - $ref: '#/components/parameters/gist-id'
      - $ref: '#/components/parameters/comment-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                body:
                  description: The comment text.
                  type: string
                  maxLength: 65535
                  example: Body of the attachment
              type: object
              required:
              - body
            examples:
              default:
                summary: Updating a comment in a gist
                value:
                  body: This is an update to a comment in a gist
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gist-comment'
              examples:
                default:
                  $ref: '#/components/examples/gist-comment'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: comments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete a Gist Comment
      description: ''
      tags:
      - Gists
      operationId: gists/delete-comment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/comments#delete-a-gist-comment
      parameters:
      - $ref: '#/components/parameters/gist-id'
      - $ref: '#/components/parameters/comment-id'
      responses:
        '204':
          description: Response
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: comments
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gists/{gist_id}/commits:
    get:
      summary: GitHub List Gist Commits
      description: ''
      tags:
      - Gists
      operationId: gists/list-commits
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#list-gist-commits
      parameters:
      - $ref: '#/components/parameters/gist-id'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/gist-commit'
              examples:
                default:
                  $ref: '#/components/examples/gist-commit-items'
          headers:
            Link:
              example: <https://api.github.com/resource?page=2>; rel="next"
              schema:
                type: string
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gists/{gist_id}/forks:
    get:
      summary: GitHub List Gist Forks
      description: ''
      tags:
      - Gists
      operationId: gists/list-forks
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#list-gist-forks
      parameters:
      - $ref: '#/components/parameters/gist-id'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/gist-simple'
              examples:
                default:
                  $ref: '#/components/examples/gist-fork-items'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Fork a Gist
      description: ''
      tags:
      - Gists
      operationId: gists/fork
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#fork-a-gist
      parameters:
      - $ref: '#/components/parameters/gist-id'
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/base-gist'
              examples:
                default:
                  $ref: '#/components/examples/base-gist'
          headers:
            Location:
              example: https://api.github.com/gists/aa5a315d61ae9438b18d
              schema:
                type: string
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gists/{gist_id}/star:
    get:
      summary: GitHub Check if a Gist is Starred
      description: ''
      tags:
      - Gists
      operationId: gists/check-is-starred
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#check-if-a-gist-is-starred
      parameters:
      - $ref: '#/components/parameters/gist-id'
      responses:
        '204':
          description: Response if gist is starred
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          description: Not Found if gist is not starred
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      summary: GitHub Star a Gist
      description: Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/enterprise-server@3.9/rest/guides/getting-started-with-the-rest-api#http-method)."
      tags:
      - Gists
      operationId: gists/star
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#star-a-gist
      parameters:
      - $ref: '#/components/parameters/gist-id'
      responses:
        '204':
          description: Response
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Unstar a Gist
      description: ''
      tags:
      - Gists
      operationId: gists/unstar
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#unstar-a-gist
      parameters:
      - $ref: '#/components/parameters/gist-id'
      responses:
        '204':
          description: Response
        '304':
          $ref: '#/components/responses/not_modified'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gists/{gist_id}/{sha}:
    get:
      summary: GitHub Get a Gist Revision
      description: 'Gets a specified gist revision.


        This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."


        - **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.

        - **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences.'
      tags:
      - Gists
      operationId: gists/get-revision
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/gists/gists#get-a-gist-revision
      parameters:
      - $ref: '#/components/parameters/gist-id'
      - name: sha
        in: path
        required: true
        schema:
          type: string
        example: abc123def456789012345678901234567890
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gist-simple'
              examples:
                default:
                  $ref: '#/components/examples/gist'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: gists
        subcategory: gists
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /users/{username}/gists:
    get:
      summary: GitHub List Gists for a User
      description: 'Lists public gists for 

# --- truncated at 32 KB (78 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-gists-api-openapi.yml