Skip to content

Update an explicit group permission for a project

PUT
/workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}

Updates the group permission, or grants a new permission if one does not already exist.

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

Due to security concerns, the JWT and OAuth authentication methods are unsupported. This is to ensure integrations and add-ons are not allowed to change permissions.

Permissions can be:

  • admin
  • create-repo
  • write
  • read
group_slug
required
string

Slug of the requested group.

project_key
required
string

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

workspace
required
string

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

The permission to grant

Media type application/json
object
permission
required
string
Allowed values: read write create-repo admin

Project group permission updated.

Media type application/json
Project Group Permission

A group’s 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
group
object
type
required
string
links
object
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
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
workspace
object
type
required
string
links
object
avatar
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
owners
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
snippets
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
uuid

The workspace’s immutable id.

string
name

The name of the workspace.

string
slug

The short label that identifies this workspace.

string
is_private

Indicates whether the workspace is publicly accessible, or whether it is private to the members and consequently only visible to members.

boolean
is_privacy_enforced

Indicates whether the workspace enforces private content, or whether it allows public content.

boolean
forking_mode

Controls the rules for forking repositories within this workspace.

  • allow_forks: unrestricted forking
  • internal_only: prevents forking of private repositories outside the workspace or to public repositories
string
Allowed values: allow_forks internal_only
created_on
string format: date-time
updated_on
string format: date-time
name
string
slug

The “sluggified” version of the group’s name. This contains only ASCII characters and can therefore be slightly different than the name

string
full_slug

The concatenation of the workspace’s slug and the group’s slug, separated with a colon (e.g. acme:developers)

string
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_group_permission",
"group": {
"type": "group",
"name": "Administrators",
"slug": "administrators"
},
"permission": "write",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/administrators"
}
}
}

No permission value was provided or the value is invalid(not one of read, write, create-repo, or admin).

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 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": {}
}
}

You have reached your plan’s user limit and must upgrade before giving access to additional users.

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, or the authentication method was not via app password.

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 group 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": {}
}
}