Slack

이 문서는 REST API를 사용합니다. 자세한 내용은 API용 인증 페이지를 참조하십시오.

Get a list of Slack channels

get

Requires the Snyk Slack App to be set up for this org, will retrieve a list of channels the Snyk Slack App can access. Note that it is currently only possible to page forwards through this collection, no prev links will be generated and the ending_before parameter will not function.

Authorizations
Path parameters
org_idstring · uuidRequired

Org ID

tenant_idstring · uuidRequired

Tenant ID

Query parameters
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: 1000Optional

Number of results to return per page

Default: 1000Example: 100
versionstringRequired

Requested API version

Example: 2021-06-04Pattern: ^(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
200

List of Slack channels

application/vnd.api+json
get
GET /rest/orgs/{org_id}/slack_app/{tenant_id}/channels HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "attributes": {
        "name": "general",
        "type": "public"
      },
      "id": "slack://channel?team=T123456&id=C123456",
      "type": "slack_channel"
    }
  ],
  "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"
  }
}

Get Slack Channel name by Slack Channel ID.

get

Requires the Snyk Slack App to be set up for this org. It will return the Slack channel name for the provided Slack channel ID.

Authorizations
Path parameters
org_idstring · uuidRequired

Org ID

channel_idstring · uriRequired

Slack Channel ID

tenant_idstring · uuidRequired

Tenant ID

Query parameters
versionstringRequired

Requested API version

Example: 2021-06-04Pattern: ^(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
200

List of Slack channels

application/vnd.api+json
get
GET /rest/orgs/{org_id}/slack_app/{tenant_id}/channels/{channel_id} HTTP/1.1
Host: api.snyk.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": {
    "attributes": {
      "name": "general",
      "type": "public"
    },
    "id": "slack://channel?team=T123456&id=C123456",
    "type": "slack_channel"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://example.com/api/this_resource"
  }
}

Last updated