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

View Source

Summary

Functions

Retrieve analytics data for a given date, presented as a compressed JSON file

Functions

get_file(type, optional_params \\ %{})

Retrieve analytics data for a given date, presented as a compressed JSON file

API reference

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

View on docs.slack.dev ↗

Required Params

  • type - The type of analytics to retrieve. The options are currently limited to member (for Enterprise org member analytics) and public_channel (for public channel analytics). When setting type to public_channel, you may also use the metadata_only boolean argument, which changes the response entirely to give you metadata about the public channels appearing in your conversation analytics. ex: member

Optional Params

  • date - Date to retrieve the analytics data for, expressed as YYYY-MM-DD in UTC. Required unless metadata_only is set to true. ex: 2020-09-01
  • metadata_only - Retrieve metadata for the type of analytics indicated. Can be used only with type set to public_channel analytics. See detail below. Omit the date parameter when using this argument. When setting type to public_channel, you may also use the metadata_only boolean argument, which changes the response entirely to give you metadata about the public channels appearing in your conversation analytics. ex: true

Errors the API can return:

  • data_not_available - The date was before the API became available.
  • feature_not_available - The user token does not belong to an Enterprise or Business+ team.
  • feature_not_enabled - This feature is not enabled on your workspace.
  • file_not_found - The analytics data for the date specified weren't found.
  • file_not_yet_available - The analytics data for the date isn't available yet.
  • invalid_date - The date argument was invalid.
  • invalid_type - The analytics data for the type specified weren't found.
  • member_analytics_disabled - Member analytics are disabled for your organization.
  • metadata_not_available - Metadata not available for the analytics type you provided.
  • metadata_only_does_not_support_date - The metadata_only field gets the latest metadata file. The date field is not supported.
  • not_an_admin - The user token does not have admin privileges.
  • org_level_email_display_disabled - This API is unavailable for organizations with a 'Hide email addresses' policy.
  • user_cannot_manage_public_channels - The user must have permissions to manage public channels at the Enterprise level.

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