SlackSettings
Create new Slack notification default settings for a given tenant.
Org ID
Bot ID
Requested API version
2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
POST /rest/orgs/{org_id}/slack_app/{bot_id} HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 133
{
"data": {
"attributes": {
"severity_threshold": "high",
"target_channel_id": "slack://channel?team=team-id&id=channel-id"
},
"type": "slack"
}
}
{
"data": {
"attributes": {
"severity_threshold": "high",
"target_channel_id": "slack://channel?team=team-id&id=channel-id",
"target_channel_name": "channel-name"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "slack"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://example.com/api/this_resource"
}
}
Get Slack integration default notification settings for the provided tenant ID and bot ID.
Org ID
Bot ID
Requested API version
2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
GET /rest/orgs/{org_id}/slack_app/{bot_id} HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"attributes": {
"severity_threshold": "high",
"target_channel_id": "slack://channel?team=team-id&id=channel-id",
"target_channel_name": "channel-name"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "slack"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://example.com/api/this_resource"
}
}
Remove the given Slack App integration
Org ID
Bot ID
Requested API version
2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
DELETE /rest/orgs/{org_id}/slack_app/{bot_id} HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Slack notification settings overrides for projects. These settings overrides the default settings configured for the tenant.
Org ID
Bot ID
Requested API version
2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Return the page of results immediately after this cursor
v1.eyJpZCI6IjEwMDAifQo=
Return the page of results immediately before this cursor
v1.eyJpZCI6IjExMDAifQo=
Number of results to return per page
10
Example: 10
GET /rest/orgs/{org_id}/slack_app/{bot_id}/projects HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"attributes": {
"is_active": true,
"severity_threshold": "high",
"target_channel_id": "slack://channel?team=team-id&id=channel-id",
"target_channel_name": "channel-name",
"target_project_name": "snyk/goof:package.json"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "slack"
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
"last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
"next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
}
}
Create Slack settings override for a project.
Org ID
Project ID
Bot ID
Requested API version
2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
POST /rest/orgs/{org_id}/slack_app/{bot_id}/projects/{project_id} HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 133
{
"data": {
"attributes": {
"severity_threshold": "high",
"target_channel_id": "slack://channel?team=team-id&id=channel-id"
},
"type": "slack"
}
}
{
"data": {
"attributes": {
"is_active": true,
"severity_threshold": "high",
"target_channel_id": "slack://channel?team=team-id&id=channel-id",
"target_channel_name": "channel-name",
"target_project_name": "snyk/goof:package.json"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "slack"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://example.com/api/this_resource"
}
}
Update Slack notification settings for a project.
Org ID
Bot ID
Project ID
Requested API version
2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
PATCH /rest/orgs/{org_id}/slack_app/{bot_id}/projects/{project_id} HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 194
{
"data": {
"attributes": {
"is_active": true,
"severity_threshold": "high",
"target_channel_id": "slack://channel?team=team-id&id=channel-id"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "slack"
}
}
{
"data": {
"attributes": {
"is_active": true,
"severity_threshold": "high",
"target_channel_id": "slack://channel?team=team-id&id=channel-id",
"target_channel_name": "channel-name",
"target_project_name": "snyk/goof:package.json"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "slack"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://example.com/api/this_resource"
}
}
Remove Slack settings override for a project.
Org ID
Project ID
Bot ID
Requested API version
2021-06-04
Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
DELETE /rest/orgs/{org_id}/slack_app/{bot_id}/projects/{project_id} HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
Was this helpful?