Running Graph Queries
Running your first graph query
Create your first graph query by creating a POST request to the graph queries resource. You will need to specify the graph query template you want to use, along with the parameters it needs. Please refer to the Graph Query Templates Documentation to see what you need for your specific query.
parameter-map
should be all the parameter names defined in your graph query template and the value you want to pass in. For example, if you have a parameter account-id
in your graph query template, it would look like:
After you submit this request to create the graph query, we’ll process it as soon as possible. The response of this request will include a graph query ID which you can use to poll for your query result.
The newly created graph query’s status starts as submitted
initially as it is being processed.
Getting the results of your query
Fetch the results of your graph query using the graph query ID from the graph queries resource.
Once the status
is completed
, the results are available in the response.
Query response format
If your team is interested in learning more about getting additional data in the API response, please let your Persona Graph contact know.
A note on node limits
Every graph query requires processing huge amounts of data and analyzing all of their relationships. To ensure performant queries, the computation will not continue traversing more nodes once it hits the node limit. It will return the accumulated results it has traversed so far. If node-limit-reached
is true
, the results will only reflect the portion of the graph it has traversed so far. Please reach out to your Persona Graph contact to inquire about pagination.
Best practices
For optimal query performance, try to keep the range of nodes being queried over small. For example:
- In general, a query over a smaller
created-at
time range would be faster. - In general, a query on a more unique node type, such as government ID number, would compute faster than a query on a node type with lots of matches, such as name.