This example demonstrates how to use the Data Graph Playground to construct a query to
get the PreciselyID of an address.
Before you can successfully submit a query, you must enter a valid token in the query's
header, then click
Refresh. A bearer token is valid for 60 minutes. For
more information about obtaining tokens, see
Prerequisites.
The address we are using is: REDWOOD HILLS APTS, 376 SUNDERLAND RD, WORCESTER MA
01604-2527, United States.
-
Enter the bearer token in the Header at the bottom of the editing pane. The format
is:
{
"Authorization":"Bearer <Add Token Here>"
}
-
Authenticate the token by clicking the Refresh icon.
-
Open the Documentation Explorer by clicking the icon to the left of the editor. This
will put you on the Docs page.
-
Select Query, then scroll through the list of methods until you
find
getByAddress.
The getByAddress query uses these inputs to fetch the Data Graph
relationships value:
- address: (Required) The address to search on.
- country: (Optional) The country the address is in.
Query Syntax:
getByAddress(
address: String!
country: String = "USA"
): RelationEntity
-
Edit the query.
You can either use the query format shown in the Documentation Explorer to build your
own query, or you can copy the sample query below.
The Query editor has Intellisense autocompletion. When you start typing an attribute or
query name, it will bring up a list of possible names for you to select from. The editor
also highlights errors and provides recommendations for correcting them.
query getByAddress {
getByAddress(address: "3252 Fulton St Denver") {
buildings {
data {
buildingID
buildingType {
value
description
}
ubid
fips
geographyID
latitude
longitude
elevation
maximumElevation
minimumElevation
buildingArea
geometry
}
}
}
}
-
When you are finished editing the query, execute it by clicking Execute query.
The results of the query will be shown on the right, in the gray margin. If the results do
not appear, make the gray margin larger by grabbing the right edge of the editor pane
and moving it to the left.