apps.datastore.get
method
Welcome to the new home of Slack developer docs!
We're still building and not all features are available quite yet. Enjoy this peek into the future!
Not ready for the future? Return to the past at api.slack.com.
Usage info
This method is only available for workflow apps.
Refer to Datastores for more information.
This method is used to get a datastore item. The following example would get an item with "4" as its primary key.
{
"datastore": "good_tunes",
"id": "4"
}
When you query for an item in a datastore and that item does not exist, you will receive a successful, empty response:
{
ok: true,
item: {}
}
If you want to check whether a datastore item exists, first query the datastore, then
check if the returned item
property is empty. If it is, the item was not found.