Legacy Dev Forum Posts

 View Only

Sign Up

Retrieving Deleted User List

  • 1.  Retrieving Deleted User List

    Posted 06-05-2025 18:11

    meet.arun07 | 2017-03-30 12:51:56 UTC | #1

    I have used the following API: /api/v2/users/search, in Postman, with the following body request,

    {"pageSize":25,"pageNumber":1,"types":["users"],"query":[{"type":"EXACT","fields":["state"],"value":"deleted"}],"sortOrder":"ASC","sortBy":"name","expand":["authorization"]}

    I got 200 Success ok, am getting the info as,

    "total": 102, "pageCount": 5, "pageSize": 25, "pageNumber": 1, "currentPage":".........", "nextPage": "..........." "types": ["users"], "resulsts":[]

    results are empty. But when i checked in purecloud, there are some users who will come under deleted list. Kindly let me know, what am doing wrong here?


    tim.smith | 2017-03-31 14:40:40 UTC | #2

    It's not currently possible to retrieve deleted users. I've created SRCH-1294 to track this request.


    tim.smith | 2017-03-31 17:41:22 UTC | #3

    I was just made aware of a workaround. You can use POST /api/v2/search with the request body below to return deleted users. Using "returnFields":["ALL_FIELDS"] should only be used during development to determine what fields are available to get. For actual use, this array should be populated with only the field names you want.

    {
    	"types": ["users"],
    	"query": [{
    		"type": "EXACT",
    		"fields": ["state"],
    		"values": ["deleted"]
    	}],
    	"returnFields":["ALL_FIELDS"]
    }

    system | 2017-08-28 19:33:30 UTC | #4


    This post was migrated from the old Developer Forum.

    ref: 1125