API Documentation

Permissions

List permissions

Returns permission sets defined in the workspace. Restricted to admins only.

Required scopes: WORKSPACE

Resource URL
GET /workspaces/:domain/permissions
URL Parameters
Name Description
domain Required String The workspace domain.
Example
Request
GET https://api.buddy.works/workspaces/buddy/permissions
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/permissions",
  "html_url": "https://app.buddy.works/buddy/permissions",
  "permission_sets": [
    {
      "url": "https://api.buddy.works/workspaces/buddy/permissions/2",
      "html_url": "https://app.buddy.works/buddy/permissions/edit/2",
      "id": 2,
      "name": "Read-only",
      "description": null,
      "type": "READ_ONLY",
      "repository_access_level": "READ_ONLY",
      "pipeline_access_level": "READ_ONLY"
    },
    {
      "url": "https://api.buddy.works/workspaces/buddy/permissions/3",
      "html_url": "https://app.buddy.works/buddy/permissions/edit/3",
      "id": 3,
      "name": "Artist",
      "description": null,
      "type": "CUSTOM",
      "repository_access_level": "READ_WRITE",
      "pipeline_access_level": "DENIED"
    },
    {
      "url": "https://api.buddy.works/workspaces/buddy/permissions/1",
      "html_url": "https://app.buddy.works/buddy/permissions/edit/1",
      "id": 1,
      "name": "Developer",
      "description": null,
      "type": "DEVELOPER",
      "repository_access_level": "READ_WRITE",
      "pipeline_access_level": "READ_WRITE"
    }
  ]
}

Add

Creates a custom permission set. Restricted to admins only.

Required scopes: WORKSPACE

Resource URL
POST /workspaces/:domain/permissions
URL Parameters
Name Description
domain Required String The workspace domain.
POST Parameters
Name Description
description Required String The description of the permission set.
name Required String The name of the permission set.
pipeline_access_level Required String Can be one of DENIED, READ_ONLY, RUN_ONLY or READ_WRITE.
repository_access_level Required String Can be one of DENIED, READ_ONLY or READ_WRITE.
Example
Request
POST https://api.buddy.works/workspaces/buddy/permissions
{
  "name": "Artist",
  "description": "Artists can access only to source",
  "repository_access_level": "READ_WRITE",
  "pipeline_access_level": "DENIED"
}
Sample Response
Status: 201 Created
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/permissions/4",
  "html_url": "https://app.buddy.works/buddy/permissions/edit/4",
  "id": 4,
  "name": "Artist",
  "description": "Artists can access only to source",
  "type": "CUSTOM",
  "repository_access_level": "READ_WRITE",
  "pipeline_access_level": "DENIED"
}

Get

Returns a permission set defined in the workspace. Restricted to admins only.

Required scopes: WORKSPACE

Resource URL
GET /workspaces/:domain/permissions/:permission_set_id
URL Parameters
Name Description
domain Required String The workspace domain.
permission_set_id Required Integer The numerical ID of the desired permission set.
Example
Request
GET https://api.buddy.works/workspaces/buddy/permissions/3
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/permissions/3",
  "html_url": "https://app.buddy.works/buddy/permissions/edit/3",
  "id": 3,
  "name": "Artist",
  "description": "Artists can access only to source",
  "type": "CUSTOM",
  "repository_access_level": "READ_WRITE",
  "pipeline_access_level": "DENIED"
}

type can be either DEVELOPER, READ_ONLY or CUSTOM.

Edit

Updates a custom permission set. Restricted to admins only.

Required scopes: WORKSPACE

Resource URL
PATCH /workspaces/:domain/permissions/:permission_set_id
URL Parameters
Name Description
domain Required String The workspace domain.
permission_set_id Required Integer The numerical ID of the desired permission set.
POST Parameters
Name Description
description Required String The description of the permission set.
name Required String The name of the permission set.
pipeline_access_level Required String Can be one of DENIED, READ_ONLY, RUN_ONLY or READ_WRITE.
repository_access_level Required String Can be one of DENIED, READ_ONLY or READ_WRITE.
Example
Request
PATCH https://api.buddy.works/workspaces/buddy/permissions/3
{
  "description": "Artists can only view source",
  "pipeline_access_level": "DENIED"
}
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/permissions/3",
  "html_url": "https://app.buddy.works/buddy/permissions/edit/3",
  "id": 3,
  "name": "Artist",
  "description": "Artists can only view source",
  "type": "CUSTOM",
  "repository_access_level": "READ_WRITE",
  "pipeline_access_level": "DENIED"
}

Delete

Deletes a permission set. Restricted to admins only.

Required scopes: WORKSPACE

Resource URL
DELETE /workspaces/:domain/permissions/:permission_set_id
URL Parameters
Name Description
domain Required String The workspace domain.
permission_set_id Required Integer The numerical ID of the desired permission set.
Example
Request
DELETE https://api.buddy.works/workspaces/buddy/permissions/4
Sample Response
Status: 204 NoContent
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999

Get started now

14 days of unlimited trial. No credit card required.