Create Integrations
- POST
- /workspaces
- /:workspace
- /integrations
Add a new integration to the workspace
Examples
GitHub IntegrationGitHub with UsernameGitLab IntegrationAWS with Access KeysAWS with Role AssumptionsAWS OIDCMicrosoft AzureDocker HubDigitalOceanGoogle Service AccountNew RelicClickUp IntegrationEnvironment-scoped integration
Example: GitHub Integration
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"type": "GIT_HUB",
"identifier": "my-github-integration",
"name": "GitHub Integration",
"token": "ghp_xxxxxxxxxxxxxxxxxxxx",
"scope": "PROJECT",
"project_name": "my-project",
"all_pipelines_allowed": true
}'Example: GitHub with Username
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"identifier": "my_identifier",
"name": "my_name",
"type": "GIT_HUB",
"scope": "WORKSPACE",
"username": "Buddy",
"token": "0123456789abcdef0123456789abcdef0123456789"
}'Example: GitLab Integration
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"type": "GIT_LAB",
"identifier": "my-gitlab-integration",
"name": "GitLab Integration",
"token": "glpat-xxxxxxxxxxxxxxxxxxxx",
"scope": "WORKSPACE",
"all_pipelines_allowed": true
}'Example: AWS with Access Keys
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"type": "AMAZON",
"identifier": "aws-token-integration",
"name": "Amazon Web Services (Token)",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"scope": "PROJECT",
"project_name": "my-project",
"all_pipelines_allowed": true
}'Example: AWS with Role Assumptions
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Buddy AWS integration",
"type": "AMAZON",
"scope": "PROJECT",
"project_name": "company-website",
"access_key": "AKIAIOSFODNN7EXAMPLE",
"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"identifier": "my_aws_integration",
"role_assumptions": [
{
"arn": "arn:aws:iam::123457465779:role/TESTS",
"external_id": "ext_id",
"duration": 9000
}
],
"all_pipelines_allowed": false,
"permissions": {
"admins": "MANAGE",
"others": "DENIED",
"users": [
{
"id": 1,
"access_level": "USE_ONLY"
}
],
"groups": [
{
"id": 1,
"access_level": "USE_ONLY"
}
]
},
"allowed_pipelines": [
{
"id": 1
}
],
"note": "Notes about this resource",
"agent_note": "my_custom_field: note for agent"
}'Example: AWS OIDC
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Buddy (OIDC)",
"type": "AMAZON",
"scope": "WORKSPACE",
"role_assumptions": [
{
"arn": "arn:aws:iam::344897465719:role/my-oidc-role",
"duration": 1234
}
],
"auth_type": "OIDC",
"audience": "tests"
}'Example: Microsoft Azure
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"type": "AZURE",
"identifier": "azure-integration",
"name": "Microsoft Azure",
"tenant_id": "12345678-1234-1234-1234-123456789012",
"subscription_id": "87654321-4321-4321-4321-210987654321",
"app_id": "app-id-example",
"password": "app-password-example",
"scope": "WORKSPACE",
"all_pipelines_allowed": true
}'Example: Docker Hub
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"type": "DOCKER_HUB",
"identifier": "dockerhub-integration",
"name": "Docker Hub",
"username": "my-docker-user",
"password": "example-app-password",
"scope": "PROJECT",
"project_name": "my-project",
"all_pipelines_allowed": false,
"allowed_pipelines": [
{
"id": 123
},
{
"id": 456
}
]
}'Example: DigitalOcean
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"identifier": "my_digital_ocean",
"name": "digitalocean",
"type": "DIGITAL_OCEAN",
"scope": "WORKSPACE",
"token": "dop_v1_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}'Example: Google Service Account
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"identifier": "qljfpaaipt",
"name": "slskopytko",
"type": "GOOGLE_SERVICE_ACCOUNT",
"scope": "WORKSPACE",
"api_key": "{\n \"type\": \"service_account\",\n \"project_id\": \"example\",\n \"private_key_id\": \"0000000000000000000000000000000000000000\",\n \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQEXAMPLEKEY\\n-----END PRIVATE KEY-----\\n\",\n \"client_email\": \"example@example.iam.gserviceaccount.com\",\n \"client_id\": \"000000000000000000000\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/example%40example.iam.gserviceaccount.com\"\n}\n",
"auth_type": "DEFAULT"
}'Example: New Relic
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "buddy",
"type": "NEW_RELIC",
"scope": "WORKSPACE",
"token": "NRAK-0123456789ABCDEFGHIJKLMNOP",
"region": "US"
}'Example: ClickUp Integration
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"identifier": "our-clickup-prod",
"name": "ClickUp (Prod)",
"type": "CLICKUP",
"scope": "WORKSPACE",
"token": "pk_12345678_ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",
"click_up_workspace": "2154252"
}'Example: Environment-scoped integration
curl -X POST "https://api.buddy.works/workspaces/:workspace/integrations" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"type": "DIGITAL_OCEAN",
"identifier": "my_digital_ocean",
"name": "digitalocean",
"scope": "ENVIRONMENT",
"environment_id": "3a4KbBQl",
"token": "dop_v1_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}'EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/my-company/integrations/NLVaDzgp6W2qJljaQlJOoYdmZ3", "html_url": "https://app.buddy.works/my-company/-/workspace/integrations/NLVaDzgp6W2qJljaQlJOoYdmZ3", "hash_id": "NLVaDzgp6W2qJljaQlJOoYdmZ3", "name": "GitHub Integration", "type": "GIT_HUB", "identifier": "my-github-integration", "scope": "WORKSPACE", "auth_type": "TOKEN", "webhook_address": "https://api.github.com/repos/username/repository/hooks", "all_pipelines_allowed": true, "allowed_pipelines": [], "disabled": false, "permissions": { "others": "USE_ONLY", "admins": "MANAGE", "users": [], "groups": [] }, "note": "Notes about this resource", "agent_note": "my_custom_field: note for agent" }
STATUS201 Created