Slack.Web.Team (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Gets the access logs for the current team.

Gets billable users information for the current team.

Gets information about the current team.

Gets the integration logs for the current team.

Functions

access_logs(optional_params \\ %{})

Gets the access logs for the current team.

API reference

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

View on docs.slack.dev ↗

Optional Params

  • before - End of time range of logs to include in results (inclusive). ex: 1457989166
  • count -
  • cursor - Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details. ex: dXNlcjpVMDYxTkZUVDI=
  • limit - The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. If specified, result is returned using a cursor-based approach instead of a classic one. 0 ex: 20
  • page -
  • team_id - encoded team id to get logs from, required if org token is used

Errors the API can return:

  • invalid_cursor - Value passed for cursor was not valid or is no longer valid.
  • invalid_limit - The value passed for limit was not valid.
  • invalid_team_id - The value passed for team_id is not valid given the token context.
  • missing_argument - A required argument is missing.
  • over_pagination_limit - It is not possible to request more than 1000 items per page or more than 100 pages.
  • paid_only - This is only available to paid teams.

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

billable_info(optional_params \\ %{})

Gets billable users information for the current team.

API reference

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

View on docs.slack.dev ↗

Optional Params

  • cursor - Set cursor to next_cursor returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page. ex: dXNlcjpVMDYxTkZUVDI=
  • limit - The maximum number of items to return. ex: 20
  • team_id - encoded team id to get the billable information from, required if org token is used
  • user - A user to retrieve the billable information for. Defaults to all users.

Errors the API can return:

  • invalid_cursor - Value passed for cursor was not valid or is no longer valid.
  • user_not_found - Unable to find the requested user.

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

info(optional_params \\ %{})

Gets information about the current team.

API reference

Rate limit: Tier 3: 50+ per minute
Scopes:

View on docs.slack.dev ↗

Optional Params

  • domain - Query by domain instead of team (only when team is null). This only works for domains in the same enterprise as the querying team token. This also expects the domain to belong to a team and not the enterprise itself. This is the value set up for the 'Joining This Workspace' workspace setting. If it contains more than one domain, the field will contain multiple comma-separated domain values. If no domain is set, the field is empty.
  • team - Team to get info about; if omitted, will return information about the current team.

Errors the API can return:

  • enterprise_not_found - The enterprise was not found.
  • fail_to_get_teams_for_restricted_user - Failed to get teams for restricted user.
  • missing_user - The user was not found.
  • org_not_found - The org was not found.
  • team_not_found - The team was not found.
  • team_not_on_enterprise - Cannot query team by domain because team is not on an enterprise.
  • user_not_found - The user was not found.

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

integration_logs(optional_params \\ %{})

Gets the integration logs for the current team.

API reference

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

View on docs.slack.dev ↗

Optional Params

  • app_id - Filter logs to this Slack app. Defaults to all logs.
  • change_type - Filter logs with this change type. Possible values are added, removed, enabled, disabled, and updated. Defaults to all logs. Acceptable values: added removed enabled disabled updated ex: added
  • count -
  • page -
  • service_id - Filter logs to this service. Defaults to all logs.
  • team_id - encoded team id to get logs from, required if org token is used
  • user - Filter logs generated by this user’s actions. Defaults to all logs.

Errors the API can return:

  • missing_argument - A required argument is missing.

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