Features - Connectors Framework - Inbound REST API - Users
List Users
Overview
Retrieve User List of the client
URL Format
https://{domain}.mobiwork.com/api/rest/{clientId}/{versionNumber}/user/list.html?token=XXXXXXXX&userId={userId}
Arguments
clientId
required
MobiWork assigned unique ID of the company
versionNumber
required
Version number of MobiWork API SDK release. Current version is: 10.0.78
token
required
Part of URL as a request parameter and is required in every call to verify access to API calls
userId
optional
If provided, this User ID will be taken as a logged in user. If not provided we use an active global administrator ID
Filter or Search Criteria
loginId By loginId
name By username
phoneNumber By phone number
email By email of the user
statusType By status of user (ACTIVE, DISABLED)
geoAddress By address of the user
radius If address is specified and radius is area of address
reportsTo By name of supervisor
Return
Returns a list of User Object(s) if valid arguments and search criteria are provided. If no search criteria is provided the list of a maximum 200 users will be returned. Returns an error if not a valid request
Request Body XSD
Response Body XSD
Curl Example
HTTP Method: POST
Request: curl -k -X POST -H "https://www.mobiwork.com/api/rest/12014/10.0.78/user/list.html?token=COJL8X2FKSLMMRTYCH2B" --header 'content-type: application/xml' --data '<request><productType>PRODUCT</productType></request>'
OR to get limited list
curl -k -X POST -H "https://www.mobiwork.com/api/rest/12014/10.0.78/user/list.html?token=COJL8X2FKSLMMRTYCH2B" --header 'content-type: application/xml' --data '<request><startPosition>0</startPosition><maxResults>10</maxResults></request>'
Response: <response version="10.0.78" statusCode="1">
<userList>
<totalAvailableCount>80</totalAvailableCount>
<count>80</count>
<user>
<mobiworkUserId>2975</mobiworkUserId>
<externalId>null</externalId>
<email>jsmith@mobiwork.com</email>
<loginId>jsmith</loginId>
<firstName>John</firstName>
<lastName>Smith</lastName>
<phoneNumber>5619015197</phoneNumber>
<altPhoneNumber>5619218621</altPhoneNumber>
<faxNumber></faxNumber>
<status>DISABLED</status>
<jobTitle>null</jobTitle>
<reportsToName></reportsToName>
<userRole>ROLE_CLIENT_ADMIN</userRole>
<address>
<addressId>96198</addressId>
<address1>160 Congress Park Dr.</address1>
<address2></address2>
<city>Delray Beach</city>
<state>Florida</state>
<zipCode>33445</zipCode>
<countryId>1</countryId>
<latitude>26.458049</latitude>
<longitude>-80.094237</longitude>
<name></name>
<baseDistance>9022424</baseDistance>
</address>
<customFields>
<customField>
<fieldType>6</fieldType>
<apiName>EmployeeLevel</apiName>
<value></value>
<name>Employee Level</name>
</customField>
</customFields>
</user>
<user>
<mobiworkUserId>2015</mobiworkUserId>
<externalId>null</externalId>
<email></email>
<loginId>amynette</loginId>
<firstName>Amanda</firstName>
<lastName>Mynette</lastName>
<phoneNumber>832-279-7252</phoneNumber>
<altPhoneNumber></altPhoneNumber>
<faxNumber></faxNumber>
<status>DISABLED</status>
<jobTitle>null</jobTitle>
<reportsToName></reportsToName>
<userRole>ROLE_USER</userRole>
<address>
<addressId>34115</addressId>
<address1>18800 NE 29th Ave, Apt.319</address1>
<address2></address2>
<city>Aventura</city>
<state>Florida</state>
<zipCode>33180</zipCode>
<countryId>1</countryId>
<latitude>25.949272</latitude>
<longitude>-80.143085</longitude>
<name></name>
<baseDistance>9022944</baseDistance>
</address>
<customFields>
<customField>
<fieldType>6</fieldType>
<apiName>EmployeeLevel</apiName>
<value></value>
<name>Employee Level</name>
</customField>
</customFields>
</user>