Skip to main content
POST
/
api
/
bitbucket
/
repositories
/
commits
/bitbucket/repositories/commits
curl --request POST \
  --url https://api.anysite.io/api/bitbucket/repositories/commits \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "repo": "<string>",
  "count": 2,
  "timeout": 300,
  "branch": "master"
}
'
[
  {
    "hash": "<string>",
    "@type": "BitbucketCommit",
    "text": "",
    "created_at": "",
    "author_raw": "",
    "author": {
      "@type": "BitbucketAccount",
      "uuid": "",
      "display_name": "",
      "nickname": "<string>",
      "account_id": "<string>",
      "account_type": "",
      "account_status": "<string>",
      "is_staff": false,
      "location": "<string>",
      "created_at": "<string>",
      "image": "<string>",
      "web_url": ""
    },
    "parents": [],
    "repository_alias": "",
    "web_url": ""
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
repo
string
required

Repository in 'workspace/repo' format or a Bitbucket repository URL

Minimum string length: 1
Examples:

"atlassian/aui"

"https://bitbucket.org/atlassian/aui"

count
integer
required

Number of commits to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
branch
string | null

Branch name, tag, or commit hash to list commits from

Example:

"master"

Response

Successful Response

hash
string
required
@type
string
default:BitbucketCommit
text
string
default:""
created_at
string
default:""
author_raw
string
default:""
author
object | null
parents
string[]
repository_alias
string
default:""
web_url
string
default:""