Skip to content

Get an explicit user permission for a project

GET
/workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}

Returns the explicit user permission for a given user and project.

Only users with admin permission for the project may access this resource.

Permissions can be:

  • admin
  • create-repo
  • write
  • read
  • none
project_key
required
string

The project in question. This is the actual key assigned to the project.

selected_user_id
required
string

This can either be the username, the user’s UUID surrounded by curly-braces, for example: {account UUID}, or the user’s Atlassian ID.

workspace
required
string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Explicit user permission for user and project

Media type application/json
Project User Permission

A user’s direct permission for a given project.

object
type
required
string
links
object
self
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
permission
string
Allowed values: read write create-repo admin none
user
object
type
required
string
links
Account Links

Links related to an Account.

object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
key
additional properties
any
created_on
string format: date-time
display_name
string
uuid
string
links
object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
self
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
html
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
repositories
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
account_id

The user’s Atlassian account ID.

string
account_status

The status of the account. Currently the only possible value is “active”, but more values may be added in the future.

string
has_2fa_enabled
boolean
nickname

Account name defined by the owner. Should be used instead of the “username” field. Note that “nickname” cannot be used in place of “username” in URLs and queries, as “nickname” is not guaranteed to be unique.

string
is_staff
boolean
project
object
type
required
string
links
object
html
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
uuid

The project’s immutable id.

string
key

The project’s key.

string
owner
object
type
required
string
links
Account Links

Links related to an Account.

object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
key
additional properties
any
created_on
string format: date-time
display_name
string
uuid
string
links
object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
self
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
html
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
members
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
projects
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
repositories
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
name

The name of the project.

string
description
string
is_private

Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.

boolean
created_on
string format: date-time
updated_on
string format: date-time
has_publicly_visible_repos

Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.

boolean
key
additional properties
any
Examples
Example response
{
"type": "project_user_permission",
"user": {
"type": "user",
"display_name": "Colin Cameron",
"uuid": "{d301aafa-d676-4ee0-88be-962be7417567}",
"account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a"
},
"permission": "admin",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a"
}
}
}

The user couldn’t be authenticated.

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}

The requesting user isn’t an admin of the project.

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}

One or more of the workspace, project, and selected user doesn’t exist for the given identifiers or the requesting user is not authenticated

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}