Slack. Web. Views
(SlackKit v1.0.0-alpha.0)
View Source
Summary
Functions
Open a view for a user.
Publish a static view for a User.
Push a view onto the stack of a root view.
Update an existing view.
Functions
Open a view for a user.
API reference
Rate limit: Tier 4: 100+ per minute
Scopes: No scopes required
Required Params
view- A view payload. This must be a JSON-encoded string.
Optional Params
interactivity_pointer- Exchange an interactivity pointer to post to the user. ex:12345.98765.abcd2358fdeatrigger_id- Exchange a trigger to post to the user. ex:12345.98765.abcd2358fdea
Errors the API can return:
duplicate_external_id- Error returned when the givenexternal_idhas already be used.exchanged_trigger_id- The trigger_id was already exchanged in a previous call.expired_trigger_id- The trigger_id is expired.invalid_trigger_id- The trigger_id is invalid. The expected format for the trigger_id argument is "132456.7890123.abcdef".view_too_large- Error returned if the provided view is greater than 250kb.
See the Common Errors guide for errors returned by every Web API method.
Publish a static view for a User.
API reference
Rate limit: Tier 4: 100+ per minute
Scopes: No scopes required
Required Params
user_id-idof the user you want publish a view to. ex:U0BPQUNTAview- A view payload. This must be a JSON-encoded string.
Optional Params
hash- A string that represents view state to protect against possible race conditions. ex:156772938.1827394
Errors the API can return:
duplicate_external_id- Error returned when the givenexternal_idhas already be used.hash_conflict- Error returned when the providedhashdoesn't match the current stored value.missing_profile_id- A profile id was not provided when trying to publish a view of type profile.not_enabled- Error returned if ahomeview is published but the Home tab isn't enabled for the app.not_implemented- The profile view experiment is not enabled for this user.view_too_large- Error returned if the provided view is greater than 250kb.
See the Common Errors guide for errors returned by every Web API method.
Push a view onto the stack of a root view.
API reference
Rate limit: Tier 4: 100+ per minute
Scopes: No scopes required
Required Params
view- A view payload. This must be a JSON-encoded string.
Optional Params
interactivity_pointer- Exchange an interactivity pointer to post to the user. ex:12345.98765.abcd2358fdeatrigger_id- Exchange a trigger to post to the user. ex:12345.98765.abcd2358fdea
Errors the API can return:
duplicate_external_id- Error returned when the givenexternal_idhas already be used.exchanged_trigger_id- The trigger_id was already exchanged in a previous call.expired_trigger_id- The trigger_id is expired.invalid_trigger_id- The trigger_id is invalid. The expected format for the trigger_id argument is "132456.7890123.abcdef".not_found- Error returned when the requested view can't be found.push_limit_reached- Error returned when the max push limit has been reached for views. Currently the limit is 3.view_too_large- Error returned if the provided view is greater than 250kb.
See the Common Errors guide for errors returned by every Web API method.
Update an existing view.
API reference
Rate limit: Tier 4: 100+ per minute
Scopes: No scopes required
Required Params
view- A view object. This must be a JSON-encoded string.
Optional Params
external_id- A unique identifier of the view set by the developer. Must be unique for all views on a team. Max length of 255 characters. Eitherview_idorexternal_idis required. Update a view by passing a new view definition object along with theview_idreturned inviews.openor theexternal_id. ex:bmarley_view2hash- A string that represents view state to protect against possible race conditions. ex:156772938.1827394view_id- A unique identifier of the view to be updated. Eitherview_idorexternal_idis required. Update a view by passing a new view definition object along with theview_idreturned inviews.openor theexternal_id. ex:VMM512F2U
Errors the API can return:
duplicate_external_id- Error returned when the givenexternal_idhas already be used.hash_conflict- Error returned when the providedhashdoesn't match the current stored value.not_found- Error returned when the givenview_idorexternal_iddoesn't exist.view_too_large- Error returned if the provided view is greater than 250kb.
See the Common Errors guide for errors returned by every Web API method.