Comments

2 comments

  • Avatar
    Howard Lio

    Hi Paarth, 

    Thanks for your question in the Discussion Community and I saw you've submitted and received the answer from our support team regarding this question. Posting here for others to see if applicable!

    "Our API directly won't allow you to query visitors by anything other than the Visitor ID so if you don't have the ID when making the request, you'll need to find the ID in an alternative manner.  Our v1 API for visitors also does not support search querying either.

    One thing you can do with Pendo to help pull this information is to create a Visitor Report in Pendo's UI and then pull that report via the API through the endpoint documented here:  https://help.pendo.io/resources/support-library/api/index.html?bash#report.  With this report, you can add a column for visitor ID and Email so you can grab a JSON output and be able to find and pull the visitor ID programmatically from there.

    A limitation with this though is that reports are time-bound so you may not be able to build a report to pull in all visitors in your subscription and our API has a 5-minute timeout so if your report is too large it could likely timeout creating an issue in the process. When calling the report via API, Pendo will automatically refresh the report similar to opening the report in the UI. "

    1
    Comment actions Permalink
  • Avatar
    Uttamraj Rangapur

    Hi Paarth,
      I wanted to get an accountId from another agent field.
    I used the aggregration API and used filter operation to get the account id in the response body.

    I then used the account id in the get account details API to get the entire account object.
    Hope it helps.

    curl --location --request POST 'https://app.pendo.io/api/v1/aggregation' \
    --header 'X-Pendo-Integration-Key: <some key>' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "response": {
    "mimeType": "application/json"
    },
    "request": {
    "name": "accounts-today",
    "pipeline": [
    {
    "source": {
    "accounts": null
    }
    },
    {
    "filter": "metadata.agent.<some_field> != null && metadata.agent.<some_field> == \"<some_string>\""
    },
    {
    "cat": null
    }
    ],
    "requestId": "accounts-today"
    }
    }'
    0
    Comment actions Permalink

Please sign in to leave a comment.