Retrieve more than 1000 external contacts using API

I have been trying to retrieve all the external contacts using the API, however I'm getting a "bad request" error saying "number of records returned cannot exceed 1000".

Is there a way around this? I've tried to use "startswith(FirstName, "A")" as the query as a way of breaking it down into multiple calls to get all the users, but this returns 0 results. I'm guessing the syntax is incorrect for the query.

Any help or guidance on this is appreciated.

Have you tried POST /api/v2/externalcontacts/bulk/contacts

Just looked at it, but can't see details of how to form the entity body:
{
"entities": [
{}
]
}

Any ideas what the syntax should look like. I'd like to pull the full external contacts list.

It says that's an optional so I assumed it'd just work.

entities ( array:#/definitions/Entity, optional ):

But I see what you mean, if you try to run it without, ""[Field [body] is not valid: Entity list is missing, empty or is not of the right type]""

It doesn't really make sense that the "bulk" get would require you to individually itemize everything you wanted, since you'd have to be able to retrieve them all in the first place to ask for them.

Hello,

If you are trying to retrieve all of your existing external contacts, you can use the Scan endpoint (GET https://api.mypurecloud.com/api/v2/externalcontacts/scan/contacts).
You can retrieve at max 200 contacts per page, but you are not limited to 1000 (across pages).

See here for some info on the Scan endpoint

Regards,

Thank you. That made it work.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.