Getting engineering data via Awesome Graphs Cloud REST API

The Awesome Graphs Cloud REST API lets you export raw pull request data to help you:

  • Seamlessly integrate with analytics platforms

  • Build custom dashboards and visualizations

  • Combine data from Bitbucket with other sources for deeper insights

Overview

The REST API provides access to resources via URI paths, uses JSON as its communication format, and the standard HTTP methods like GET, PUT, POST, and DELETE.

The URIs for resources have the following structure:

https://awesome-graphs.stiltsoft.net/rest/latest/{resource-name}
CODE

For example:

https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests?state=merged&pagelen=10
CODE
Question mark (?) introduces the query string parameters. The parameters are separated with an ampersand (&) separating them. The order of the parameters does not matter.

Authentication

To access the Awesome Graphs for Bitbucket Cloud REST API, you need to use an API Access Token that is generated inside your Bitbucket workspace. These tokens provide secure access to our API and are managed independently of Bitbucket’s default token systems. 

In your Bitbucket workspace settings, locate the Awesome Graphs section and navigate to the Access Tokens page. From there, a workspace admin can generate tokens that authorize access to the Awesome Graphs REST API. Each token operates within the context of the workspace in which it was created. It grants access exclusively to the data available in that specific workspace.

After creating a token, you can authenticate your request by sending the token in the Authorization header of your request. For example, in the following request, replace {access_token} with a reference to your token:

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests?state=merged&pagelen=10' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE

Please note that each token is valid for 1 year from the date of creation for security reasons. After that, the token becomes invalid, and any API requests using it will result in a 401 Unauthorized error. Please make sure to renew your tokens before they expire.


Pull Requests APIs

Below is the list of resources to retrieve pull request data.

Workspace level

Returns aggregated data on pull requests across all repositories in a given Bitbucket Cloud workspace.

Get pull requests

GET /rest/latest/workspace/{workspace-slug}/pull-requests

Returns a list of pull requests across all repositories within the specified workspace.

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

Query Parameters

ParameterValueDescription
pageintegerIndicates the page number of results to return. Must be 1 or higher. Defaults to 1.
pagelenintegerSpecifies how many results to return per page. Can be between 1 and 500. Defaults to 500.
statestringIf indicated, only pull requests in the specified state will be returned. Can be all, open, merged, declined, or superseded. Defaults to all.
since_datestringDate in ISO-8601 format to retrieve pull requests since. Example: 2025-05-30T00:00:00Z. If neither since_date nor until_date is provided, returns pull requests from the last 30 days.
until_datestringDate in ISO-8601 format to retrieve pull requests until. Example: 2025-05-30T00:00:00Z. 
date_typestringDefines which date type is used for since_date / until_date filtering. Can be either created or updated. Defaults to created.

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests?state=merged&pagelen=10' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests?state=merged&pagelen=10"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests?state=merged&pagelen=10', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests?state=merged&pagelen=10"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests?state=merged&pagelen=10',
  $headers
);

var_dump($response);
PHP

Page of pull requests from all repositories in a workspace.

{
  "values": [
    {
      "id": 108,
      "title": "Release v2.3",
      "state": "MERGED",
      "closed": true,
      "author": {
        "display_name": "Jane Smith",
        "uuid": "{75aaf68d-117a-4d99-8a46-0273fe4b1032}"
      },
      "destination": {
        "branch": {
          "name": "main"
        },
        "repository": {
          "slug": "awesome-repo"
        }
      },
      "created_date": "2024-10-08T08:33:11.595774Z",
      "closed_date": "2024-10-10T11:52:07.637619Z",
      "updated_date": "2024-10-10T11:52:07.637619Z",
      "comment_count": 6,
      "task_count": 6
    }
  ],
  "page": 2,
  "pagelen": 10,
  "previous": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/pull-requests?page=1&pagelen=10",
  "next": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/pull-requests?page=3&pagelen=10"
}
CODE
Invalid Request
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE

Statistics

