Skip to main content
Version: 6.1.0

SlackChannelId

This page supports schema for Slack Datatype SlackChannelId.

{
"output": {
"properties": {
"cursor": {
"type": "string",
"x-label": {
"en": "Cursor",
"ko": "Cursor"
}
},
"data": {
"items": {
"properties": {
"label": {
"type": "string",
"x-label": {
"en": "Label",
"ko": "Label"
}
},
"value": {
"type": "string",
"x-label": {
"en": "Value",
"ko": "Value"
}
}
},
"type": "object"
},
"type": "array",
"x-label": {
"en": "Data",
"ko": "Data"
}
}
},
"title": "output",
"type": "object",
"x-label": {
"en": "Output",
"ko": "Output"
}
},
"variables": [
{
"title": "as_bot",
"type": "boolean",
"x-label": {
"en": "Get channels as bot",
"ko": "Get channels as bot"
}
}
]
}

Slack Channel List Pagination

Overview

Our service allows you to fetch the Slack channel list using pagination with cursor and limit parameters. This is achieved through a POST method with URL query parameters.

Endpoint

POST http://{{server}}:{{port}}/v1/service/slack/datatype/SlackChannelId/execute?userId={{user_id}}&cursor={{cursor}}&limit=1

Parameters

  • cursor (string, optional): A cursor pointing to the next page of results.
  • limit (integer, optional): The maximum number of results to return. Default is 100.

Example Requests

Fetching the first page of channels

POST http://{{server}}:{{port}}/v1/service/slack/datatype/SlackChannelId/execute?userId={{user_id}}&limit=100

This request will return the first 100 channels.

Fetching the next page of channels

To fetch the next page, use the cursor provided in the previous response:

POST http://{{server}}:{{port}}/v1/service/slack/datatype/SlackChannelId/execute?userId={{user_id}}&cursor=xoxp-abc123&limit=100

Replace xoxp-abc123 with the actual cursor value from the previous response.

Response Structure

The response includes the list of channels and a cursor for the next page if there are more results.

Response Example

{
"input": {},
"output": {
"cursor": "dGVhbTpDMDYxTkZUVDI",
"data": [
{
"label": "general",
"value": "C07297NNMK5"
}
]
}
}
  • data: An array of channel objects.
  • cursor: A cursor string to fetch the next page of results.

Handling Pagination

  1. Initial Request: Start with an initial request using the limit parameter.
  2. Next Page: Use the cursor from the response to request the next set of results.

Notes

  • Ensure you handle the cursor properly to avoid infinite loops.
  • Adjust the limit parameter according to your needs, but keep in mind the maximum limit.

For further assistance or questions, please contact our support team.