Hi,
Is there any way that I can get the Department list using the API?
Hi,
Is there any way that I can get the Department list using the API?
Best answer by athaxton_iiQ
Good Afternoon
I hope you are doing well!
After following up with my Team, my Team let me know that since this API call is not currently available in the API documentation that the call may not be fully supported at this time, but I was able to locate an API call that you may be able to use to return a list of departments for your district. If your district were to make a POST call using the following call below, it should return a list of department values that are added to users. With that said, in the call you may notice {} brackets. For each of these brackets you will want to replace the {} brackets with the information inside the brackets that is specific for your district:
curl --location 'https://{SITE}.incidentiq.com/api/v1.0/filters' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-US,en;q=0.9' \
--header 'client: WebBrowser v1723875687587' \
--header 'content-type: application/json' \
--header 'priority: u=1, i' \
--header 'productid: 88df910c-91aa-e711-80c2-0004ffa00010' \
--header 'siteid: {SITEID}' \
--header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36' \
--data '{"Facets":["department"],"Query":"","ResultsFilter":{"EntityName":"users","ShowAll":false,"ShowDeleted":false}}'
Best Regards,
Drew
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.