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

View Source

Summary

Functions

create(barriered_from_usergroup_ids, primary_usergroup_id, restricted_subjects, optional_params \\ %{})

Create an Information Barrier

API reference

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

View on docs.slack.dev ↗

Required Params

  • barriered_from_usergroup_ids - A list of IDP Groups ids that the primary usergroup is to be barriered from.
  • primary_usergroup_id - The id of the primary IDP Group
  • restricted_subjects - What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call

Errors the API can return:

  • barrier_already_exists - There already exists another barrier restricting activity between two or more of your requested usergroups.
  • barriered_from_usergroups_not_found - One or more of the ids passed in for barriered_from_usergroup_ids can’t be found.
  • feature_not_enabled - The information barrier feature is not enabled, please reach out to your CSM.
  • invalid_restricted_subjects - The restricted subjects provided are invalid or not currently supported.
  • not_an_admin - The token provided is not associated with an org admin.
  • primary_usergroup_not_found - The id passed in for primary_usergroup_id can’t be found.

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

delete(barrier_id, optional_params \\ %{})

Delete an existing Information Barrier

API reference

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

View on docs.slack.dev ↗

Required Params

  • barrier_id - The ID of the barrier you're trying to delete

Errors the API can return:

  • barrier_not_found - The barrier you're trying to delete cannot be found.
  • feature_not_enabled - The information barrier feature is not enabled, please reach out to your CSM.
  • not_an_admin - The token provided is not associated with an org admin.

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

list(optional_params \\ %{})

Get all Information Barriers for your organization

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 the previous call to list items in the next page ex: 5c3e53d5
  • limit - The maximum number of items to return. Must be between 1 - 1000 both inclusive ex: 100

Errors the API can return:

  • feature_not_enabled - Feature not enabled
  • invalid_cursor - Value passed for cursor was not valid or is no longer valid.
  • not_an_admin - The token provided is not associated with an org admin

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

update(barrier_id, barriered_from_usergroup_ids, primary_usergroup_id, restricted_subjects, optional_params \\ %{})

Update an existing Information Barrier

API reference

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

View on docs.slack.dev ↗

Required Params

  • barrier_id - The ID of the barrier you're trying to modify
  • barriered_from_usergroup_ids - A list of IDP Groups ids that the primary usergroup is to be barriered from.
  • primary_usergroup_id - The id of the primary IDP Group
  • restricted_subjects - What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call

Errors the API can return:

  • barrier_already_exists - There already exists another barrier restricting activity between two or more of your requested usergroups.
  • barrier_not_found - The barrier you're trying to update cannot be found.
  • barriered_from_usergroups_not_found - One or more of the ids passed in for barriered_from_usergroup_ids can’t be found.
  • feature_not_enabled - The information barrier feature is not enabled, please reach out to your CSM.
  • invalid_restricted_subjects - The restricted subjects provided are invalid or not currently supported.
  • not_an_admin - The token provided is not associated with an org admin.
  • primary_usergroup_not_found - The id passed in for primary_usergroup_id can’t be found.

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