Examples
Create new Buddy projectCreate integrated project (GitHub/GitLab/Bitbucket)Create custom repository project
Example: Create new Buddy project
curl -X POST "https://api.buddy.works/workspaces/:workspace/projects" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "landing-page",
"display_name": "Landing page",
"access": "PUBLIC",
"fetch_submodules": true,
"fetch_submodules_env_key": "id_workspace",
"allow_pull_requests": true
}'Example: Create integrated project (GitHub/GitLab/Bitbucket)
curl -X POST "https://api.buddy.works/workspaces/:workspace/projects" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "landing-page",
"display_name": "Landing page",
"external_project_id": "buddy/landing-page",
"integration": {
"identifier": "github"
},
"access": "PUBLIC",
"fetch_submodules": true,
"fetch_submodules_env_key": "id_workspace",
"allow_pull_requests": true,
"update_default_branch_from_external": true
}'Example: Create custom repository project
curl -X POST "https://api.buddy.works/workspaces/:workspace/projects" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "custom-repo-project",
"display_name": "Custom Repository Project",
"custom_repo_url": "https://github.com/company/private-repo.git",
"custom_repo_user": "deployment-user",
"custom_repo_pass": "access-token",
"access": "PRIVATE",
"fetch_submodules": false
}'EXAMPLE RESPONSE
{
"url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project",
"html_url": "https://app.buddy.works/my-workspace/projects/my-project",
"name": "my-project",
"display_name": "My Project",
"external_project_id": null,
"gitlab_project_id": null,
"custom_repo_url": null,
"custom_repo_user": null,
"custom_repo_pass": null,
"custom_repo_ssh_key_id": null,
"status": "ACTIVE",
"access": "PRIVATE",
"create_date": "2023-01-15T10:30:00Z",
"created_by": {
"url": "https://api.buddy.works/workspaces/my-workspace/members/123",
"html_url": "https://app.buddy.works/my-workspace/profile/123",
"id": 123,
"name": "John Doe",
"avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/123/a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6/w/32/32/AVATAR.png?ts=1674644200000",
"email": "john.doe@company.com",
"admin": false,
"workspace_owner": false
},
"http_repository": "https://git.buddy.works/my-workspace/my-project.git",
"ssh_repository": "git@git.buddy.works:my-workspace/my-project.git",
"default_branch": "main",
"integration": null,
"fetch_submodules": true,
"fetch_submodules_env_key": "id_workspace",
"allow_pull_requests": true,
"update_default_branch_from_external": false,
"without_repository": false
}STATUS
201 Created