Examples
GitHub IntegrationGitHub with UsernameGitLab IntegrationAWS with Access KeysAWS with Role AssumptionsAWS OIDCMicrosoft AzureDocker HubDigitalOceanGoogle Service AccountNew Relic
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": "12bd78f43e3dcad41afd13f69429a00a0c8a18dcf2"
}'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": "AKIAVASPKE3ZWWV7V5BI",
"secret_key": "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",
"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
}
]
}'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": "docker-hub-token-or-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_e5b1c199475559a23a4c148f5ef7264f4456ceed6fa2a9e19b506ab34ba83740"
}'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\": \"buddy\",\n \"private_key_id\": \"97c7fbe597f688c45eb5e4ef0bf7cd6f68959cad\",\n \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDweDgPi1cbAabJ\\n/ZT9b3uIUF7CyuZSg2/l6VMy3AcQXw90XNKv6OAq9WEhgmHdTS6eUCCRR5G4HiiY\\nw02pImtl1wWWqt7qBrgZgcvUcQ0CAh0/qUCuGCPFQ/XPbLJ2J/WQRcoEM3PsoEIn\\ndP7uJf22Cm5tCJCElrlQ8OmwzGzS5+O8eXG1AhWAqWVnOVZgpfhnhAxB00XGXZpR\\nvrvTKfKPNjvMQDMBM9yU8xZ4LYO8r3CftfSC+HQRiZXCPw4cjZ6/Ebq7TNFfwjuB\\nDrvgkitbNWYW8CzNRiGDplT+I6h8ea8uE8D4dWocPAC4M3sHb2JPExarzXNnFLmq\\n7JBr7j03AgMBAAECggEAd/y0lGUFsK8RR0al2hOPg0P/FJljdZap9gGHhyAs0ils\\nr7ZFVosPl7/amHrTVDZX5Zy7s2IPvtwli5wgGx3WkvlIi5Z1Jjb2E5wlVbqXMAJY\\nD9TnNjdLWfoAJGDrZ5Om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MqV0Ta3X1XEMBL8+Q5G1kuSwxN4xC+U0u\\n9gKF73devYKj9xkrSEnDF4E=\\n-----END PRIVATE KEY-----\\n\",\n \"client_email\": \"buddy@buddy.iam.gserviceaccount.com\",\n \"client_id\": \"105237793416275966994\",\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/buddy%40buddy.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-F9LDREIBQN0NUI56NJYRB1DHR3Z",
"region": "US"
}'EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/my-company/user/integrations/abc123def456", "html_url": "https://app.buddy.works/my-company/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": [], "permissions": { "others": "USE_ONLY", "admins": "MANAGE", "users": [], "groups": [] } }
STATUS201 Created