Slack.Web.SlackLists.Items (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Add a new item to an existing List.

Deletes an item from an existing List.

Deletes multiple items from an existing List.

Get records from a List.

Functions

create(list_id, optional_params \\ %{})

Add a new item to an existing List.

API reference

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

View on docs.slack.dev ↗

Required Params

  • list_id - ID of the List to add the item to.

Optional Params

  • duplicated_item_id - ID of the record to make a copy of.
  • initial_fields - Initial item data.
  • parent_item_id - ID of the parent record for this subtask.

Errors the API can return:

  • duplicated_item_not_found - The item to duplicate cannot be found.
  • file_not_found - The attachment file could not be found.
  • invalid_args - The provided arguments are invalid.
  • invalid_column_id - The column ID provided does not exist in the List.
  • invalid_input_type - The field value type does not match the column type.
  • invalid_option_id - Option ID provided does not match column definition.
  • invalid_vote_value - Invalid value provided for a vote column.
  • list_not_found - The List was not found.
  • over_cell_fields_limit - Too many values provided for a single field.
  • over_row_maximum - Cannot create more items over the maximum.
  • team_not_found - The team cannot be found.
  • uneditable_column - Initial values provided for an uneditable column.
  • user_not_found - The user cannot be found.

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

delete(id, list_id, optional_params \\ %{})

Deletes an item from an existing List.

API reference

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

View on docs.slack.dev ↗

Required Params

  • id - ID of item to delete. ex: Rec1234567
  • list_id - ID of the List containing the item. ex: F12345678

Errors the API can return:

  • list_not_found - The List was not found.
  • record_not_found - The record was not found in the List.
  • team_not_found - The team cannot be found.
  • user_not_found - The user cannot be found.

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

delete_multiple(ids, list_id, optional_params \\ %{})

Deletes multiple items from an existing List.

API reference

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

View on docs.slack.dev ↗

Required Params

  • ids - IDs of items to delete.
  • list_id - ID of the List containing the items. ex: F12345678

Errors the API can return:

  • list_not_found - The List was not found.
  • team_not_found - The team cannot be found.
  • user_not_found - The user cannot be found.

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

info(id, list_id, optional_params \\ %{})

Get a row from a List.

API reference

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

View on docs.slack.dev ↗

Required Params

  • id - ID of the row to get. ex: Rec014K005UQJ
  • list_id - ID of the List. ex: F1234567

Optional Params

  • include_is_subscribed - Set to true to include is_subscribed data for the returned List row.

Errors the API can return:

  • list_not_found - The List was not found.
  • record_deleted - The record has been deleted.
  • record_not_found - The record was not found in the List.
  • team_not_found - The team cannot be found.
  • user_not_found - The user cannot be found.

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

list(list_id, optional_params \\ %{})

Get records from a List.

API reference

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

View on docs.slack.dev ↗

Required Params

  • list_id - ID of the List. ex: F12345678

Optional Params

  • archived - Boolean indicating whether archived items or normal items should be returned. ex: true
  • cursor - Next cursor for pagination. ex: bGlzdF9pZDoxMjIxNzk3NzMyNDgzO2lkOjEyNzAxMjMxNTEzOTQ7ZGF0ZV9jcmVhdGVkOjE3NTE1NTkyMTU=
  • limit - The maximum number of records to return. ex: 100

Errors the API can return:

  • archive_not_supported - Archiving is not supported.
  • invalid_cursor - Value passed for cursor was not valid or is no longer valid.
  • list_not_found - The List was not found.
  • team_not_found - The team cannot be found.
  • user_not_found - The user cannot be found.

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

update(cells, list_id, optional_params \\ %{})

Updates cells in a List.

API reference

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

View on docs.slack.dev ↗

Required Params

  • cells - Cells to update. ex: [{"row_id":"Rec014K005UQJ","column_id":"Col014K005UQJ","user":["U01284PCR98", "U0137181B5H"]}]
  • list_id - ID of the List to add or update cells. ex: F01ABCDE2FG

Errors the API can return:

  • channel_not_found - The channel cannot be found.
  • column_id_not_provided - The column_id or column_id_to_create field must be provided.
  • column_not_found - The column was not found.
  • file_not_found - Invalid file ID for this List.
  • invalid_attachment - Invalid attachment provided.
  • invalid_blocks - Rich text payload supplied is invalid.
  • invalid_column_id - Invalid column ID for this List.
  • invalid_date - Date supplied is invalid.
  • invalid_email - Email supplied is invalid.
  • invalid_input_type - Supplied value key or value type is invalid for the given column type.
  • invalid_link - Message archive link supplied is invalid.
  • invalid_message - Invalid message provided.
  • invalid_option_id - Option supplied is invalid.
  • invalid_phone_number - Invalid phone number provided.
  • invalid_row_id - Invalid row ID for this List.
  • invalid_text_block - Rich text payload supplied is invalid.
  • invalid_vote_value - Invalid vote value is supplied.
  • list_not_found - The List was not found.
  • over_cell_fields_limit - The supplied cell fields are over the cell field maximum.
  • permission_denied - The user does not have permission to perform this action.
  • row_id_not_provided - The row_id or row_id_to_create field must be provided.
  • row_not_found - The row was not found.
  • team_not_found - The team cannot be found.
  • uneditable_column - The column cannot be updated.
  • user_not_found - The user cannot be found.

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