{ "opencollection": "1.0.0", "info": { "name": "Github Permissions API", "version": "1.1.4" }, "items": [ { "info": { "name": "Permissions", "type": "folder" }, "items": [ { "info": { "name": "GitHub Get Github Actions Permissions for an Organization", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/orgs/:org/actions/permissions", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." } ] }, "docs": "Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API." }, { "info": { "name": "GitHub Set Github Actions Permissions for an Organization", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/orgs/:org/actions/permissions", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization.\n\nIf the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions, then you cannot override them for the organization.\n\nOAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint." }, { "info": { "name": "GitHub Get Default Workflow Permissions for an Organization", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/orgs/:org/actions/permissions/workflow", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." } ] }, "docs": "Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization,\nas well as whether GitHub Actions can submit approving pull request reviews. For more information, see\n\"[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.9/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." }, { "info": { "name": "GitHub Set Default Workflow Permissions for an Organization", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/orgs/:org/actions/permissions/workflow", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions\ncan submit approving pull request reviews. For more information, see\n\"[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.9/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization).\"\n\nOAut" }, { "info": { "name": "GitHub List Repository Fine-grained Permissions for an Organization", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/orgs/:org/repository-fine-grained-permissions", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." } ] }, "docs": "Lists the fine-grained permissions that can be used in custom repository roles for an organization. For more information, see \"[About custom repository roles](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles).\"\n\nThe authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need th" }, { "info": { "name": "GitHub Check Team Permissions for Project", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/orgs/:org/teams/:team_slug/projects/:project_id", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." }, { "name": "team_slug", "value": "", "type": "path", "description": "The slug of the team name." }, { "name": "project_id", "value": "", "type": "path", "description": "The unique identifier of the project." } ] }, "docs": "Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`." }, { "info": { "name": "GitHub Add or Update Team Project Permissions", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/orgs/:org/teams/:team_slug/projects/:project_id", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." }, { "name": "team_slug", "value": "", "type": "path", "description": "The slug of the team name." }, { "name": "project_id", "value": "", "type": "path", "description": "The unique identifier of the project." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`." }, { "info": { "name": "GitHub Check Team Permissions for Repository", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/orgs/:org/teams/:team_slug/repos/:owner/:repo", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." }, { "name": "team_slug", "value": "", "type": "path", "description": "The slug of the team name." }, { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ] }, "docs": "Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.\n\nYou can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/enterprise-server@3.9/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.\n\nIf a team doesn't have permiss" }, { "info": { "name": "GitHub Add or Update Team Repository Permissions", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/orgs/:org/teams/:team_slug/repos/:owner/:repo", "params": [ { "name": "org", "value": "", "type": "path", "description": "The organization name. The name is not case sensitive." }, { "name": "team_slug", "value": "", "type": "path", "description": "The slug of the team name." }, { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ], "body": { "type": "json", "data": "{}" } }, "docs": "To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Conten" }, { "info": { "name": "GitHub Check Team Permissions for Project (legacy)", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/teams/:team_id/projects/:project_id", "params": [ { "name": "team_id", "value": "", "type": "path", "description": "The unique identifier of the team." }, { "name": "project_id", "value": "", "type": "path", "description": "The unique identifier of the project." } ] }, "docs": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#check-team-permissions-for-a-project) endpoint.\n\nChecks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team." }, { "info": { "name": "GitHub Add or Update Team Project Permissions (legacy)", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/teams/:team_id/projects/:project_id", "params": [ { "name": "team_id", "value": "", "type": "path", "description": "The unique identifier of the team." }, { "name": "project_id", "value": "", "type": "path", "description": "The unique identifier of the project." } ], "body": { "type": "json", "data": "{}" } }, "docs": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#add-or-update-team-project-permissions) endpoint.\n\nAdds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The pro" }, { "info": { "name": "GitHub Get Github Actions Permissions for Repository", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/actions/permissions", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ] }, "docs": "Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API." }, { "info": { "name": "GitHub Set Github Actions Permissions for Repository", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/actions/permissions", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository.\n\nIf the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint." }, { "info": { "name": "GitHub Get Default Workflow Permissions for Repository", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/actions/permissions/workflow", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ] }, "docs": "Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository,\nas well as if GitHub Actions can submit approving pull request reviews.\nFor more information, see \"[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.9/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-g" }, { "info": { "name": "GitHub Set Default Workflow Permissions for Repository", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/actions/permissions/workflow", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions\ncan submit approving pull request reviews.\nFor more information, see \"[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.9/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-git" }, { "info": { "name": "GitHub Get Repository Permissions for User", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/collaborators/:username/permission", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "username", "value": "", "type": "path", "description": "The handle for the GitHub user account." } ] }, "docs": "Checks the repository permission of a collaborator. The possible repository\npermissions are `admin`, `write`, `read`, and `none`.\n\n*Note*: The `permission` attribute provides the legacy base roles of `admin`, `write`, `read`, and `none`, where the\n`maintain` role is mapped to `write` and the `triage` role is mapped to `read`. To determine the role assigned to the\ncollaborator, see the `role_name` attribute, which will provide the full role name, including custom roles. The\n`permissions` hash can" }, { "info": { "name": "GitHub Check Team Permissions for Repository (legacy)", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/teams/:team_id/repos/:owner/:repo", "params": [ { "name": "team_id", "value": "", "type": "path", "description": "The unique identifier of the team." }, { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ] }, "docs": "**Note**: Repositories inherited through a parent team will also be checked.\n\n**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#check-team-permissions-for-a-repository) endpoint.\n\nYou can also get information about the specified repository, including what permissions the team grants on it," }, { "info": { "name": "GitHub Add or Update Team Repository Permissions (legacy)", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/teams/:team_id/repos/:owner/:repo", "params": [ { "name": "team_id", "value": "", "type": "path", "description": "The unique identifier of the team." }, { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ], "body": { "type": "json", "data": "{}" } }, "docs": "**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new \"[Add or update team repository permissions](https://docs.github.com/enterprise-server@3.9/rest/teams/teams#add-or-update-team-repository-permissions)\" endpoint.\n\nTo add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The " } ] } ], "bundled": true }