Skip to content

OSDU™ Search Service

OSDU Searches in R2 and beyond follow the Elastic Search specification. OSDU Query Syntax

Configure your Deployment Parameters

export ACCESS_TOKEN=<value> # replace with user's value
export PREVIEW_DEPLOYMENT_URL=<value> # replace with URL for your 47Lining Preview Deployment, including HTTPS

The fulltext search sample will search for all kinds.

curl \
 -H 'authorization: Bearer '"$ACCESS_TOKEN"'' \
 -H "Content-Type:application/json" \
 -X POST \
 -H 'data-partition-id:osdu' \
 -d '{"kind":"*:*:*:*","query": "*","limit":"5","returnedFields":["id","kind"]}' \
$PREVIEW_DEPLOYMENT_URL/api/search/v2/query

Field match Search for FacilityName

The FacilityName search sample will search for only Well kinds and specific facility names based on search value prefix.

curl \
 -H 'authorization: Bearer '"$ACCESS_TOKEN"'' \
 -H "Content-Type:application/json" \
 -H 'data-partition-id:osdu' \
 -X POST \
 -d '{"kind":"*:*:master-data--Well:*", "query": "data.FacilityName:BIR*", "returnedFields": ["data.FacilityName", "id", "kind"],"limit":5 }' \
$PREVIEW_DEPLOYMENT_URL/api/search/v2/query