Skip to main content

I’m creating a PowerShell script to update device ownership in IncidentIQ. Looking through the the docs, it looks like I will need some guid values for the UserID, SiteID, LocationID, and RoleID. 

Is there any api endpoint that would let me search for users based on username/email to get this information? I tried looking through the docs but all user searches seemed to require the userId field which I don’t have

This is the documentation I am using: https://incidentiq.stoplight.io/docs/v1/607c488c7e218-create-a-asset

POST to yoursite.incidentiq.com/api/v1.0/search/v2

Payload should be... {Query: (email address),Facets: 4,IncludeMatchedItem: false}


With that said, you’ll only get back limited info with that, such as the UserID.

You can then take that UserID and GET from yoursite.incidentiq.com/api/v1.0/users/(userID) to get the remaining info


@CSariaslani 9001480 colonial Thank you for submitting your question to our community! 😄

Thank you @jclark for jumping ahead with a reply. You are the expert! 


Hello,

This method seems to work only some of the time, such as with users that fall under the Admin, Student, and Staff roles, but not for those under the Parent/Guardian or Guest roles.

I get exact results back when I search for a student or staff member by their email address, but I get random information back when I try it with any parent that’s listed under the Parent/Guardian or Guest roles. Below are screenshots of my results via Postman.

Is there a reason why the parent email address would not be showing up with a user ID even though they exist in IncidentIQ? Even if the user doesn’t exist in IncidentIQ, I still get the same results as the API doesn’t throw an error stating that the user doesn’t exist.

For additional information about our IncidentIQ set up in case it helps:

  • I have an iiQ Administrator role so this shouldn’t be an issue related to permissions
  • I am able to search for the user in the Global Search on the front end
  • We allow users with the Staff role to sign into IncidentIQ, but users in the Student and Parent/Guardian roles are not allowed to sign in
Screenshot of Test Demo Teacher via Search
Screenshot of Test Demo Parent via Search

Thank You,

Jessica


Reply