Configure drop down items to come from an API
Last updated
Was this helpful?
Last updated
Was this helpful?
First, choose React Select
from the list of widgets
The URL of the API endpoint you want to pull data from.
For Procore, you can use our system to authorize. .
For ResponseVault, all requests to Procore use the URL /procore/api
then the endpoint from the docs, then any parameters using the query
parameter.
Headers are additional key/value pairs that are send with the request. This is sometimes used for authentication, but can also be used to send additional information to the API.
The URL to get a list of projects is /procore/api?endpoint=/vapid/projects&query[company_id]=1234
Which returns:
Since the records that are returned are at the root of the array(notice the [ ] that the record is inside), for procore, we don't need to have a value for this.
The name of the key in the response that you want to show in the form. In this case we would type in: name
and Lakeside Mixed Use
would appear as an option in the select box.
The value that is saved to the database. In our case, we would want the record ID, which is id
and will store 12738
when Lakeside Mixed Use
is chosen from the select box.