Get list of all books
GET {{airtable_url}}
We will get a list of all books available in Qodex Office Library (stored in an Airtable Base ) using the Airtable API.
Pre-request script: When you type /bookbug [The Hobbit]
in Slack and hit enter, the message (and its data) is sent to the Qodex monitor url via HTTP POST. We will store this query as an environment variable user_query
under the Pre-request Script tab. Additionally, Slack also sends a response_url
as a part of the payload. This url will be used to send data back to slack. We will store this url as an environment variable response_url
.
Test script: Under the Tests tab, we will extract the id of the queried book and store it in an environment variable record_id
. If the book is not available, the next request to be executed will be set as Post to slack (unavailable)
using Qodex's setNextRequest()
method.
The Qodex.setNextRequest()
method accepts a request name or id within the same collection as a parameter. Use this method to establish a workflow sequence and designate which request in the same collection to run next, instead of defaulting to the linear execution. Read more about building workflows.
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string |
RESPONSES
status: OK
{"records":[{"id":"rec333t05Fwash24B","fields":{"Name":"The Lord of the Rings","Author":["recy4sWplSIl9oYEd"]},"createdTime":"2017-08-30T12:42:08.000Z"},{"id":"recECIm0HYk2lfo5a","fields":{},"createdTime":"2017-08-30T12:44:05.000Z"},{"id":"recJpfqVr6msDaKWA","fields":{"Name":"Truly Madly Guilty","Author":["recnRgx0gvtw1QbfZ"]},"createdTime":"2017-08-30T12:21:58.000Z"},{"id":"recKxLYjEbDwZ2QPr","fields":{"Name":"The Goldfinch","Author":["recj9EJY5GnRruMRF"],"Cover Photo":[{"id":"attnBLGe5pzEs71Cv","url":"https://dl.airtable.com/PIiPbTw7SxGFVbPjEVEG_The_Goldfinch_A_Novel_Pulitzer_Prize_for_Fiction_National_Book_...","filename":"The_Goldfinch_A_Novel_Pulitzer_Prize_for_Fiction_National_Book_...","size":15491,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/1gD8wBa1R6upHN9LE1Zo_small_The_Goldfinch_A_Novel_Pulitzer_Prize_for_Fiction_National_Book_...","width":24,"height":36},"large":{"url":"https://dl.airtable.com/Mqwu4FQPT8GXEzGM9DvT_large_The_Goldfinch_A_Novel_Pulitzer_Prize_for_Fiction_National_Book_...","width":256,"height":392}}},{"id":"attlY8jrFZEU6mpYP","url":"https://dl.airtable.com/4H5erajCSL65bLOwiJVv_The_Goldfinch_by_Donna_Tartt__Reviews_Discussion_Bookclubs_Lists","filename":"The_Goldfinch_by_Donna_Tartt__Reviews_Discussion_Bookclubs_Lists","size":159789,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/iCGLuFLzQBSzSwTxmiue_small_The_Goldfinch_by_Donna_Tartt__Reviews_Discussion_Bookclubs_Lists","width":24,"height":36},"large":{"url":"https://dl.airtable.com/BQWmbq9qQuiKdYyYYSIh_large_The_Goldfinch_by_Donna_Tartt__Reviews_Discussion_Bookclubs_Lists","width":256,"height":377}}}]},"createdTime":"2015-01-12T00:01:19.000Z"},{"id":"recQLSfQCcXjRuFwL","fields":{"Name":"The Girls","Author":["recArP0RBfHGKnUHP"]},"createdTime":"2017-08-30T12:41:51.000Z"},{"id":"recUVscSuEVo1KVLi","fields":{},"createdTime":"2017-08-31T09:38:09.000Z"},{"id":"recYDOqKU6DTXHoHM","fields":{"Name":"All the Ugly and Wonderful Things","Author":["recvyHQ4RAYhJqPah"]},"createdTime":"2017-08-30T12:41:24.000Z"},{"id":"recgiigEg3mSSv7J8","fields":{"Name":"East of Eden","Author":["recFqaU9zbE7wyDTa"],"Cover Photo":[{"id":"att8KASqvxU1spKit","url":"https://dl.airtable.com/ci3rkfJxTNaSEjpJhvcv_East_of_Eden_novel_-_Wikipedia_the_free_encyclopedia","filename":"East_of_Eden_novel_-_Wikipedia_the_free_encyclopedia","size":43060,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/Bb3VGZZARNyHkIwMC1gt_small_East_of_Eden_novel_-_Wikipedia_the_free_encyclopedia","width":25,"height":36},"large":{"url":"https://dl.airtable.com/VWn60KCQYuZ3lpiNHEYz_large_East_of_Eden_novel_-_Wikipedia_the_free_encyclopedia","width":256,"height":370}}},{"id":"attuzciJa3oVm72R9","url":"https://dl.airtable.com/ISqtdgtHTJ6NKIK5haP9_Classic_Film_Series_Premieres_with_East_of_Eden__The_Capistrano_...","filename":"Classic_Film_Series_Premieres_with_East_of_Eden__The_Capistrano_...","size":1109641,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/OCW8zxqR3aYS44Iswm4a_small_Classic_Film_Series_Premieres_with_East_of_Eden__The_Capistrano_...","width":24,"height":36},"large":{"url":"https://dl.airtable.com/D2zBf1ZTR8yK5NsMqA2F_large_Classic_Film_Series_Premieres_with_East_of_Eden__The_Capistrano_...","width":256,"height":384}}}]},"createdTime":"2013-08-16T04:42:56.000Z"},{"id":"recgth3N6ecIAOMe7","fields":{"Name":"The Hunger Games","Author":["rec5ai4HA5kNBK58w"]},"createdTime":"2017-08-30T12:43:29.000Z"},{"id":"rechdkfya08YRhSMZ","fields":{"Name":"Consolations of Philosophy","Read?":true,"Author":["recj5w9w98fZZkWH4"],"Cover Photo":[{"id":"attgZQfh8BqsKcXhq","url":"https://dl.airtable.com/rwVB50V5RHmZGKND0KQS_The_Consolation_of_Philosophy_-_Wikipedia_the_free_encyclopedia","filename":"The_Consolation_of_Philosophy_-_Wikipedia_the_free_encyclopedia","size":263187,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/f3vzsqq8T2aq2Z5v8Hmr_small_The_Consolation_of_Philosophy_-_Wikipedia_the_free_encyclopedia","width":26,"height":36},"large":{"url":"https://dl.airtable.com/fGUYBZ7tSoadOV5OxyNV_large_The_Consolation_of_Philosophy_-_Wikipedia_the_free_encyclopedia","width":256,"height":355}}},{"id":"attiLXOdWacR67yiN","url":"https://dl.airtable.com/ccIPfPECSKOEnW0kw5qq_The_Consolations_of_Philosophy_Popular_Penguins__Penguin_Books_...","filename":"The_Consolations_of_Philosophy_Popular_Penguins__Penguin_Books_...","size":188231,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/eteI9AqSBzTKY8gms0Ug_small_The_Consolations_of_Philosophy_Popular_Penguins__Penguin_Books_...","width":22,"height":36},"large":{"url":"https://dl.airtable.com/1tFkdAcpQhOK9WPXq1Uw_large_The_Consolations_of_Philosophy_Popular_Penguins__Penguin_Books_...","width":256,"height":417}}}],"Bought?":true,"Personal Rating":"4: Good"},"createdTime":"2014-06-17T08:16:39.000Z"},{"id":"reckoYpXYwmHdO81z","fields":{"Name":"Half of a Yellow Sun","Read?":true,"Author":["recVWtrMNVlthfcuf"],"Cover Photo":[{"id":"att5w6Do2fSC7cs0s","url":"https://dl.airtable.com/qUatvnEJS4e6Vo17Do0k_Screening_Half_of_A_Yellow_Sun_presented_by_BronzeLens__Africa_...","filename":"Screening_Half_of_A_Yellow_Sun_presented_by_BronzeLens__Africa_...","size":881397,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/lqlo4gG9QtqR9HhBqUXG_small_Screening_Half_of_A_Yellow_Sun_presented_by_BronzeLens__Africa_...","width":23,"height":36},"large":{"url":"https://dl.airtable.com/LWoERN5QBKgHS9OwhEVb_large_Screening_Half_of_A_Yellow_Sun_presented_by_BronzeLens__Africa_...","width":256,"height":394}}},{"id":"attp089AEEglei8dm","url":"https://dl.airtable.com/NKLXPiYOQvCYJevaPIPe_HalfYellowSun.JPG","filename":"HalfYellowSun.JPG","size":46621,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/Mq7vrYvRUmg5CVHaGCCX_small_HalfYellowSun.JPG","width":23,"height":36},"large":{"url":"https://dl.airtable.com/xM4SHfYTH2rN0nGYXB0Q_large_HalfYellowSun.JPG","width":256,"height":398}}},{"id":"att3ojh6DdZWUP7sy","url":"https://dl.airtable.com/BFWsa7AaSJmZuP0MvAAO_Half_of_a_Yellow_Sun__Vintage__Anchor_Books","filename":"Half_of_a_Yellow_Sun__Vintage__Anchor_Books","size":437588,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/LcIIzTY3S8eOpE9LHW7J_small_Half_of_a_Yellow_Sun__Vintage__Anchor_Books","width":23,"height":36},"large":{"url":"https://dl.airtable.com/QInQ5s08TO2GJGJ1MTy2_large_Half_of_a_Yellow_Sun__Vintage__Anchor_Books","width":256,"height":394}}},{"id":"att2KLuIRRPLua0Ae","url":"https://dl.airtable.com/eg76XvpxQDGDhBNTAY0S_Half_of_a_Yellow_Sun_2013_-_IMDb","filename":"Half_of_a_Yellow_Sun_2013_-_IMDb","size":65881,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/5z3wSVWSRa6faPXoMkIC_small_Half_of_a_Yellow_Sun_2013_-_IMDb","width":24,"height":36},"large":{"url":"https://dl.airtable.com/ICmpV0G2TruLrmX6Z0HL_large_Half_of_a_Yellow_Sun_2013_-_IMDb","width":256,"height":379}}}],"Bought?":true,"Personal Rating":"5: Fantastic!"},"createdTime":"2015-01-12T00:01:43.000Z"},{"id":"reclmo9XrkorP2Ez5","fields":{},"createdTime":"2017-08-30T12:43:49.000Z"},{"id":"recluPm3ZHCI5NbKu","fields":{"Name":"The Hobbit ","Author":["recy4sWplSIl9oYEd"]},"createdTime":"2017-08-30T12:43:11.000Z"},{"id":"recngngFmVbQ1k0HX","fields":{"Name":"On the Road","Author":["recm4omGiVb1ZrVO7"],"Cover Photo":[{"id":"attMyALmVen5THD5r","url":"https://dl.airtable.com/TqvV2aE3R2OCKZ637aDc_On_the_Road_2012_-_IMDb","filename":"On_the_Road_2012_-_IMDb","size":20198,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/iuADzqfQqm6wKqkexVNg_small_On_the_Road_2012_-_IMDb","width":24,"height":36},"large":{"url":"https://dl.airtable.com/S08VvIzxTq1ZXs9UOcgC_large_On_the_Road_2012_-_IMDb","width":256,"height":379}}},{"id":"attv4LzSjLbNh6u7D","url":"https://dl.airtable.com/AhuXLeLbRYOI5gnl5i55_On_the_Road_film_-_Wikipedia_the_free_encyclopedia","filename":"On_the_Road_film_-_Wikipedia_the_free_encyclopedia","size":29097,"type":"image/jpeg","thumbnails":{"small":{"url":"https://dl.airtable.com/BiJVMCE0SbSwCSyCumZo_small_On_the_Road_film_-_Wikipedia_the_free_encyclopedia","width":26,"height":36},"large":{"url":"https://dl.airtable.com/kreFaUwOQWezTD1ztUnt_large_On_the_Road_film_-_Wikipedia_the_free_encyclopedia","width":256,"height":349}}}],"Bought?":true},"createdTime":"2014-09-06T02:27:01.000Z"}]}