Need to identify which users have set their emergency address

I opened a case with support for assistance and they recommended that I post my question here. They provided me with this snippet to obtain which users have their Emergency Address set.

"use the /api/v2/search endpoint and use a REQUIRED_FIELDS search on the field."

I tried using the API Explorer to make this work using this code

{
"types":["users"],
"returnFields":["REQUIRED_FIELDS"],
"pageSize":1
}

Which gives me a list of users, but the total result count is the same as the same for ALL_FIELDS as it is for REQUIRED_FIELDS, and I’m pretty sure not every user has filled out their Emergency Address info. Maybe “users” isn’t the correct resource domain?

Is there anyone that can provide guidance on how to see which users have set their emergency address? We are trying to do an audit of who has this set.

Thanks,
Chad

Hi Chad

I would assume users is the correct domain.

I'm trying to track down an answer at the moment. Please bear with me.

-Charlie

Hi Chad

A colleague pointed out that the search request is wrong. For search, you would want to do something like this:

{
    "types": [
        "users"
    ],
    "query": [
        {
            "type": "REQUIRED_FIELDS",
            "fields": [
                "FIELD_NAME_REQUIRED_INSERT_HERE"
            ]
        }
    ],
    "returnFields": [
        "id"
    ]
}

Hope this helps
Charlie

Thanks Charlie! How do I know what the field name is that holds the emergency contact info? I haven't been able to find a user field that looks right.

Thanks,
Chad

It doesn't look like the info can be found there.

At the moment, I am only able to view/edit my own emergency address info. If you can view/edit others', take a look in your browser's network console to see what requests are being sent when you are performing these operations. This should help you find the right publicly listed endpoint, if it exists. However, it may not since not all profile info is public.

My understanding is that the Emergency Address information is not displayed for other user for privacy reasons, which makes sense. I opened up case 0003297445 to get a list of users that have set their emergency address so that I can reach out to users that have not. They were able to send me a list of User IDs that had set their emergency address, I just don't know how they obtained the list. The case suggested I post in the developer forum for further assistance.

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