Skip to content

Instantly share code, notes, and snippets.

@snyk-omar
Last active June 30, 2022 22:52
Show Gist options
  • Save snyk-omar/eb3cd1cbdca505dde2f02476dcbf7073 to your computer and use it in GitHub Desktop.
Save snyk-omar/eb3cd1cbdca505dde2f02476dcbf7073 to your computer and use it in GitHub Desktop.
accept.json for bitbucket servers not using https
{
"public": [
{
"//": "used for pushing up webhooks from bitbucket-server",
"method": "POST",
"path": "/webhook/bitbucket-server/:webhookId"
}
],
"private": [
{
"//": "list the user's projects",
"method": "GET",
"path": "/projects",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "list the project's repos",
"method": "GET",
"path": "/projects/:projectKey/repos",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "list the user's repos",
"method": "GET",
"path": "/repos",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "fetch a given repo",
"method": "GET",
"path": "/projects/:project/repos/:repo",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "read all file names to find manifests",
"method": "GET",
"path": "/rest/api/1.0/projects/:project/repos/:repo/files/:searchPath?",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/package.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fpackage.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/package-lock.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fpackage-lock.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/Gemfile.lock",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2FGemfile.lock",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/Gemfile",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2FGemfile",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/pom.xml",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fpom.xml",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/*req*.txt",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2F*req*.txt",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/requirements/*.txt",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Frequirements%2F*.txt",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/yarn.lock",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fyarn.lock",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/build.gradle",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fbuild.gradle",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/gradle.lockfile",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fgradle.lockfile",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/gradle.properties",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fgradle.properties",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/Packages.props",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2FPackages.props",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/Directory.Build.props",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2FDirectory.Build.props",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/Directory.Build.targets",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2FDirectory.Build.targets",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/build.sbt",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fbuild.sbt",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/packages.config",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fpackages.config",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/*.csproj",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2F*.csproj",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/*.vbproj",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2F*.vbproj",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/*.fsproj",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2F*.fsproj",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/project.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fproject.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/Gopkg.toml",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2FGopkg.toml",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/Gopkg.lock",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2FGopkg.lock",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/vendor.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fvendor.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/composer.lock",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fcomposer.lock",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/composer.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fcomposer.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/project.assets.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fproject.assets.json",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/Podfile",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2FPodfile",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/Podfile.lock",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2FPodfile.lock",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/go.mod",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fgo.mod",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/go.sum",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to determine the full dependency tree",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2Fgo.sum",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to scan Dockerfile",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/*Dockerfile*",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to scan Dockerfile",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2F*Dockerfile*",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to check if there's any ignore rules or existing patches",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/.snyk",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to check if there's any ignore rules or existing patches",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*%2F.snyk",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "get list of API capabilities",
"method": "GET",
"path": "/rest/capabilities",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "allow webhooks to be added, to allow commits to be checked by Snyk. Rules for what is sent to Snyk are controlled in the `public` accept filters",
"method": "POST",
"path": "/rest/api/1.0/projects/:project/repos/:repo/webhooks",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "allow webhooks to be deleted, used to cleanup when a user deactivates or deletes a project",
"method": "DELETE",
"path": "/rest/api/1.0/projects/:project/repos/:repo/webhooks/:webhookId",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to create commit status messages",
"method": "POST",
"path": "/rest/build-status/1.0/commits/:sha",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to create a new branch for fix PRs",
"method": "POST",
"path": "/rest/api/1.0/projects/:project/repos/:repo/branches",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to create or update a file for fix PRs",
"method": "PUT",
"path": "/rest/api/1.0/projects/:project/repos/:repo/browse/*",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to create a pull request for fix PRs",
"method": "POST",
"path": "/rest/api/1.0/projects/:project/repos/:repo/pull-requests",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to query for open pull requests by branch",
"method": "GET",
"path": "/rest/api/1.0/projects/:project/repos/:repo/pull-requests",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to check for a repo's default branch",
"method": "GET",
"path": "/rest/api/1.0/projects/:project/repos/:repo/branches/default",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "get a specific commit identified by the commit hash or name of a branch",
"method": "GET",
"path": "/rest/api/1.0/projects/:project/repos/:repo/commits/:sha",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to create a Code Insights report",
"method": "PUT",
"path": "/rest/insights/:apiVersion/projects/:project/repos/:repo/commits/:sha/reports/:report",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to remove a Code Insights report",
"method": "DELETE",
"path": "/rest/insights/:apiVersion/projects/:project/repos/:repo/commits/:sha/reports/:report",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to add Code Insights annotations to a report",
"method": "POST",
"path": "/rest/insights/:apiVersion/projects/:project/repos/:repo/commits/:sha/reports/:report/annotations",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "get list of API capabilities for Code Insights",
"method": "GET",
"path": "/rest/insights/:apiVersion/capabilities",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to remove Code Insights annotations for a report",
"method": "DELETE",
"path": "/rest/insights/:apiVersion/projects/:project/repos/:repo/commits/:sha/reports/:report/annotations",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to get current user. so we'll be able to fetch current user's repos, that are not part of any project. we're using atlassian's SDK api. Because atlassian's BB server rest api currently doesn't support such functionality",
"method": "GET",
"path": "/plugins/servlet/applinks/whoami",
"origin": "http://${BITBUCKET}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to get the current user's project-like structure. So we'll be able to bind all user's private repos (that are not included in different project)",
"method": "GET",
"path": "/projects/:projectKey",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to check if the user has admin or higher permissions",
"method": "GET",
"path": "/admin/permissions/users",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to get all the users. it's called only for admin permissioned user. to retrieve all the repos they can access",
"method": "GET",
"path": "/users",
"origin": "http://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
},
{
"//": "used to redirect requests to snyk git client",
"method": "any",
"path": "/snykgit/*",
"origin": "${GIT_CLIENT_URL}"
},
{
"//": "needed to load code snippets",
"method": "GET",
"path": "/projects/:project/repos/:repo/browse*/:file",
"origin": "https://${BITBUCKET_API}",
"auth": {
"scheme": "basic",
"username": "${BITBUCKET_USERNAME}",
"password": "${BITBUCKET_PASSWORD}"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment