users Endpoint
On this page
Related content
- No related content found
Overview
The /users
endpoint gets a Bitbucket Cloud user account's profile information. Individual accounts have the following fields:
Field | Description |
---|---|
username | The name associated with the account. |
type | The string "user ". |
website | The first name associated with account. |
display_name | The name displayed on the UI. |
links | Resources associated with the account. |
created_on | The date and time (in ISO 8601 format) of the account's creation. |
location | Where the user is located. |
GET the user profile
Gets the public information associated with a user. If the user's profile is private, the caller must be authenticated as the account holder to view this information. This call takes the following parameter:
Parameter | Required | Description |
---|---|---|
username_or_uuid | Yes | The name or unique identifier (UUID) of the user. |
GET https://api.bitbucket.org/2.0/users/{username_or_uuid}
Click to expand and view a response...
{
"username": "tutorials",
"website": "https://tutorials.bitbucket.org/",
"display_name": "tutorials account",
"links": {
"self": {
"href": "https://bitbucket.org/!api/2.0/users/tutorials"
},
"repositories": {
"href": "https://bitbucket.org/!api/2.0/repositories/tutorials"
},
"html": {
"href": "https://bitbucket.org/tutorials"
},
"followers": {
"href": "https://bitbucket.org/!api/2.0/users/tutorials/followers"
},
"avatar": {
"href": "https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png"
},
"following": {
"href": "https://bitbucket.org/!api/2.0/users/tutorials/following"
}
},
"created_on": "2011-12-20T16:34:07.132459+00:00",
"location": "Santa Monica, CA",
"type": "user"
}
GET the list of followers
Gets the list of accounts following the user. This call takes the following parameters:
Parameter | Required | Description |
---|---|---|
username_or_uuid | Yes | The name or unique identifier (UUID) of the user. |
GET https://api.bitbucket.org/2.0/users/{username_or_uuid}/followers
Click to expand and view a response...
{
"pagelen": 10,
"values": [{
"username": "tutorials",
"website": "https://tutorials.bitbucket.org/",
"display_name": "tutorials account",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/tutorials"
},
"repositories": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials"
},
"html": {
"href": "https://bitbucket.org/tutorials"
},
"followers": {
"href": "https://api.bitbucket.org/2.0/users/tutorials/followers"
},
"avatar": {
"href": "https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png"
},
"following": {
"href": "https://api.bitbucket.org/2.0/users/tutorials/following"
}
},
"created_on": "2011-12-20T16:34:07.132459+00:00",
"location": "Santa Monica, CA",
"type": "user"
}],
"page": 1,
"size": 1
}
GET a list of accounts the user is following
Gets a list of accounts the user is following. This call takes the following parameters:
Parameter | Required | Description |
---|---|---|
username_or_uuid | Yes | The name or unique identifier (UUID) of the user. |
GET https://api.bitbucket.org/2.0/users/{username_or_uuid}/following
Click to expand and view a response...
{
"pagelen": 10,
"values": [
{
"username": "jdoklovic",
"kind": "user",
"website": "http://www.sysbliss.com/",
"display_name": "Jonathan Doklovic",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/jdoklovic"
},
"repositories": {
"href": "https://api.bitbucket.org/2.0/users/jdoklovic/repositories"
},
"html": {
"href": "https://api.bitbucket.org/jdoklovic"
},
"followers": {
"href": "https://api.bitbucket.org/2.0/users/jdoklovic/followers"
},
"avatar": {
"href": "https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2010/Sep/30/jd_profile_avatar.jpg"
},
"following": {
"href": "https://api.bitbucket.org/2.0/users/jdoklovic/following"
}
},
"created_on": "2010-09-30T13:44:45.049874+00:00",
"location": "Minneapolis, MN"
},
{
"username": "atlassian_tutorial",
"kind": "team",
"website": "",
"display_name": "Atlassian Tutorials",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/teams/atlassian_tutorial"
},
"repositories": {
"href": "https://api.bitbucket.org/2.0/teams/atlassian_tutorial/repositories"
},
"html": {
"href": "https://api.bitbucket.org/atlassian_tutorial"
},
"followers": {
"href": "https://api.bitbucket.org/2.0/teams/atlassian_tutorial/followers"
},
"avatar": {
"href": "https://secure.gravatar.com/avatar/eb4e0ad6934518b3e335345a4ceeef21?d=https%3A%2F%2Fd3oaxc4q5k2d6q.cloudfront.net%2Fm%2Fbc85d1577e04%2Fimg%2Fdefault_team_avatar%2F32%2Fteam_blue.png&s=32"
},
"members": {
"href": "https://api.bitbucket.org/2.0/teams/atlassian_tutorial/members"
},
"following": {
"href": "https://api.bitbucket.org/2.0/teams/atlassian_tutorial/following"
}
},
"created_on": "2011-11-29T05:38:01.075233+00:00",
"location": ""
},
{
"username": "cat_vasja",
"kind": "team",
"website": "",
"display_name": "cat_vasja",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/teams/cat_vasja"
},
"repositories": {
"href": "https://api.bitbucket.org/2.0/teams/cat_vasja/repositories"
},
"html": {
"href": "https://api.bitbucket.org/cat_vasja"
},
"followers": {
"href": "https://api.bitbucket.org/2.0/teams/cat_vasja/followers"
},
"avatar": {
"href": "https://secure.gravatar.com/avatar/e16be80e861baccc5ed4691737faeb05?d=https%3A%2F%2Fd3oaxc4q5k2d6q.cloudfront.net%2Fm%2Fbc85d1577e04%2Fimg%2Fdefault_team_avatar%2F32%2Fteam_blue.png&s=32"
},
"members": {
"href": "https://api.bitbucket.org/2.0/teams/cat_vasja/members"
},
"following": {
"href": "https://api.bitbucket.org/2.0/teams/cat_vasja/following"
}
},
"created_on": "2012-10-09T19:45:37.292078+00:00",
"location": "Deutschland"
}
],
"page": 1,
"size": 3
}
GET the user's repositories
Gets the list of the user's repositories. Private repositories only appear on this list if the caller is authenticated and is authorized to view the repository. This call takes the following parameters:
Parameter | Required | Description |
---|---|---|
username_or_uuid | Yes | The name or unique identifier (UUID) of the user. |
GET https://api.bitbucket.org/2.0/repositories/{username_or_uuid}
Click to expand and view a response...
,
{
"scm": "hg",
"has_wiki": true,
"description": "This repository is used by the Bitbucket tutorial documentation. It is referenced from this page:\r\n\r\nhttps://confluence.atlassian.com/display/BITBUCKET/Split+a+Repository+in+Two ",
"links": {
"watchers": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials/hgsplitpractice/watchers"
},
"commits": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials/hgsplitpractice/commits"
},
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials/hgsplitpractice"
},
"html": {
"href": "https://api.bitbucket.org/tutorials/hgsplitpractice"
},
"avatar": {
"href": "https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2012/Nov/28/hgsplitpractice-logo-129947197-5_avatar.png"
},
"forks": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials/hgsplitpractice/forks"
},
"clone": [
{
"href": "https://tutorials@bitbucket.org/tutorials/hgsplitpractice",
"name": "https"
},
{
"href": "ssh://hg@bitbucket.org/tutorials/hgsplitpractice",
"name": "ssh"
}
],
"pullrequests": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials/hgsplitpractice/pullrequests"
}
},
"fork_policy": "allow_forks",
"language": "",
"created_on": "2012-11-27T19:19:33.315067+00:00",
"full_name": "tutorials/hgsplitpractice",
"has_issues": false,
"owner": {
"username": "tutorials",
"display_name": "first name last",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/tutorials"
},
"avatar": {
"href": "https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Jul/17/tutorials-avatar-1826704565-4_avatar.png"
}
}
},
"updated_on": "2013-02-04T17:04:13.612906+00:00",
"size": 19065,
"is_private": false,
"name": "hgsplitpractice"
},
{
"scm": "git",
"has_wiki": false,
"description": "Example scripts using OAuth to connect to Bitbucket. Please contribute more by issuing a Pull Request here!",
"links": {
"watchers": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials/oauth-examples/watchers"
},
"commits": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials/oauth-examples/commits"
},
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials/oauth-examples"
},
"html": {
"href": "https://api.bitbucket.org/tutorials/oauth-examples"
},
"avatar": {
"href": "https://d3oaxc4q5k2d6q.cloudfront.net/m/bc85d1577e04/img/language-avatars/default_16.png"
},
"forks": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials/oauth-examples/forks"
},
"clone": [
{
"href": "https://tutorials@bitbucket.org/tutorials/oauth-examples.git",
"name": "https"
},
{
"href": "ssh://git@bitbucket.org/tutorials/oauth-examples.git",
"name": "ssh"
}
],
"pullrequests": {
"href": "https://api.bitbucket.org/2.0/repositories/tutorials/oauth-examples/pullrequests"
}
},
"fork_policy": "allow_forks",
"language": "",
"created_on": "2013-04-01T21:19:07.973032+00:00",
"full_name": "tutorials/oauth-examples",
"has_issues": false,
"owner": {
"username": "tutorials",
"display_name": "first name last",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/tutorials"
},
"avatar": {
"href": "https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Jul/17/tutorials-avatar-1826704565-4_avatar.png"
}
}
},
"updated_on": "2013-04-01T21:20:22.492622+00:00",
"size": 1794,
"is_private": false,
"name": "OAuth Examples"
},
],
"page": 1,
"size": 2
}
Last modified on Jun 23, 2020
Related content
- No related content found
Powered by Confluence and Scroll Viewport.