GET /rest/latest/workspace/{workspace-slug}/pull-requests/statistics

Returns the number of pull requests in all projects and repositories, grouped by state.

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

Query Parameters 

ParameterValueDescription
statestringIf indicated, only pull requests in the specified state will be returned. Can be all, open, merged, declined, or superseded. Defaults to all.
since_datestringDate in ISO-8601 format to retrieve pull requests since. Example: 2025-05-30T00:00:00Z. If neither since_date nor until_date is provided, returns pull requests from the last 30 days.
until_datestringDate in ISO-8601 format to retrieve pull requests until. Example: 2025-05-30T00:00:00Z. 
date_typestringDefines which date type is used for since_date / until_date filtering. Can be either created or updated. Defaults to created.

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests/statistics' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests/statistics"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests/statistics', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests/statistics"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/pull-requests/statistics',
  $headers
);

var_dump($response);
PHP

Number of pull requests in a workspace.

{
  "pull_requests": 367,
  "state": {
    "declined": 105,
    "merged": 57,
    "open": 104,
    "superseded": 101
  }
}
CODE
Invalid Request
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE

Repository level

Returns a list of pull requests from a specific repository in a given Bitbucket Cloud workspace.

Get pull requests

GET /rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests

Returns a list of pull requests from the specified repository.

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

repository-slug

string

Unique identifier of the repository, e.g. `my-repo` in `https://bitbucket.org/my-workspace/my-repo/`.

Query Parameters

ParameterValueDescription
pageintegerIndicates the page number of results to return. Must be 1 or higher. Defaults to 1.
pagelenintegerSpecifies how many results to return per page. Can be between 1 and 500. Defaults to 500.
statestringIf indicated, only pull requests in the specified state will be returned. Can be all, open, merged, declined, or superseded. Defaults to all.
since_datestringDate in ISO-8601 format to retrieve pull requests since. Example: 2025-05-30T00:00:00Z. If neither since_date nor until_date is provided, returns pull requests from the last 30 days.
until_datestringDate in ISO-8601 format to retrieve pull requests until. Example: 2025-05-30T00:00:00Z. 
date_typestringDefines which date type is used for since_date / until_date filtering. Can be either created or updated. Defaults to created.

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests?state=merged&pagelen=10' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests?state=merged&pagelen=10"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests?state=merged&pagelen=10', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests?state=merged&pagelen=10"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests?state=merged&pagelen=10',
  $headers
);

var_dump($response);
PHP

Page of pull requests from a specified repository.

{
  "values": [
    {
      "id": 108,
      "title": "Release v2.3",
      "state": "MERGED",
      "closed": true,
      "author": {
        "display_name": "Jane Smith",
        "uuid": "{75aaf68d-117a-4d99-8a46-0273fe4b1032}"
      },
      "destination": {
        "branch": {
          "name": "main"
        },
        "repository": {
          "slug": "awesome-repo"
        }
      },
      "created_date": "2024-10-08T08:33:11.595774Z",
      "closed_date": "2024-10-10T11:52:07.637619Z",
      "updated_date": "2024-10-10T11:52:07.637619Z",
      "comment_count": 6,
      "task_count": 6
    }
  ],
  "page": 2,
  "pagelen": 10,
  "previous": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/repos/awesome-repo/pull-requests?page=1&pagelen=10",
  "next": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/repos/awesome-repo/pull-requests?page=3&pagelen=10"
}
CODE
Invalid Request
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE

Statistics

GET /rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests/statistics

Returns the number of pull requests in the specified repository, grouped by state.

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

repository-slug

string

Unique identifier of the repository, e.g. `my-repo` in `https://bitbucket.org/my-workspace/my-repo/`.

Query Parameters

