Querying The Database
Remember when we set the dqlFormula of the schema to @True and added dql form mode in Contact form? Both of these steps are required in order for us to run a DQL query.
Getting Contacts for a Customer
- Hover over the
Domino-REST-API-NewDBcollection name and click on the ellipsis (three dots). Select Add Request. - Name the request
get contact from customer UNIDand click Save. - Change the method from GET to POST.
- Set the URL as
{{HOST}}/query?dataSource=customers&action=execute. - Set the headers for Authorization and Content-Type.
- On the Body tab change the type to
Rawand also change the type fromTexttoJSON. - Set the request body content as below, but setting the UNID variable to the value for
unidyou received when creating the customer:
{
"query": "form = 'contact' and customerUNID = ?UNID",
"maxScanDocs": 500000,
"maxScanEntries": 200000,
"timeoutSecs": 300,
"viewRefresh": true,
"noViews": false,
"variables": {
"UNID": "{{parentUNID}}"
}
}
- Click Send.
- Save and close the request.

You have queried all contacts for the company requested.
Previous Page Next Page