Integrations (v1)
Add new integration for given organization.
Required permissions
View OrganizationView IntegrationsEdit Integrations
The organization ID. The API_KEY must have admin access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbedPOST /v1/org/{orgId}/integrations HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 88
{
"type": "acr",
"credentials": {
"username": "text",
"password": "text",
"registryBase": "text"
}
}{
"id": "9a3e5d90-b782-468a-a042-9a2073736f0b"
}Required permissions
View OrganizationView Integrations
The organization public ID. The API_KEY must have admin access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbedGET /v1/org/{orgId}/integrations HTTP/1.1
Host: api.snyk.io
Accept: */*
{
"github": "9a3e5d90-b782-468a-a042-9a2073736f0b",
"gitlab": "1b3e3d90-c678-347a-n232-6a3453738h1e",
"bitbucket-cloud": "6jje4c92-e7rn-t59a-f456-8n5675432fe9"
}Required permissions
View OrganizationView Integrations
The API_KEY must have admin access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbedIntegration type.
githubPossible values: GET /v1/org/{orgId}/integrations/{type} HTTP/1.1
Host: api.snyk.io
Accept: */*
{
"id": "9a3e5d90-b782-468a-a042-9a2073736f0b"
}- Update integration’s credentials for given organization. Integration must be not brokered
- Enable or disable brokered integration for given organization. Credentials required for disabling brokered integration Examples:
- Set up a broker for an existing integration
- Update credentials for an existing non-brokered integration
- Disable broker for an existing integration
Required permissions
View OrganizationView IntegrationsEdit Integrations
The organization ID. The API_KEY must have admin access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbedThe unique identifier for the configured integration. This can be found on the Integration page in the Settings area for all integrations that have been configured.
9a3e5d90-b782-468a-a042-9a2073736f0b{"id":"9a3e5d90-b782-468a-a042-9a2073736f0b","brokerToken":"4a18d42f-0706-4ad0-b127-24078731fbed"}PUT /v1/org/{orgId}/integrations/{integrationId} HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"type": "github",
"broker": {
"enabled": true
}
}{
"id": "9a3e5d90-b782-468a-a042-9a2073736f0b",
"brokerToken": "4a18d42f-0706-4ad0-b127-24078731fbed"
}Required permissions
View OrganizationView IntegrationsEdit Integrations
The organization ID. The API_KEY must have admin access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbedThe unique identifier for the configured integration. This can be found on the Integration page in the Settings area for all integrations that have been configured.
9a3e5d90-b782-468a-a042-9a2073736f0bA limit on how many automatic dependency upgrade PRs can be opened simultaneously
A list of strings defining what dependencies should be ignored
Defines if the functionality is enabled
The age (in days) that an automatic dependency check is valid for
If an opened PR should fail to be validated if any vulnerable dependencies have been detected
If an opened PR only should fail its validation if any dependencies are marked as being of high severity
If opened PRs should be tested
assign Snyk pull requests
Defines automatic remediation policies
Defines manual remediation policies
If true, will automatically detect and scan Dockerfiles in your Git repositories, surface base image vulnerabilities and recommend possible fixes
PUT /v1/org/{orgId}/integrations/{integrationId}/settings HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 534
{
"autoDepUpgradeLimit": 2,
"autoDepUpgradeIgnoredDependencies": [],
"autoDepUpgradeEnabled": false,
"autoDepUpgradeMinAge": 21,
"pullRequestTestEnabled": true,
"pullRequestFailOnAnyVulns": false,
"pullRequestFailOnlyForHighSeverity": true,
"pullRequestAssignment": "{\"enabled\":true,\"type\":\"manual\",\"assignees\":[\"username\"]}",
"autoRemediationPrs": {
"backlogPrsEnabled": false,
"backlogPrStrategy": "vuln",
"freshPrsEnabled": true,
"usePatchRemediation": false
},
"manualRemediationPrs": {
"useManualPatchRemediation": false
},
"dockerfileSCMEnabled": true
}{
"autoDepUpgradeLimit": 2,
"autoDepUpgradeIgnoredDependencies": [],
"autoDepUpgradeEnabled": false,
"autoDepUpgradeMinAge": 21,
"pullRequestTestEnabled": true,
"pullRequestFailOnAnyVulns": false,
"pullRequestFailOnlyForHighSeverity": true,
"pullRequestAssignment": "{\"enabled\":true,\"type\":\"manual\",\"assignees\":[\"username\"]}",
"autoRemediationPrs": {
"backlogPrsEnabled": false,
"backlogPrStrategy": "vuln",
"freshPrsEnabled": true,
"usePatchRemediation": false
},
"manualRemediationPrs": {
"useManualPatchRemediation": false
},
"dockerfileSCMEnabled": true
}Required permissions
View OrganizationView Integrations
The organization ID. The API_KEY must have admin access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbedThe unique identifier for the configured integration. This can be found on the Integration page in the Settings area for all integrations that have been configured.
9a3e5d90-b782-468a-a042-9a2073736f0bGET /v1/org/{orgId}/integrations/{integrationId}/settings HTTP/1.1
Host: api.snyk.io
Accept: */*
{
"autoDepUpgradeLimit": 1,
"autoDepUpgradeIgnoredDependencies": [
"text"
],
"autoDepUpgradeEnabled": true,
"autoDepUpgradeMinAge": 1,
"pullRequestFailOnAnyVulns": true,
"pullRequestFailOnlyForHighSeverity": true,
"pullRequestTestEnabled": true,
"pullRequestAssignment": "text",
"autoRemediationPrs": {
"backlogPrsEnabled": true,
"backlogPrStrategy": null,
"freshPrsEnabled": true,
"usePatchRemediation": true
},
"manualRemediationPrs": {
"usePatchRemediation": true
},
"dockerfileSCMEnabled": true
}Clone an integration, including all of its settings and credentials from one organization to another organization in the same group. This API supports both brokered and non-brokered integrations. Use this API for when you want to share a Broker token between several Snyk organizations (integrations).
Required permissions
View OrganizationView IntegrationsEdit Integrations
Source organization public ID to clone integration settings from. The API_KEY must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbedSource integration public ID to clone.
4a18d42f-0706-4ad0-b127-24078731fbedThe organization public ID. The API_KEY must have access to this organization.
POST /v1/org/{orgId}/integrations/{integrationId}/clone HTTP/1.1
Host: api.snyk.io
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"destinationOrgPublicId": "9a3e5d90-b782-468a-a042-9a2073736f0b1"
}{
"newIntegrationId": "9a3e5d90-b782-468a-a042-9a2073736f0b"
}Required permissions
View OrganizationView IntegrationsEdit IntegrationsRemoves any credentials set for this integration. If this is a brokered connection the operation will have no effect.
The organization ID. The API_KEY must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbedThe integration ID.
4a18d42f-0706-4ad0-b127-24078731fbedDELETE /v1/org/{orgId}/integrations/{integrationId}/authentication HTTP/1.1
Host: api.snyk.io
Accept: */*
No content
Switch the existing broker token with the provisioned token for this integration and any other in the same group. Only perform this action when you have a Broker client running with the provisioned token. This action will fail if there is no token provisioned for this integration or any integration in the same group.
Required permissions
View OrganizationView IntegrationsEdit Integrations
The API_KEY must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed4a18d42f-0706-4ad0-b127-24078731fbedPOST /v1/org/{orgId}/integrations/{integrationId}/authentication/switch-token HTTP/1.1
Host: api.snyk.io
Accept: */*
No content
Issue a new and unique provisional broker token for the brokered integration. Used for zero down-time token rotation with the Snyk Broker. Once provisioned, the token can be used to initialize a new broker client before using the switch API to update the token in use by the integration. The new provisional token will fail to be created if the integration, or any other integration in the same group, already has one provisioned.
Required permissions
View OrganizationView IntegrationsEdit Integrations
The API_KEY must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed4a18d42f-0706-4ad0-b127-24078731fbedPOST /v1/org/{orgId}/integrations/{integrationId}/authentication/provision-token HTTP/1.1
Host: api.snyk.io
Accept: */*
{
"id": "9a3e5d90-b782-468a-a042-9a2073736f0b",
"provisionalBrokerToken": "4a18d42f-0706-4ad0-b127-24078731fbed"
}Last updated
Was this helpful?