ParameterValueDescription
statestringIf indicated, only pull requests in the specified state will be returned. Can be all, open, merged, declined, or superseded. Defaults to all.
since_datestringDate in ISO-8601 format to retrieve pull requests since. Example: 2025-05-30T00:00:00Z. If neither since_date nor until_date is provided, returns pull requests from the last 30 days.
until_datestringDate in ISO-8601 format to retrieve pull requests until. Example: 2025-05-30T00:00:00Z. 
date_typestringDefines which date type is used for since_date / until_date filtering. Can be either created or updated. Defaults to created.

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests/statistics' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests/statistics"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests/statistics', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests/statistics"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/pull-requests/statistics',
  $headers
);

var_dump($response);
PHP

Number of pull requests in a repository.

{
  "pull_requests": 367,
  "state": {
    "declined": 105,
    "merged": 57,
    "open": 104,
    "superseded": 101
  }
}
CODE
Invalid Request
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE

User level

Returns pull request data and statistics associated with a specific user in a Bitbucket Cloud workspace.

To use user-level pull request endpoints, you need the user ID (user_uuid) of the user. This can be retrieved using the /users endpoint.

Get pull requests

GET /rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests

Returns a list of pull requests authored by the specified user across all repositories in the workspace.

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

user_uuid

string

Unique identifier of the user, e.g. `{026f362e-72dc-42e5-80ba-14fd3a276373}`. Can be retrieved using the /users endpoint.

Query Parameters

ParameterValueDescription
pageintegerIndicates the page number of results to return. Must be 1 or higher. Defaults to 1.
pagelenintegerSpecifies how many results to return per page. Can be between 1 and 500. Defaults to 500.
statestringIf indicated, only pull requests in the specified state will be returned. Can be all, open, merged, declined, or superseded. Defaults to all.
since_datestringDate in ISO-8601 format to retrieve pull requests since. Example: 2025-05-30T00:00:00Z. If neither since_date nor until_date is provided, returns pull requests from the last 30 days.
until_datestringDate in ISO-8601 format to retrieve pull requests until. Example: 2025-05-30T00:00:00Z. 
date_typestringDefines which date type is used for since_date / until_date filtering. Can be either created or updated. Defaults to created.

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests?state=merged&pagelen=10' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests?state=merged&pagelen=10"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests?state=merged&pagelen=10', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests?state=merged&pagelen=10"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests?state=merged&pagelen=10',
  $headers
);

var_dump($response);
PHP

Page of pull requests by a specified user from all repositories in a workspace.

{
  "values": [
    {
      "id": 108,
      "title": "Release v2.3",
      "state": "MERGED",
      "closed": true,
      "author": {
        "display_name": "Jane Smith",
        "uuid": "{75aaf68d-117a-4d99-8a46-0273fe4b1032}"
      },
      "destination": {
        "branch": {
          "name": "main"
        },
        "repository": {
          "slug": "awesome-repo"
        }
      },
      "created_date": "2024-10-08T08:33:11.595774Z",
      "closed_date": "2024-10-10T11:52:07.637619Z",
      "updated_date": "2024-10-10T11:52:07.637619Z",
      "comment_count": 6,
      "task_count": 6
    }
  ],
  "page": 2,
  "pagelen": 10,
  "previous": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/users/{user_uuid}/pull-requests?page=1&pagelen=10",
  "next": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/users/{user_uuid}/pull-requests?page=3&pagelen=10"
}
CODE
Invalid Request
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE

Statistics

GET /rest/latest/{workspace-slug}/users/{user_uuid}/pull-requests/statistics

Returns the number of pull requests by the specified user, grouped by state.

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

user_uuid

string

Unique identifier of the user, e.g. `{026f362e-72dc-42e5-80ba-14fd3a276373}`. Can be retrieved using the /users endpoint.

Query Parameters 

ParameterValueDescription
statestringIf indicated, only pull requests in the specified state will be returned. Can be all, open, merged, declined, or superseded. Defaults to all.
since_datestringDate in ISO-8601 format to retrieve pull requests since. Example: 2025-05-30T00:00:00Z. If neither since_date nor until_date is provided, returns pull requests from the last 30 days.
until_datestringDate in ISO-8601 format to retrieve pull requests until. Example: 2025-05-30T00:00:00Z. 
date_typestringDefines which date type is used for since_date / until_date filtering. Can be either created or updated. Defaults to created.

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests/statistics' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests/statistics"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests/statistics', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests/statistics"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/pull-requests/statistics',
  $headers
);

