Skip to content

Get user permission on a workspace

GET
/user/workspaces/{workspace}/permission

Returns the caller’s effective role; as in, the highest level of privilege the caller has for the workspace. If the calling user is a member of multiple groups with distinct roles, only the highest level is returned.

Permissions can be:

workspace
required
string

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

The user that is part of a workspace.

Media type application/json
object
type
required
string
links
object
self
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
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
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
Example
{
"workspace": {
"forking_mode": "allow_forks"
}
}

The request wasn’t 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 does not have access to the workspace.

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