External Get Users

Note: When updating the WCF connector the configuration file will lose the ExternalUsageAPIKey value

Endpoint URL

[GET] https://[address]:[port]/rest/ExternalGetUsers

Configuration

Configure The API Key In The WCF Config

  1. Find the installation directory for Totalview and navigate to WCF\MobileWeb_*

  2. Open Totalview3WCF.exe.config

  3. Set the value attribute for the ExternalUsageAPIKey to a secure and unique string

    If ExternalUsageAPIKey is not present, you can add it yourself:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    
       ...
    
      <appSettings>
          <add key="ExternalUsageAPIKey" value=""/>
       </appSettings>
    
       ...
    

Calling The Endpoint

There is one optional parameter you need to specify:

Parameters
  • Fields - note this field is optional, when passed it is handled as a CSV separated by ,

Headers
  • x-api-key - This is the API key you specified in Totalview3WCF.exe.config as ExternalUsageAPIKey

Finding The Custom Field Name

  1. Open Totalview Admin

  2. Navigate to the custom fields view

  3. Click on any of the custom fields

    • The Custom Field name is the first field called Name

    ../../_images/finding-customfield-name.png
Note: Only custom fields marked as Visible in client will be usable

Example Calling The Endpoint Via cURL

curl --location --request GET 'https://[address]:[port]/rest/ExternalGetUsers?fields=Deildir' \
--header 'x-api-key: APIKEY' \
--data-raw ''

Example result

{
    "ExternalGetUsersResult": [
        {
            "CustomFields": [
                {
                    "Caption": "Deildir",
                    "UseAsDivision": true,
                    "Values": [
                        "ADMIN"
                    ]
                }
            ],
            "FirstName": "Tina",
            "FullName": "Tina White",
            "LastName": "White",
            "LocalNumber": "+298344000",
            "MobileNumber": "+298344000",
            "UserID": "TW"
        }
    ]
}