Skip to main content
Omnitracs Knowledge Base

Get Roles

getRoles

This web service returns an array of Role objects in alphabetical order by name for a company.

Role[] getRoles(string companyId) throws WSException

  • companyId: (optional) A string of maximum length 10 that specifies the unique company identifier. If no company is specified, the company of the authorized user will be used.

Returns a null string on exceptions; otherwise returns an array of Role objects.

Authorization Requirements

The credentials supplied with this method call (as specified in the accompanying WS-Security header) must be authorized to the following application(s) and their associated role-based permissions. 

Required Application Licenses
- Remote Integration

Required User Permissions
- None

Customer integrators are authorized to their own company's data only. 

Sample XML Request

Only the SOAP body is shown. To see a sample SOAP Envelope and Header, click here.

<soap:Body>

   <getRoles>

      <companyId>MYCOMPANY</companyId>

   </getRoles>

</soap:Body>

Sample XML Response

<soapenv:Body>

   <p431:getRolesResponse xmlns:p431="http://websvcs.omaswebws">

      <getRolesReturn>

         <Role>

            <description>Administrator</description>

            <name>Admin</name>

         </Role>

         <Role>

            <description>Role for dispatchers at the company</description>

            <name>Dispatcher</name>

         </Role>

         <Role>

            <description>User</description>

            <name>User</name>

         </Role>

      </getRolesReturn>

   </p431:getRolesResponse>

</soapenv:Body>

Exceptions

001 Unknown Error.
003 Company not authorized for integration.
004 User not authorized.
005 Company ID is invalid.

  • Was this article helpful?