GitHub Caches API

The Caches API from GitHub — 1 operation(s) for caches.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-caches-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: github-repo-actions-api Caches API
  description: 'Use the REST API to create, manage and control the workflow of public and

    private GitHub repositories.'
  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
servers:
- url: '{protocol}://{hostname}'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: api.github.com
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: https
tags:
- name: Caches
paths:
  /repos/{owner}/{repo}/actions/caches:
    get:
      summary: GitHub List Github Actions Caches for Repository
      description: 'Lists the GitHub Actions caches for a repository.


        OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Caches
      operationId: listGithubActionsCachesForRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/cache#list-github-actions-caches-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/actions-cache-git-ref-full'
      - $ref: '#/components/parameters/actions-cache-key'
      - $ref: '#/components/parameters/actions-cache-list-sort'
      - $ref: '#/components/parameters/direction'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/actions-cache-list'
              examples:
                default:
                  $ref: '#/components/examples/actions-cache-list'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        category: actions
        subcategory: cache
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Github Actions Caches for Repository (using Cache Key)
      description: 'Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref.


        OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Caches
      operationId: deleteGithubActionsCachesForRepositoryUsingCacheKey
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/actions-cache-key-required'
      - $ref: '#/components/parameters/actions-cache-git-ref-full'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/actions-cache-list'
              examples:
                default:
                  $ref: '#/components/examples/actions-cache-list'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: cache
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  parameters:
    actions-cache-key-required:
      name: key
      description: key for identifying the cache.
      in: query
      required: true
      schema:
        type: string
    direction:
      name: direction
      description: The direction to sort the results by.
      in: query
      required: false
      schema:
        type: string
        enum:
        - asc
        - desc
        default: desc
    actions-cache-git-ref-full:
      name: ref
      description: The full Git reference for narrowing down the cache. The `ref` for a branch should be formatted as `refs/heads/<branch name>`. To reference a pull request use `refs/pull/<number>/merge`.
      in: query
      required: false
      schema:
        type: string
    actions-cache-key:
      name: key
      description: An explicit key or prefix for identifying the cache
      in: query
      required: false
      schema:
        type: string
    actions-cache-list-sort:
      name: sort
      description: The property to sort the results by. `created_at` means when the cache was created. `last_accessed_at` means when the cache was last accessed. `size_in_bytes` is the size of the cache in bytes.
      in: query
      required: false
      schema:
        type: string
        enum:
        - created_at
        - last_accessed_at
        - size_in_bytes
        default: last_accessed_at
    per-page:
      name: per_page
      description: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 30
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    repo:
      name: repo
      description: The name of the repository without the `.git` extension. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    page:
      name: page
      description: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 1
  schemas:
    actions-cache-list:
      title: Repository actions caches
      description: Repository actions caches
      type: object
      properties:
        total_count:
          description: Total number of caches
          type: integer
          example: 2
        actions_caches:
          description: Array of caches
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 2
              ref:
                type: string
                example: refs/heads/main
              key:
                type: string
                example: Linux-node-958aff96db2d75d67787d1e634ae70b659de937b
              version:
                type: string
                example: 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0
              last_accessed_at:
                type: string
                format: date-time
                example: '2019-01-24T22:45:36.000Z'
              created_at:
                type: string
                format: date-time
                example: '2019-01-24T22:45:36.000Z'
              size_in_bytes:
                type: integer
                example: 1024
      required:
      - total_count
      - actions_caches
  headers:
    link:
      example: <https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"
      schema:
        type: string
  examples:
    actions-cache-list:
      value:
        total_count: 1
        actions_caches:
        - id: 505
          ref: refs/heads/main
          key: Linux-node-958aff96db2d75d67787d1e634ae70b659de937b
          version: 73885106f58cc52a7df9ec4d4a5622a5614813162cb516c759a30af6bf56e6f0
          last_accessed_at: '2019-01-24T22:45:36.000Z'
          created_at: '2019-01-24T22:45:36.000Z'
          size_in_bytes: 1024
  securitySchemes:
    bearerHttpAuthentication:
      description: Bearer Token
      type: http
      scheme: Bearer
externalDocs:
  description: GitHub Enterprise Developer Docs
  url: https://docs.github.com/enterprise-server@3.9/rest/