GitHub Sync API

The Sync API from GitHub — 3 operation(s) for sync.

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-sync-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Github Sync API
  version: 1.1.4
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  description: 'Operations tagged Sync across 2 of this provider''s published API definitions: github-repo-tags-api-openapi.yml, github-teams-openapi.yml. Each path carries the servers of the definition it was published in.'
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
- 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: Sync
paths:
  /repos/{owner}/{repo}/merge-upstream:
    post:
      summary: GitHub Sync Fork Branch with the Upstream Repository
      description: Sync a branch of a forked repository to keep it up-to-date with the upstream repository.
      tags:
      - Sync
      operationId: syncForkBranchWithTheUpstreamRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - 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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                branch:
                  type: string
                  description: The name of the branch which should be updated to match upstream.
              required:
              - branch
            examples:
              default:
                value:
                  branch: main
      responses:
        '200':
          description: The branch has been successfully synced with the upstream repository
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/merged-upstream'
              examples:
                default:
                  $ref: '#/components/examples/merged-upstream'
        '409':
          description: The branch could not be synced because of a merge conflict
        '422':
          description: The branch could not be synced for some other reason
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: branches
        subcategory: branches
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    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
  /admin/ldap/teams/{team_id}/sync:
    post:
      summary: GitHub Sync Ldap Mapping for Team
      description: Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready.
      operationId: syncLdapMappingForTeam
      tags:
      - Sync
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/ldap#sync-ldap-mapping-for-a-team
      parameters:
      - $ref: '#/components/parameters/team-id'
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
              examples:
                default:
                  value:
                    status: queued
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: ldap
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    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
components:
  parameters:
    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
    team-id:
      name: team_id
      description: The unique identifier of the team.
      in: path
      required: true
      schema:
        type: integer
  examples:
    merged-upstream:
      value:
        message: Successfully fetched and fast-forwarded from upstream defunkt:main
        merge_type: fast-forward
        base_branch: defunkt:main
  schemas:
    merged-upstream:
      title: Merged upstream
      description: Results of a successful merge upstream request
      type: object
      properties:
        message:
          type: string
          example: Example body text
        merge_type:
          type: string
          enum:
          - merge
          - fast-forward
          - none
          example: merge
        base_branch:
          type: string
          example: main
  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/
x-refined-from:
- github-repo-tags-api-openapi.yml
- github-teams-openapi.yml