{
  "opencollection": "1.0.0",
  "info": {
    "name": "github-repos-api",
    "version": "1.1.4"
  },
  "items": [
    {
      "info": {
        "name": "Code",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "GitHub List Code Scanning Alerts for Repository",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/alerts",
            "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": "tool_name",
                "value": "",
                "type": "query",
                "description": "The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both."
              },
              {
                "name": "tool_guid",
                "value": "",
                "type": "query",
                "description": "The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both."
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "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).\""
              },
              {
                "name": "per_page",
                "value": "",
                "type": "query",
                "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).\""
              },
              {
                "name": "ref",
                "value": "",
                "type": "query",
                "description": "The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`."
              },
              {
                "name": "direction",
                "value": "",
                "type": "query",
                "description": "The direction to sort the results by."
              },
              {
                "name": "sort",
                "value": "created",
                "type": "query",
                "description": "The property by which to sort the results."
              },
              {
                "name": "state",
                "value": "open",
                "type": "query",
                "description": "If specified, only code scanning alerts with this state will be returned."
              },
              {
                "name": "severity",
                "value": "example_value",
                "type": "query",
                "description": "If specified, only code scanning alerts with this severity will be returned."
              }
            ]
          },
          "docs": "Lists code scanning alerts. The response includes a `most_recent_instance` object."
        },
        {
          "info": {
            "name": "GitHub Get Code Scanning Default Setup Configuration",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/default-setup",
            "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 a code scanning default setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories."
        },
        {
          "info": {
            "name": "GitHub Update Code Scanning Default Setup Configuration",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/default-setup",
            "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": "Updates a code scanning default setup configuration.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories."
        }
      ]
    },
    {
      "info": {
        "name": "Alerts",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "GitHub Get Code Scanning Alert",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/alerts/:alert_number",
            "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": "alert_number",
                "value": "",
                "type": "path",
                "description": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation."
              }
            ]
          },
          "docs": "Gets a single code scanning alert.\n\nOAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories."
        },
        {
          "info": {
            "name": "GitHub Update Code Scanning Alert",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/alerts/:alert_number",
            "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": "alert_number",
                "value": "",
                "type": "path",
                "description": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the status of a single code scanning alert.\nOAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories."
        },
        {
          "info": {
            "name": "GitHub List Instances of Code Scanning Alert",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/alerts/:alert_number/instances",
            "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": "alert_number",
                "value": "",
                "type": "path",
                "description": "The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation."
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "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).\""
              },
              {
                "name": "per_page",
                "value": "",
                "type": "query",
                "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).\""
              },
              {
                "name": "ref",
                "value": "",
                "type": "query",
                "description": "The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`."
              }
            ]
          },
          "docs": "Lists all instances of the specified code scanning alert.\n\nOAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories."
        }
      ]
    },
    {
      "info": {
        "name": "Analysis",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "GitHub List Code Scanning Analyses for Repository",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/analyses",
            "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": "tool_name",
                "value": "",
                "type": "query",
                "description": "The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both."
              },
              {
                "name": "tool_guid",
                "value": "",
                "type": "query",
                "description": "The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both."
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "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).\""
              },
              {
                "name": "per_page",
                "value": "",
                "type": "query",
                "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).\""
              },
              {
                "name": "ref",
                "value": "main",
                "type": "query",
                "description": "The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`."
              },
              {
                "name": "sarif_id",
                "value": "12345678",
                "type": "query",
                "description": "Filter analyses belonging to the same SARIF upload."
              },
              {
                "name": "direction",
                "value": "",
                "type": "query",
                "description": "The direction to sort the results by."
              },
              {
                "name": "sort",
                "value": "created",
                "type": "query",
                "description": "The property by which to sort the results."
              }
            ]
          },
          "docs": "Lists the details of all code scanning analyses for a repository,\nstarting with the most recent.\nThe response is paginated and you can use the `page` and `per_page` parameters\nto list the analyses you're interested in.\nBy default 30 analyses are listed per page.\n\nThe `rules_count` field in the response give the number of rules\nthat were run in the analysis.\nFor very old analyses this data is not available,\nand `0` is returned in this field.\n\n**Deprecation notice**:\nThe `tool_name` field is depre"
        },
        {
          "info": {
            "name": "GitHub Get Code Scanning Analysis for Repository",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/analyses/:analysis_id",
            "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": "analysis_id",
                "value": "42",
                "type": "path",
                "description": "The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation."
              }
            ]
          },
          "docs": "Gets a specified code scanning analysis for a repository.\n\nThe default JSON response contains fields that describe the analysis.\nThis includes the Git reference and commit SHA to which the analysis relates,\nthe datetime of the analysis, the name of the code scanning tool,\nand the number of alerts.\n\nThe `rules_count` field in the default response give the number of rules\nthat were run in the analysis.\nFor very old analyses this data is not available,\nand `0` is returned in this field.\n\nThis endpo"
        },
        {
          "info": {
            "name": "GitHub Delete Code Scanning Analysis from Repository",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/analyses/:analysis_id",
            "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": "analysis_id",
                "value": "42",
                "type": "path",
                "description": "The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation."
              },
              {
                "name": "confirm_delete",
                "value": "example_value",
                "type": "query",
                "description": "Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll Get 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.`"
              }
            ]
          },
          "docs": "Deletes a specified code scanning analysis from a repository.\n\nYou can delete one analysis at a time.\nTo delete a series of analyses, start with the most recent analysis and work backwards.\nConceptually, the process is similar to the undo function in a text editor.\n\nWhen you list the analyses for a repository,\none or more will be identified as deletable in the response:\n\n```\n\"deletable\": true\n```\n\nAn analysis is deletable when it's the most recent in a set of analyses.\nTypically, a repository wi"
        },
        {
          "info": {
            "name": "GitHub Upload an Analysis as Sarif Data",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/sarifs",
            "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": "Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. For troubleshooting information, see \"[Troubleshooting SARIF uploads](https://docs.github.com/enterprise-server@3.9/code-security/code-scanning/troubleshooting-sarif).\"\n\nThere are two places where you can upload code scanning results.\n - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull"
        }
      ]
    },
    {
      "info": {
        "name": "About",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "GitHub Get Information About Sarif Upload",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{protocol}://{hostname}/repos/:owner/:repo/code-scanning/sarifs/:sarif_id",
            "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": "sarif_id",
                "value": "12345678",
                "type": "path",
                "description": "The SARIF ID obtained after uploading."
              }
            ]
          },
          "docs": "Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see \"[Get code scanning analysis for a repository](/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository).\"\nOAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endp"
        }
      ]
    }
  ],
  "bundled": true
}