var_dump($response);
PHP

Number of pull requests by a specified user.

{
  "pull_requests": 367,
  "state": {
    "declined": 105,
    "merged": 57,
    "open": 104,
    "superseded": 101
  }
}
CODE
Invalid Request
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE

Get list of users in a workspace with their IDs

GET /rest/latest/{workspace-slug}/users

Returns the list of users in the specified workspace along with their user IDs (user_uuid)

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

Query Parameters 

ParameterValueDescription
filter_display_namestringIf indicated, returns the ID (user_uuid) of a particular user.

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE


# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users',
  $headers
);

var_dump($response);
PHP

List of all users with user IDs.

{
  "values": [
    {
      "uuid": "{03b8f99e-5934-476e-911f-238017a19ff8}",
      "display_name": "Damon Blais"
    },
    {
      "uuid": "{1fba3c05-2e5d-4430-81fe-029abf6cc3c3}",
      "display_name": "Eric Neidhardt"
    },
    {
      "uuid": "{3f8a789e-8efd-4ee3-9a58-78162207a99e}",
      "display_name": "Paul Brown"
    }
  ],
  "page": 1,
  "pagelen": 500
}
CODE
Invalid Request
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE

Commits APIs

Below is the list of resources to retrieve commit data.

Workspace level

Returns aggregated data on commits across all repositories in a given Bitbucket Cloud workspace.

Get commits

GET /rest/latest/workspace/{workspace-slug}/commits

Returns a list of commits across all repositories within the specified workspace.

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

Query Parameters

ParameterValueDescription
pageintegerIndicates the page number of results to return. Must be 1 or higher. Defaults to 1.
pagelenintegerSpecifies how many results to return per page. Can be between 1 and 500. Defaults to 500.
orderstringThe order to return commits in, either oldest (as in: "oldest first") or newest. Defaults to newest.
mergesstringIf present, controls how merge commits should be filtered. Can be either exclude, to exclude merge commits, include, to include both merge commits and non-merge commits or only, to only return merge commits. Defaults to exclude.
since_datestringDate in ISO-8601 format to retrieve commits since. Example: 2025-05-30T00:00:00Z.
until_datestringDate in ISO-8601 format to retrieve commits until. Example: 2025-05-30T00:00:00Z. 

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/commits?merges=exclude&order=NEWEST&pagelen=50&page=1' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/commits?merges=exclude&order=NEWEST&pagelen=50&page=1"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/commits?merges=exclude&order=NEWEST&pagelen=50&page=1', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/commits?merges=exclude&order=NEWEST&pagelen=50&page=1"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/commits?merges=exclude&order=NEWEST&pagelen=50&page=1',
  $headers
);

var_dump($response);
PHP

Page of commits from all repositories in a workspace.

{
  "values": [
    {
      "author": {
        "display_name": "John Doe",
        "uuid": "{025f262e-71dc-41e5-80ba-14fd3a276373}"
      },
      "date": "2025-07-03T00:00:00",
      "hash": "1f45adc0314f3fa0f800020ca0f8d452be696089",
      "parents": [
        {
          "hash": "0a6036345d4b8c4d03175a24bf71ba1d46bd6aad"
        }
      ],
      "repository": {
        "slug": "my-repo"
      }
    }
  ],
  "page": 2,
  "pagelen": 10,
  "previous": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/repos/awesome-repo/commits?page=1&pagelen=10",
  "next": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/repos/awesome-repo/commits?page=3&pagelen=10"
}
CODE
Invalid Request
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE
Forbidden
CODE

Repository level

Returns a list of commits from a specific repository in a given Bitbucket Cloud workspace.

Get commits

GET /rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/commits

Returns a list of commits from the specified repository.

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

repository-slug

string

