SlackSettings

This document uses the REST API. For more details, see the Authentication for API page.

Create new Slack notification default settings.

post

Create new Slack notification default settings for a given tenant.

Authorizations
Path parameters
org_idstring · uuidrequired

Org ID

bot_idstring · uuidrequired

Bot ID

Query parameters
versionstringrequired

Requested API version

Example: 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))?))$
Body
dataobjectrequired

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/slack_app/{bot_id}?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
    "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.

get

Get Slack integration default notification settings for the provided tenant ID and bot ID.

Authorizations
Path parameters
org_idstring · uuidrequired

Org ID

bot_idstring · uuidrequired

Bot ID

Query parameters
versionstringrequired

Requested API version

Example: 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))?))$
Responses
curl -L \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/slack_app/{bot_id}?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "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

delete

Remove the given Slack App integration

Authorizations
Path parameters
org_idstring · uuidrequired

Org ID

bot_idstring · uuidrequired

Bot ID

Query parameters
versionstringrequired

Requested API version

Example: 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))?))$
Responses
curl -L \
  --request DELETE \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/slack_app/{bot_id}?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'

No body

Slack notification settings overrides for projects

get

Slack notification settings overrides for projects. These settings overrides the default settings configured for the tenant.

Authorizations
Path parameters
org_idstring · uuidrequired

Org ID

bot_idstring · uuidrequired

Bot ID

Query parameters
versionstringrequired

Requested API version

Example: 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))?))$
starting_afterstringoptional

Return the page of results immediately after this cursor

Example: v1.eyJpZCI6IjEwMDAifQo=
ending_beforestringoptional

Return the page of results immediately before this cursor

Example: v1.eyJpZCI6IjExMDAifQo=
limitinteger · int32 · min: 10 · max: 100 · default: 10optional

Number of results to return per page

Example: 10
Responses
curl -L \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/slack_app/{bot_id}/projects?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "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 a new Slack settings override for a given project.

post

Create Slack settings override for a project.

Authorizations
Path parameters
org_idstring · uuidrequired

Org ID

project_idstring · uuidrequired

Project ID

bot_idstring · uuidrequired

Bot ID

Query parameters
versionstringrequired

Requested API version

Example: 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))?))$
Body
dataobjectrequired

Responses
curl -L \
  --request POST \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/slack_app/{bot_id}/projects/{project_id}?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
    "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.

patch

Update Slack notification settings for a project.

Authorizations
Path parameters
org_idstring · uuidrequired

Org ID

bot_idstring · uuidrequired

Bot ID

project_idstring · uuidrequired

Project ID

Query parameters
versionstringrequired

Requested API version

Example: 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))?))$
Body
dataobjectoptional

Responses
curl -L \
  --request PATCH \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/slack_app/{bot_id}/projects/{project_id}?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
    "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.

delete

Remove Slack settings override for a project.

Authorizations
Path parameters
org_idstring · uuidrequired

Org ID

project_idstring · uuidrequired

Project ID

bot_idstring · uuidrequired

Bot ID

Query parameters
versionstringrequired

Requested API version

Example: 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))?))$
Responses
curl -L \
  --request DELETE \
  --url 'https://api.snyk.io/rest/orgs/{org_id}/slack_app/{bot_id}/projects/{project_id}?version=text' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'

No body

Last updated

Was this helpful?

Revision created

Add comment to emphasize required filters hidden in GitBook collapsed field