Projects

List workspace projects

Returns all authorized projects of the user. If the user has admin rights, he'll receive a list of all projects in the workspace.
Required scopes: WORKSPACE

Resource URL

GET
/workspaces/:domain/projects

URL Parameters

Name Description
domain Required String The workspace domain.

GET Parameters

Name Description
membership Boolean If set to "true", the admin will receive only the projects to which he belongs in the workspace.
page Integer The number of the successive page (results are splitted by pages of per_page elements each).
per_page Integer The number of returned elements on the page.
sort_by String Specifies ordering. Can be one of name, create_date or repository_size.
sort_direction String Specifies direction of ordering. Can be one of ASC or DESC.
status String Filters projects to the specified status. Can be one of ACTIVE or CLOSED.

Example

Request
GET
https://api.buddy.works/workspaces/buddy/projects?page=1&per_page=2
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/projects",
  "html_url": "https://app.buddy.works/buddy",
  "projects": [
    {
      "url": "https://api.buddy.works/workspaces/buddy/projects/company-website",
      "html_url": "https://app.buddy.works/buddy/company-website",
      "name": "company-website",
      "display_name": "Company Website",
      "status": "ACTIVE"
    }
  ]
}

Create project

Every user can add new projects, unless restricted by the admin in the workspace settings.
Required scopes: WORKSPACE

Resource URL

POST
/workspaces/:domain/projects

URL Parameters

Name Description
domain Required String The workspace domain.

POST Parameters

Name Description
name Required String Name ID of the project (must be unique in workspace).
display_name String Full name of the project.

Example

Request
POST
https://api.buddy.works/workspaces/buddy/projects
{
  "name": "landing-page",
  "display_name": "Landing page"
}
Sample Response
Status: 201 Created
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/projects/landing-page",
  "html_url": "https://app.buddy.works/buddy/landing-page",
  "name": "landing-page",
  "display_name": "Landing page",
  "status": "ACTIVE",
  "create_date": "2016-03-02T11:10:28.864Z",
  "created_by": {
    "url": "https://api.buddy.works/workspaces/buddy/member/1",
    "html_url": "https://app.buddy.works/buddy/profile/1",
    "id": 1,
    "name": "Mike Benson",
    "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png",
    "title": "Creative director"
  },
  "http_repository": "https://app.buddy.works/buddy/landing-page",
  "ssh_repository": "buddy@app.buddy.works:buddy/landing-page",
  "size": 0,
  "default_branch": "master"
}

Get project

Only a member or admin of the project is allowed to download project data.
Required scopes: WORKSPACE

Resource URL

GET
/workspaces/:domain/projects/:project_name

URL Parameters

Name Description
domain Required String The workspace domain.
project_name Required String The name ID of the project.

Example

Request
GET
https://api.buddy.works/workspaces/buddy/projects/company-website
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/projects/company-website",
  "html_url": "https://app.buddy.works/buddy/company-website",
  "name": "company-website",
  "display_name": "Company Website",
  "status": "ACTIVE",
  "create_date": "2016-02-29T11:23:04Z",
  "created_by": {
    "url": "https://api.buddy.works/workspaces/buddy/member/1",
    "html_url": "https://app.buddy.works/buddy/profile/1",
    "id": 1,
    "name": "Mike Benson",
    "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png",
    "title": "Creative director"
  },
  "http_repository": "https://app.buddy.works/buddy/company-website",
  "ssh_repository": "buddy@app.buddy.works:buddy/company-website",
  "size": 1908,
  "default_branch": "master"
}

Edit project

Only the workspace administrator can edit the project.
Required scopes: WORKSPACE

Resource URL

PATCH
/workspaces/:domain/projects/:project_name

URL Parameters

Name Description
domain Required String The workspace domain.
project_name Required String The name ID of the project.

POST Parameters

Name Description
display_name String The full name of the project.
name String The name ID of the project (must be unique in the workspace).

Example

Request
PATCH
https://api.buddy.works/workspaces/buddy/projects/company-website
{
  "display_name": "Company Website"
}
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/projects/company-website",
  "html_url": "https://app.buddy.works/buddy/company-website",
  "name": "company-website",
  "display_name": "Company Website",
  "status": "ACTIVE",
  "create_date": "2016-02-29T11:23:04Z",
  "created_by": {
    "url": "https://api.buddy.works/workspaces/buddy/member/1",
    "html_url": "https://app.buddy.works/buddy/profile/1",
    "id": 1,
    "name": "Mike Benson",
    "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png",
    "title": "Creative director"
  },
  "http_repository": "https://app.buddy.works/buddy/company-website",
  "ssh_repository": "buddy@app.buddy.works:buddy/company-website",
  "size": 1908,
  "default_branch": "master"
}

Delete project

Only the workspace administrator can delete projects.
Required scopes: WORKSPACE, PROJECT_DELETE

