Create
- POST
- /workspaces
- /:domain
- /projects
Create a project in a workspace. Every user can add new projects, unless restricted by the admin in the workspace settings.
Example: 1
curl -X POST "https://api.buddy.works/workspaces/:domain/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 RESPONSE{ "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" }, "http_repository": "https://app.buddy.works/buddy/landing-page", "ssh_repository": "buddy@app.buddy.works:buddy/landing-page", "default_branch": "master", "access": "PUBLIC", "fetch_submodules": true, "fetch_submodules_env_key": "id_workspace", "allow_pull_requests": true }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999
Example: 2
curl -X POST "https://api.buddy.works/workspaces/:domain/projects" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"display_name": "Landing page",
"external_project_id": "buddy/landing-page",
"integration": {
"hash_id": "5ddb7c180fb38be67bd78a88a"
},
"access": "PUBLIC",
"fetch_submodules": true,
"fetch_submodules_env_key": "id_workspace",
"allow_pull_requests": true
}'
EXAMPLE RESPONSE{ "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" }, "http_repository": "https://app.buddy.works/buddy/landing-page", "ssh_repository": "buddy@app.buddy.works:buddy/landing-page", "default_branch": "master", "access": "PUBLIC", "fetch_submodules": true, "fetch_submodules_env_key": "id_workspace", "allow_pull_requests": true }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999
Example: 3
curl -X POST "https://api.buddy.works/workspaces/:domain/projects" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"display_name": "Landing page",
"custom_repo_url": "https://github.com/buddy/landing-page.git",
"custom_repo_user": "support@buddy.works",
"custom_repo_pass": "super-secret-password"
}'
EXAMPLE RESPONSE{ "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" }, "http_repository": "https://app.buddy.works/buddy/landing-page", "ssh_repository": "buddy@app.buddy.works:buddy/landing-page", "default_branch": "master", "access": "PUBLIC", "fetch_submodules": true, "fetch_submodules_env_key": "id_workspace", "allow_pull_requests": true }
STATUS201 Created
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999