Collections
...
Collections API
Requests

Find Requests

6min

Find Requests

You can Find (or search) the Requests in a Collection by making making a HTTP GET request to the /collections/COLLECTION_ID/requests/PAGE?q=XYZ endpoint (where COLLECTION_ID is the id of the Collection to get Requests for, PAGE is the page of matching Requests to get and the q querystring parameter is the search term to search for).

This endpoint is particuarly useful if you are allowing your users to modify the Requests within Collections on your UI as you can allow them to search through all of the Requests in the Collection to find the one they'd like to modify.

Concurrency when Finding Requests You should make calls to the Find Request endpoint sequentially, rather than in parallel. If you make too many concurrent calls you will receive an HTTP 429 error.



Example

GET /collections/COLLECTION_ID/requests/PAGE?q=XYZ

In the example below we return page 1 of the Requests from the Collection with id=123456 that match the search term test (note the search term is specified using the "q" querystring parameter):

Searching by Custom IDs Backyard API will look for the q parameter in the Request and in the custom_id (if any) you assigned to the Request. This way it's easy to find Requests using the custom_id from your app.

HTTP
Curl
Node.js
Python
PHP


Backyard API responds with the following JSON showing all the Requests on page 1 of the Collection:

JSON



Finding by Custom ID

GET /collections/COLLECTION_ID/requests/PAGE?custom_id=XYZ In the example below we return page 1 of the Requests from Collection with custom_id=123456 . This is useful for keeping track of Requests and referencing them by the ID you passed into the custom_id field.

HTTP
Curl


Backyard API responds with the following JSON showing all the Requests matching the passed custom_id :

JSON