Resource URL

DELETE
/workspaces/:domain/projects/:project_name

URL Parameters

Name Description
domain Required String The workspace domain.
project_name Required String The name ID of the project.

Example

Request
DELETE
https://api.buddy.works/workspaces/buddy/projects/landing-page
Sample Response
Status: 204 NoContent
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999

List members.

If the authorized user doesn't have admin rights, information about permissions will not be fetched
Required scopes: WORKSPACE

Resource URL

GET
/workspaces/:domain/projects/:project_name/members

URL Parameters

Name Description
domain Required String The workspace domain.
project_name Required String The name ID of the project.

GET Parameters

Name Description
page Integer The number of the successive page (results are splitted by pages of per_page elements each).
per_page Integer The number of returned elements on the page.
sort_by String Specifies the ordering. Can be one of email or name.
sort_direction String Specifies the direction of the ordering. Can be one of ASC or DESC.

Example

Request
GET
https://api.buddy.works/workspaces/buddy/projects/company-website/members?page=1&per_page=2&sort_by=name&sort_direction=ASC
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/project/company-website/members",
  "html_url": "https://app.buddy.works/buddy/company-website/members",
  "members": [
    {
      "url": "https://api.buddy.works/workspaces/buddy/projects/2/member/1",
      "html_url": "https://app.buddy.works/buddy/company-website/members/profile/1",
      "id": 1,
      "name": "Mike Benson",
      "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png",
      "title": "Creative director"
    }
  ]
}

Add member to project

Adds a user to the project. Only administrators can manage permissions. If the authorized user doesn't have admin rights, the posted permissions will be ignored and the new member will be added with the same permissions as the invoker.
Required scopes: WORKSPACE

Resource URL

POST
/workspaces/:domain/projects/:project_name/members

URL Parameters

Name Description
domain Required String The workspace domain.
project_name Required String The name ID of the project.

POST Parameters

Name Description
id Required Integer The numerical ID of the desired user.
permission_set Required permission_set Specifies the permissions assigned to the user in the project. This field will be returned to workspace administrators only.

Example

Request
POST
https://api.buddy.works/workspaces/buddy/projects/company-website/members
{
  "id": 2,
  "permission_set": {
    "id": 2
  }
}
Sample Response
Status: 201 Created
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/projects/2/member/2",
  "html_url": "https://app.buddy.works/buddy/company-website/members/profile/2",
  "id": 2,
  "name": "Sylvia Jones",
  "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/2/71f5a2ec2e1f4af1cf357e631cd2518e/w/32/32/AVATAR.png",
  "title": null,
  "admin": false,
  "workspace_owner": false,
  "permission_set": {
    "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"
  }
}

Get project member

Returns a single project member.
Required scopes: WORKSPACE

Resource URL

GET
/workspaces/:domain/projects/:project_name/members/:member_id

URL Parameters

Name Description
domain Required String The workspace domain.
member_id Required Integer The numerical ID of the desired user.
project_name Required String The name ID of the project.

Example

Request
GET
https://api.buddy.works/workspaces/buddy/projects/company-website/members/1
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/projects/2/member/1",
  "html_url": "https://app.buddy.works/buddy/company-website/members/profile/1",
  "id": 1,
  "name": "Mike Benson",
  "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png",
  "title": "Creative director",
  "admin": true,
  "workspace_owner": true,
  "permission_set": {
    "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"
  }
}

Update project memeber

Changes permission set of a user in the project. Restricted to admins only.
Required scopes: WORKSPACE

Resource URL

PATCH
/workspaces/:domain/projects/:project_name/members/:member_id

URL Parameters

Name Description
domain Required String The workspace domain.
member_id Required Integer The numerical ID of the desired user.
project_name Required String The name ID of the project.

POST Parameters

Name Description
permission_set Required permission_set Defines the permission set with which the user is added to the project.

Example

Request
PATCH
https://api.buddy.works/workspaces/buddy/projects/company-website/members/1
{
  "permission_set": {
    "id": "1"
  }
}
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/projects/2/member/1",
  "html_url": "https://app.buddy.works/buddy/company-website/members/profile/1",
  "id": 1,
  "name": "Mike Benson",
  "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png",
  "title": "Creative director",
  "admin": true,
  "workspace_owner": true,
  "permission_set": {
    "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"
  }
}

Delete project member

Removes a user from the project.
Required scopes: WORKSPACE

Resource URL

DELETE
/workspaces/:domain/projects/:project_name/members/:member_id

URL Parameters

Name Description
domain Required String The workspace domain.
member_id Required Integer The numerical ID of the desired user.
project_name Required String The name ID of the project.

Example

Request
DELETE
https://api.buddy.works/workspaces/buddy/projects/company-website/members/2
Sample Response
Status: 204 NoContent
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
esc

Sign up for free

No setup fees. No requirements. No obligation.

or sign up with