Unique identifier of the repository, e.g. `my-repo` in `https://bitbucket.org/my-workspace/my-repo/`.

Query Parameters

ParameterValueDescription
pageintegerIndicates the page number of results to return. Must be 1 or higher. Defaults to 1.
pagelenintegerSpecifies how many results to return per page. Can be between 1 and 500. Defaults to 500.
orderstringThe order to return commits in, either oldest (as in: "oldest first") or newest. Defaults to newest.
mergesstringIf present, controls how merge commits should be filtered. Can be either exclude, to exclude merge commits, include, to include both merge commits and non-merge commits or only, to only return merge commits. Defaults to exclude.
since_datestringDate in ISO-8601 format to retrieve commits since. Example: 2025-05-30T00:00:00Z.
until_datestringDate in ISO-8601 format to retrieve commits until. Example: 2025-05-30T00:00:00Z. 
with_linesbooleanWhen true, includes lines of code statistics per commit. Requires lines of code indexing to be enabled in the repository settings.

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/commits?with_lines=true' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/commits?with_lines=true"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/commits?with_lines=true', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/commits?with_lines=true"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/commits?with_lines=true',
  $headers
);

var_dump($response);
PHP

Page of commits from a specified repository.

{
  "values": [
    {
      "author": {
        "display_name": "John Doe",
        "uuid": "{025f262e-71dc-41e5-80ba-14fd3a276373}"
      },
      "date": "2025-07-03T00:00:00",
      "hash": "1f45adc0314f3fa0f800020ca0f8d452be696089",
      "lines": {
        "added": 42,
        "deleted": 7
      },
      "parents": [
        {
          "hash": "0a6036345d4b8c4d03175a24bf71ba1d46bd6aad"
        }
      ],
      "repository": {
        "slug": "my-repo"
      }
    }
  ],
  "page": 2,
  "pagelen": 10,
  "previous": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/repos/awesome-repo/commits?page=1&pagelen=10",
  "next": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/repos/awesome-repo/commits?page=3&pagelen=10"
}
CODE
The repository has unindexed changes.
CODE
Lines of code indexing is disabled for this repository.
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE
Forbidden.
CODE
Repository not found.
CODE

Get statistics

GET /rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/changes-statistics

Returns the number of commits and detailed statistics on lines of code added, changed, or deleted in the specified repository.

Note that lines of code indexing must be enabled in the repository settings to retrieve statistics.

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

repository-slug

string

Unique identifier of the repository, e.g. `my-repo` in `https://bitbucket.org/my-workspace/my-repo/`.

Query Parameters

ParameterValueDescription
mergesstringIf present, controls how merge commits should be filtered. Can be either exclude, to exclude merge commits, include, to include both merge commits and non-merge commits or only, to only return merge commits. Defaults to exclude.
since_datestringDate in ISO-8601 format to retrieve commits since. Example: 2025-05-30T00:00:00Z.
until_datestringDate in ISO-8601 format to retrieve commits until. Example: 2025-05-30T00:00:00Z. 

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/changes-statistics' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/changes-statistics"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/changes-statistics', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/changes-statistics"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/repos/{repository-slug}/changes-statistics',
  $headers
);

var_dump($response);
PHP

Commit and lines of code statistics for a specified repository.

{
  "commits": 2,
  "lines_of_code": {
    "added": {
      "average": 17,
      "median": 17,
      "p75": 24,
      "p95": 30,
      "p99": 32,
      "total": 34
    },
    "changed": {
      "average": 28,
      "median": 28,
      "p75": 38,
      "p95": 45,
      "p99": 47,
      "total": 56
    },
    "deleted": {
      "average": 11,
      "median": 11,
      "p75": 13,
      "p95": 15,
      "p99": 15,
      "total": 22
    }
  }
}
CODE
The repository has unindexed changes.
CODE
Lines of code indexing is disabled for this repository.
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE
Forbidden.
CODE
Repository not found.
CODE

User level

Returns a list of commits of the specified user across all repositories in the workspace.

