Slack.Web.Admin.Analytics.Messages (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Retrieves activity metrics for messages from a given channel.

Retrieves metadata for a list of messages from a given channel.

Functions

activity(channel, optional_params \\ %{})

Retrieves activity metrics for messages from a given channel.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel - Channel ID for channel of the message activity to query.

Optional Params

  • cursor - Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. ex: abcd...
  • latest_ts - Most recent timestamp to include in results. Defaults to current time. If not passed while still passing the oldest_ts parameter, defaults to 7 days after oldest_ts.
  • limit - Maximum number of entries to return. The maximum limit is 100.
  • oldest_ts - Oldest timestamp to include in the results. Defaults to 7 days before current time. If not passed while still passing the latest_ts parameter, defaults to 7 days before latest_ts.

Errors the API can return:

  • channel_not_found - The specified channel was not found.
  • not_an_enterprise - The user token does not belong to an enterprise.
  • restricted_action - The token does not have permission to access this resource.
  • restricted_plan_level - The enterprise plan level does not have access to this feature.

See the Common Errors guide for errors returned by every Web API method.

metadata(channel, optional_params \\ %{})

Retrieves metadata for a list of messages from a given channel.

API reference

Rate limit: 1200 requests per minute with a burst allowance of 2000.
Scopes:

View on docs.slack.dev ↗

Required Params

  • channel - Channel ID for channel containing the messages to query.

Optional Params

  • cursor - Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more details. ex: abcd...
  • latest_ts - Most recent timestamp to include in the results. If not passed, defaults to current time.
  • oldest_ts - Oldest timestamp to include in the results

Errors the API can return:

  • admin_analytics_disabled - We're having issues returning your analytics. Please wait and try again.
  • analytics_unavailable - We were unable to find analytics for you.
  • channel_not_found - The specified channel was not found
  • different_team_owns_message_metadata_for_channel - Message metadata must be accessed by an actor from the same team that owns the channel. This may be the org or a specific enterprise workspace.
  • not_an_enterprise - The user token does not belong to an enterprise.
  • restricted_plan_level - This feature is not available for your current product plan.

See the Common Errors guide for errors returned by every Web API method.