Create
Creates an integration of the selected type.
Supported integration types: DIGITAL_OCEAN
, AMAZON
, SHOPIFY
, PUSHOVER
, RACKSPACE
, CLOUDFLARE
, NEW_RELIC
, SENTRY
, ROLLBAR
, DATADOG
, DO_SPACES
, HONEYBADGER
, VULTR
, SENTRY_ENTERPRISE
, LOGGLY
, FIREBASE
, UPCLOUD
, GHOST_INSPECTOR
, AZURE_CLOUD
, DOCKER_HUB
, GIT_HUB
, GOOGLE_SERVICE_ACCOUNT
.
Required scopes: INTEGRATION_ADD
Resource URL
POST /workspaces/:domain/integrations
URL Parameters
Name | Type | Description |
---|---|---|
domain Required | String | The workspace domain. |
POST Parameters
Name | Type | Description |
---|---|---|
name Required | String | The name of the integration. |
type Required | String | The type of the integration (listed above). |
scope Required | String | The scope of the integration. Can be WORKSPACE or PROJECT . |
project_name | String | The name of the project. Required if scope is set to PROJECT . |
username | String | The username for UPCLOUD , RACKSPACE or DOCKER_HUB integration. |
shop | String | The name of the shop for SHOPIFY integration. |
token | String | The token for integrations: DIGITAL_OCEAN , SHOPIFY , RACKSPACE , CLOUDFLARE , NEW_RELIC , SENTRY , ROLLBAR , DATADOG , HONEYBADGER , VULTR , SENTRY_ENTERPRISE , LOGGLY , FIREBASE , GHOST_INSPECTOR , GIT_HUB . |
access_key | String | The access key for integrations DO_SPACES and AMAZON . |
secret_key | String | The secret key for integrations DO_SPACES and AMAZON . |
app_id | String | The application ID for AZURE_CLOUD integration. |
tenant_id | String | The tenant ID for AZURE_CLOUD integration. |
password | String | The password for AZURE_CLOUD , UPCLOUD or DOCKER_HUB integrations. |
api_key | String | The API key from the account for CLOUDFLARE integration. The alternative option to add it besides using the token. For GOOGLE_SERVICE_ACCOUNT integration type it's the service account key (JSON format). |
role_assumptions | RoleAssumption[] | The list of role assumptions for AMAZON integration. |
String | Email for CLOUDFLARE integration. Required if api_key is sent. | |
partner_token | String | The partner token for SHOPIFY integration. |
key_id | String | The access key for BACKBLAZE integration. |
application_key | String | The secret key for BACKBLAZE integration. |
auth_type | String | The authorization method for the integration. Available values: OAUTH , TOKEN , API_KEY , APP , APP_SPRYKER , TOKEN_APP_EXTENSION , DEFAULT , OIDC , TRUSTED . |
google_project | String | The ID of the Google Cloud project. Required for GOOGLE_SERVICE_ACCOUNT integration type with OIDC auth_type. |
config | String | Client library config (JSON format). Required for GOOGLE_SERVICE_ACCOUNT integration type with OIDC auth_type. |
audience | String | OIDC audience for integrations with OIDC auth_type. |
identifier | String | Readable ID for integration. It can consist of uppercase and lowercase letters, numbers, and underscores. It must start with a letter. If not provided, the same one will be set as the generated hash_id. |
permissions | Permissions | Define to set permissions for the integration. |
all_pipelines_allowed | Boolean | Defines whether all pipelines are allowed to use the integration. |
allowed_pipelines | Pipeline[] | Defines an object with the property id for pipelines that can use this integration. |
Role assumptions
Name | Type | Description |
---|---|---|
arn Required | String | The role arn for assumption. |
external_id | String | The external ID for the role. Required if the auth_type is NOT OIDC (i.e. for default type). |
duration | Integer | Maximum session duration setting for the role. Can have values between 900 and 43200. |
Permissions schema
Name | Type | Description |
---|---|---|
others | String | AccessLevel for the group Others. Can be one of DENIED , USE_ONLY , MANAGE . |
admins | String | AccessLevel for the Administrators. Can be one of DENIED , USE_ONLY , MANAGE . |
users | IntegrationPermission[] | The list of users who will be granted a permission other than the Others group. |
groups | IntegrationPermission[] | The list of groups who will be granted a permission other than the Others group. |
Example
Request
POST https://api.buddy.works/workspaces/buddy/integrations
JSON
{
"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
}
]
}
Sample Response
{
"url": "https://api.buddy.works/workspaces/buddy/integrations/5fff3231277e1449d8eb3e6a",
"html_url": "https://app.buddy.works/buddy/workspace/integrations",
"hash_id": "5fff3231277e1449d8eb3e6a",
"name": "Buddy AWS integration",
"type": "AMAZON",
"scope": "PROJECT",
"identifier":"my_aws_integration",
"project_name": "company-website",
"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":[
{
"url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/1",
"html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/1",
"id": 1,
"name": "Tests"
}
]
}
Last modified on July 8, 2024