To use user-level commits endpoints, you need the user ID (user_uuid) of the user. This can be retrieved using the /users endpoint.

Get commits

GET /rest/latest/workspace/{workspace-slug}/users/{user_uuid}/commits

Returns a list of commits by the specified user across all repositories in the workspace.

Path Parameters (required)

Parameter

Value

Description

workspace-slug

string

Unique identifier of the workspace, e.g. `my-workspace` in `https://bitbucket.org/my-workspace/`.

user_uuid

string

Unique identifier of the user, e.g. `{026f362e-72dc-42e5-80ba-14fd3a276373}`. Can be retrieved using the /users endpoint.

Query Parameters

ParameterValueDescription
pageintegerIndicates the page number of results to return. Must be 1 or higher. Defaults to 1.
pagelenintegerSpecifies how many results to return per page. Can be between 1 and 500. Defaults to 500.
orderstringThe order to return commits in, either oldest (as in: "oldest first") or newest. Defaults to newest.
mergesstringIf present, controls how merge commits should be filtered. Can be either exclude, to exclude merge commits, include, to include both merge commits and non-merge commits or only, to only return merge commits. Defaults to exclude.
since_datestringDate in ISO-8601 format to retrieve commits since. Example: 2025-05-30T00:00:00Z.
until_datestringDate in ISO-8601 format to retrieve commits until. Example: 2025-05-30T00:00:00Z. 

Request Example (curl)

curl --request GET \
  --url 'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/commits' \
  --header 'Authorization: {access_token}' \
  --header 'Accept: application/json'
CODE
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
import json

url = "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/commits"

headers = {
  "Accept": "application/json",
  "Authorization": "{access_token}"
}

response = requests.request(
   "GET",
   url,
   headers=headers
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
PY
// This code sample uses the 'node-fetch' library:
// https://www.npmjs.com/package/node-fetch
const fetch = require('node-fetch');

fetch('https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/commits', {
method: 'GET',
headers: {
'Authorization': '{access_token}',
'Accept': 'application/json'
}
})
.then(response => {
console.log(`Response: ${response.status} ${response.statusText}`);
return response.text();
})
.then(text => console.log(text))
.catch(err => console.error(err));
try (var client = HttpClient.newHttpClient()) {
    var request = HttpRequest.newBuilder()
            .GET()
            .uri(new URI("https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/commits"))
            .header("Accept", "application/json")
            .header("Authorization", "{access_token}")
            .build();

    var response = client.send(request, HttpResponse.BodyHandlers.ofString());

    System.out.println(response.body());
}
JAVA
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
$headers = array(
  'Accept' => 'application/json',
  'Authorization' => '{access_token}'
);

$response = Unirest\Request::get(
  'https://awesome-graphs.stiltsoft.net/rest/latest/workspace/{workspace-slug}/users/{user_uuid}/commits',
  $headers
);

var_dump($response);
PHP

Page of commits by a specified user from all repositories in a workspace.

{
  "values": [
    {
      "author": {
        "display_name": "John Doe",
        "uuid": "{025f262e-71dc-41e5-80ba-14fd3a276373}"
      },
      "date": "2025-07-03T00:00:00",
      "hash": "1f45adc0314f3fa0f800020ca0f8d452be696089",
      "parents": [
        {
          "hash": "0a6036345d4b8c4d03175a24bf71ba1d46bd6aad"
        }
      ],
      "repository": {
        "slug": "my-repo"
      }
    }
  ],
  "page": 2,
  "pagelen": 10,
  "previous": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/users/{user_uuid}/commits?page=1&pagelen=10",
  "next": "https://awesome-graphs.stiltsoft.net/rest/latest/workspace/my-workspace/users/{user_uuid}/commits?page=3&pagelen=10"
}
CODE
Invalid Request
CODE
Access token is invalid or expired.
CODE
REST API for Awesome Graphs is available only with an active commercial or trial license. Buy a license in Workspace Settings → Awesome Graphs → Plan details.
CODE
Forbidden.
CODE