Reports Tutorials

Learn more in the Reports API documentation

Running your first report

Create your first report by creating a POST request to the reports resource.

curl
1API_KEY=YOUR_API_KEY_HERE
2curl -X POST -H 'Content-Type: application/json' \
3 -H "Authorization: Bearer $API_KEY" -d'{
4 "data": {
5 "attributes": {
6 "report-template-id": YOUR_TEMPLATE_ID,
7 }
8 }
9}' https://withpersona.com/api/v1/reports

After you submit this request to create the report, we’ll process it as soon as possible. This usually happens within a second.

The response of this request will include a report ID which you can use to poll for your report.

json
1{
2 "data": {
3 "type: "report/watchlist",
4 "id": "rep_yourfirstreportid",
5 "attributes": {
6 "status": "pending",
7 "..." : "..."
8 }
9 }
10}

Getting the results of your report

Fetch your report using the report ID from the reports resource.

curl
1API_KEY=YOUR_API_KEY_HERE
2curl -X GET -H 'Content-Type: application/json' \
3 -H "Authorization: Bearer $API_KEY" \
4 https://withpersona.com/api/v1/reports/REPORT_ID

Once the status is ready, the results should be available in the response.

json
1{
2 "data": {
3 "type: "report/watchlist",
4 "id": "rep_yourfirstreportid",
5 "attributes": {
6 "status": "ready",
7 ...
8 }
9 }
10}