Page tree
Skip to end of metadata
Go to start of metadata

The purpose of this module is to show you how to use the CustomerID REST API to do basic query functions for integration to external services.

  • CustomerID installed

Overview of this lab

We will use CustomerID REST API interface to query organisation and user information.

Refer to the API reference documentation at APIs - CustomerID .

There are several versions of CustomerID REST API. Note that each version adds functionality and does not replace the older ones. So you can use operations of all REST API versions when appropriate.

Preliminary tasks

For this lab, we first temporarily set a simple REST API password. Add following to and then restart Wildfly:

# REST API credentials
rest.username = restuser
rest.password = restpass

In this lab we specify the API credential in query parameters. In production environments we recommend using HTTP Basic Auth to avoid credentials written in log files.

List users

This operation shows all users IDs of CustomerID, for example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Users xmlns="" inResponseTo="/2.1/users/" method="GET">

Query user info

Pick one user ID from the output of previous step, such as 6225612a-02c4-4f5c-b875-bbb23379a6f2, and use it in the query user command below:

The individual user information will be shown:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<User xmlns="" inResponseTo="/2.1/users/6225612a-02c4-4f5c-b875-bbb23379a6f2" method="GET" type="user">
<Attribute name="id">
<Attribute name="firstname">
<Attribute name="surname">
<Attribute name="cn">
<Attribute name="login">
<Attribute name="email">
<Attribute name="organization">
<Attribute name="status">

Query user by email address

Query users by role membership

List organisations

Additional exercise

Use Postman and POST calls to create a new user to "Users" organisation

REST API 1.0 - CustomerID#CustomerID-MOD009CreateUser


Use email address as both uid and email parameters.

In Postman settings, set SSL certificate verification OFF.

  • No labels