Overview

Wrapper Service is a proxy service that allows the applications to continue using User Service 2.0 API contract, and Profile Service 1.0 API contract to communicate to User Service 2.1 and Profile Service 2.1 and PingDir backend 2.1.

At the time when User Service 2.1, Profile Service 2.1, and PingDir 2.1 backend are in production, the applications will be automatically re-routed to the Wrapper Service as refered to "soft" upgrade.

The "soft" upgrade does not require any change on the application side, while the "hard" upgrade in the future would require necessay changes from the applications to be compatible with User Service 2.1 and Profile Service 2.1 API contracts, in replacement of the Wrapper Service which will be end of life.

Environments

Wrapper Service is available in the following environments.

Environment URL Postman

INT

https://clauth-user-service-pingdir-aotf-int.corelogic.com

https://clauth-user-service-pingdir-clgx-int.corelogic.com

https://clp-profile-service-int.corelogic.com

UAT

https://clauth-user-service-pingdir-aotf-uat.corelogic.com

https://clauth-user-service-pingdir-clgx-uat.corelogic.com

https://clp-profile-service-uat.corelogic.com

PROD

TBD

TBD

To Run in Postman with Chrome:

  1. If you would like to run Postman with the Chrome extension, please install the extension first.

  2. Go to Manage Environments > Wrapper Service INT Run in Postman and supply the correct values for the Client ID and Client Secret.

HTTP verbs

Wrapper Service tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.

Verb Usage

GET

Used to retrieve a resource.

POST

Used to create a new resource.

PATCH

Used to update an existing resource, including partial updates.

HTTP status codes

Wrapper Service tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.

Status code Usage

200 OK

The request completed successfully.

400 Bad Request

The request was malformed. The response body will include an error providing further information.

401 Unauthorized

The request is unauthorized. The response body will include an error providing further information.

403 Forbidden

The request is forbidden. The response body will include an error providing further information.

404 Not Found

The requested resource did not exist.

422 Unprocessable Entity

The request was invalid. The response body will include a list of errors providing further information.

500 Internal Server Error

An error occurred while processing the request. The response body will include an error providing further information.

Resources

Requesting Credentials

Wrapper Service uses an implementation of OAuth2 to authenticate each incoming request.

Refer to Services and Authentication in Confluence for additional information on authentication and Apigee.

If you already have credentials, then request that your client_id allows for client_credentials grant type and that the resource clauth-wrapper-service and the scope clauth-wrapper-service.application be added to your client_id, and if you want to preform delete operation you should have admin scope clauth-wrapper-service.admin

Access Token

Tip
All CLP Service resource endpoints are secured. In order to access these endpoints, you will need to have a valid Authorization Bearer token in the headers. You can read more about requesting a Bearer token here

Wrapper Service API Contracts

Wrapper Service API is the aggregate of User Service 2.0 APIs and Profile Service 1.0 APIs, includes {User}, {Organization}, {Identity Provider}, {Profile}, {Search/Autocomplete} as follow

User

The User resource is used to get, create, or update users.

Get User By Id

A GET request will get a User by their Id.

Parameters structure

Table 1. /organizations/{organizationId}/users/{userId}
Parameter Description

organizationId

The organization’s id

userId

The user’s id

Response structure

Path Type Description

id

Number

The id for this user

firstName

String

The first name of this user

lastName

String

The last name of this user

username

String

The username for this user

emailAddress

String

The email address for this user

enabled

Boolean

The enabled status for this user

identityProvider

String

The identity provider for this user

applicationCode

String

The application code for this user

phoneNumber

String

The phone number for this user

createdDate

Number

The date the user was created

passwordLastModified

Null

The date and time the user’s password was last changed in unix epoch time

Example request

$ curl 'http://localhost:8080/organizations/7008458500182019771/users/305706714' -i -X GET \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 344

{
  "id" : 305706714,
  "emailAddress" : "Jada478325899@smith.com",
  "enabled" : true,
  "firstName" : "user A1",
  "lastName" : "Smith",
  "username" : "testSuperAdmin-778308319",
  "phoneNumber" : "+1 310-333-3333",
  "createdDate" : 1689207399,
  "identityProvider" : "CLAUTH",
  "applicationCode" : "CLP",
  "passwordLastModified" : null
}

Get User By Login

A GET request will get a User by their username or email address.

Parameters structure

Table 2. /organizations/{organizationId}/users/search
Parameter Description

organizationId

The organization’s id

Table 3. Field to get user by login
Parameter Description

login

The username or email address of this user (Required)

Response structure

Path Type Description

id

Number

The id for this user

firstName

String

The first name of this user

lastName

String

The last name of this user

username

String

The username for this user

emailAddress

String

The email address for this user

enabled

Boolean

The enabled status for this user

phoneNumber

String

The phone number for this user

createdDate

Number

The date and time the user was created in unix epoch time format

identityProvider

String

The identity provider for this user

passwordLastModified

Null

The date and time the user’s password was last changed in unix epoch time

applicationCode

String

The application code for this user

Example request

$ curl 'http://localhost:8080/organizations/7008458500182019771/users/search?login=testSuperAdmin-615358770' -i -X GET \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 345

{
  "id" : 1083167564,
  "emailAddress" : "Jada388688827@smith.com",
  "enabled" : true,
  "firstName" : "user A1",
  "lastName" : "Smith",
  "username" : "testSuperAdmin-615358770",
  "phoneNumber" : "+1 310-333-3333",
  "createdDate" : 1689207399,
  "identityProvider" : "CLAUTH",
  "applicationCode" : "CLP",
  "passwordLastModified" : null
}

Get Users

A GET request will get all Users for an Organization. For the AOTF App, results are limited to 5 entries. Requires clauth-user-service-pingdir.audit scope to be added to your Client and User in UAA to be able to use the endpoint.

Parameters structure

Table 4. /organizations/{organizationId}/users
Parameter Description

organizationId

The organization’s id

Table 5. Fields for get users
Parameter Description

applicationCode

The applicationCode the users are a part of (Optional)

Response structure

Path Type Description

users[].id

Number

The id for a user

users[].firstName

String

The first name of a user

users[].lastName

String

The last name of a user

users[].username

String

The username for a user

users[].emailAddress

String

The email address for a user

users[].enabled

Boolean

The enabled status for a user

users[].identityProvider

String

The identity provider for a user

users[].phoneNumber

String

The phone number for a user

users[].createdDate

Number

The date and time a user was created in unix epoch time format

users[].passwordLastModified

Null

The date and time a user’s password was last changed in unix epoch time format

users[].applicationCode

String

The application code for a user

Example request

$ curl 'http://localhost:8080/organizations/7008458500182019771/users?applicationCode=clp576' -i -X GET \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 767

{
  "users" : [ {
    "id" : 1182429934,
    "emailAddress" : "Jada1502805240@smith.com",
    "enabled" : true,
    "firstName" : "user A1",
    "lastName" : "Smith",
    "username" : "testSuperAdmin1905862846",
    "phoneNumber" : "+1 310-333-3333",
    "createdDate" : 1689207407,
    "identityProvider" : "CLAUTH",
    "applicationCode" : "CLP576",
    "passwordLastModified" : null
  }, {
    "id" : 257611442,
    "emailAddress" : "Jada1994488902@smith.com",
    "enabled" : true,
    "firstName" : "user A1",
    "lastName" : "Smith",
    "username" : "testSuperAdmin1885401901",
    "phoneNumber" : "+1 310-333-3333",
    "createdDate" : 1689207407,
    "identityProvider" : "CLAUTH",
    "applicationCode" : "CLP576",
    "passwordLastModified" : null
  } ]
}

Create User

A POST request will create a User.

Parameters structure

Table 6. /organizations/{organizationId}/users
Parameter Description

organizationId

The organization’s id

Request structure

Table 7. Fields for user creation
Path Type Constraints Description

firstName

String

[Must not be empty]

The first name of this user

lastName

String

[Must not be empty]

The last name of this user

username

String

Must not contain whitespace and maximum of 55 characters

The username for this user

emailAddress

String

Must be well-formed email address

The email address for this user

applicationCode

String

Application code must be between 1 and 100 characters.

The application code for this user

applicationName

String

Optional field

The application name used for this user

identityProvider

String

Optional field

The Identity Provider used for this user. Defaults to CLAUTH

phoneNumber

String

Optional field

The phone number with country code for this user ie. +1 310-333-3333

enabled

Boolean

[Must not be null]

Whether the user is enabled

customCreateUserEmailText

String

Optional field

The custom text that will be used in the Account Creation email body

Response structure

Path Type Description

id

Number

The id for this user

firstName

String

The first name of this user

lastName

String

The last name of this user

username

String

The username for this user

emailAddress

String

The email address for this user

applicationCode

String

The application code for this user

identityProvider

String

The identity provider for this user

phoneNumber

String

The phone number with the country code for this user with ie. +1 310-333-3333

enabled

Boolean

The enabled status for this user

createdDate

Number

The date and time the user was created in unix epoch time format

passwordLastModified

Null

The date and time the user was created in unix epoch time format

Example request

$ curl 'http://localhost:8080/organizations/7008458500182019771/users' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 81eb91ae-5e07-488d-96f2-a8e5a329c6f1' \
    -d '{
  "emailAddress" : "23606435407055email@example.global",
  "enabled" : true,
  "firstName" : "firstName",
  "lastName" : "lastName",
  "username" : "23606435407055username",
  "phoneNumber" : "+1 (310) 333-3333",
  "identityProvider" : "CLGX_USER_SSO",
  "applicationCode" : "CLP",
  "applicationName" : "AppName",
  "customCreateUserEmailText" : "Custom copy for new user email"
}'

Example response

HTTP/1.1 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 366

{
  "id" : 1329518455,
  "emailAddress" : "23606435407055email@example.global",
  "enabled" : true,
  "firstName" : "firstName",
  "lastName" : "lastName",
  "username" : "23606435407055username",
  "phoneNumber" : "+1 310-333-3333",
  "createdDate" : 1689207405,
  "identityProvider" : "CLGX_USER_SSO",
  "applicationCode" : "CLP",
  "passwordLastModified" : null
}

Create User with Password

A POST request will create a User with a password.

Parameters structure

Table 8. /v2/organizations/{organizationId}/users
Parameter Description

organizationId

The organization’s id

Request structure

Table 9. Fields for user creation with a password
Path Type Constraints Description

firstName

String

[]

The first name of this user

lastName

String

[]

The last name of this user

username

String

Must not contain whitespace and maximum of 55 characters

The username for this user

emailAddress

String

Must be well-formed email address

The email address for this user

password

String

Must not be empty

The new user password

confirmPassword

String

Must not be empty

The new user password

identityProvider

String

Optional field

The Identity Provider used for this user. Defaults to CLAUTH

phoneNumber

Null

Optional field

The phone number with country code for this user ie. +1 310-333-3333

identityProvider

String

Optional field

The Identity Provider used for this user. Defaults to CLAUTH

company

String

Optional field

The company

applicationCode

String

Application code must be between 1 and 100 characters.

The application code for this user

enabled

Boolean

[Must not be null]

Whether the user is enabled

customCreateUserEmailText

String

Optional field

The custom text that will be used in the Account Creation email body

Response structure

Path Type Description

id

Number

The id for this user

firstName

String

The first name of this user

lastName

String

The last name of this user

username

String

The username for this user

emailAddress

String

The email address for this user

applicationCode

String

The application code for this user

identityProvider

String

The identity provider for this user

phoneNumber

Null

The phone number with the country code for this user with ie. +1 310-333-3333

enabled

Boolean

The enabled status for this user

createdDate

Number

The date and time the user was created in unix epoch time format

passwordLastModified

Null

The date and time the user was created in unix epoch time format

Example request

$ curl 'http://localhost:8080/v2/organizations/7008458500182019771/users' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 81eb91ae-5e07-488d-96f2-a8e5a329c6f1' \
    -d '{
  "emailAddress" : "23605726778532email_@example.com",
  "enabled" : true,
  "firstName" : "first_name",
  "lastName" : "last_name",
  "username" : "23605726778532user_name",
  "phoneNumber" : null,
  "identityProvider" : "CLAUTH",
  "applicationCode" : "SF23605726778532",
  "company" : "CLPNAME",
  "password" : "KawahiPulusu1$",
  "confirmPassword" : "KawahiPulusu1$",
  "customCreateUserEmailText" : "someCustomEmailText"
}'

Example response

HTTP/1.1 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 360

{
  "id" : 1146408487,
  "emailAddress" : "23605726778532email_@example.com",
  "enabled" : true,
  "firstName" : "first_name",
  "lastName" : "last_name",
  "username" : "23605726778532user_name",
  "phoneNumber" : null,
  "createdDate" : 1689207404,
  "identityProvider" : "CLAUTH",
  "applicationCode" : "SF23605726778532",
  "passwordLastModified" : null
}

Create Users

A POST request will create a batch of Users.

Parameters structure

Unresolved directive in index.adoc - include::/home/jenkins/agent/workspace/apper-Service_feature_common-617/build/generated-snippets/createUsers/path-parameters.adoc[]

Request structure

Unresolved directive in index.adoc - include::/home/jenkins/agent/workspace/apper-Service_feature_common-617/build/generated-snippets/createUsers/request-fields.adoc[]

Response structure

Unresolved directive in index.adoc - include::/home/jenkins/agent/workspace/apper-Service_feature_common-617/build/generated-snippets/createUsers/response-fields.adoc[]

Example request

Unresolved directive in index.adoc - include::/home/jenkins/agent/workspace/apper-Service_feature_common-617/build/generated-snippets/createUsers/curl-request.adoc[]

Example response

Unresolved directive in index.adoc - include::/home/jenkins/agent/workspace/apper-Service_feature_common-617/build/generated-snippets/createUsers/http-response.adoc[]

Update User

A PUT request will update a User.

Parameters structure

Table 10. /organizations/{organizationId}/users/{userId}
Parameter Description

organizationId

The organization’s id

userId

The user’s id

Request structure

Table 11. Fields for user update
Path Type Constraints Description

firstName

String

[Must not be empty]

The first name of this user

lastName

String

[Must not be empty]

The last name of this user

username

String

Must not contain whitespace

The username for this user

emailAddress

String

Must be well-formed email address

The email address for this user

enabled

Boolean

[Must not be null]

Whether the user is enabled

identityProvider

String

Optional

The Identity Provider used for this user. Defaults to CLAUTH

phoneNumber

String

Must be a valid phone number

The phone number for this user

Response structure

Path Type Description

id

Number

The id for this user

firstName

String

The first name of this user

lastName

String

The last name of this user

username

String

The username for this user

emailAddress

String

The email address for this user

enabled

Boolean

The enabled status for this user

enabled

Boolean

The enabled status for this user

identityProvider

String

The identity provider for this user

phoneNumber

String

The phone number for this user

createdDate

Number

The date and time the user was created in unix epoch time

passwordLastModified

Null

The date and time the user’s password was last changed in unix epoch time

applicationCode

String

The date and time the user was created in unix epoch time format

Example request

$ curl 'http://localhost:8080/organizations/7008458500182019771/users/499578476' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7' \
    -d '{
  "emailAddress" : "Jada12259156@smith.com",
  "enabled" : true,
  "firstName" : "John",
  "lastName" : "Picard",
  "username" : "testSuperAdmin904556698",
  "phoneNumber" : "+1 (310)333-3333",
  "identityProvider" : "CLAUTH"
}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 340

{
  "id" : 499578476,
  "emailAddress" : "Jada12259156@smith.com",
  "enabled" : true,
  "firstName" : "John",
  "lastName" : "Picard",
  "username" : "testSuperAdmin904556698",
  "phoneNumber" : "+1 310-333-3333",
  "createdDate" : 1689207398,
  "identityProvider" : "CLAUTH",
  "applicationCode" : "CLP",
  "passwordLastModified" : null
}

Check Password Complexity

A POST which checks a password to see if it meets complexity requirements / policy.

Request structure

Table 12. Fields for checking password complexity
Path Type Constraints Description

token

String

[Must not be empty]

The user token

password

String

[Must be well-formed, Must not be empty]

The new user password

applicationCode

String

Non mandatory field

The user’s application code

Response structure

Path Type Description

lengthCheckValid

Boolean

The length check flag

uppercaseCheckValid

Boolean

The uppercase check flag

lowercaseCheckValid

Boolean

The lowercase check flag

specialCharacterCheckValid

Boolean

The special character check flag

digitCheckValid

Boolean

The digit check flag

excludeWordsCheckValid

Boolean

The excluded words check flag

accountNameCheckValid

Boolean

The account name check flag

passwordHistoryCheckValid

Boolean

The history check flag

message

String

The message

policyCompliant

Boolean

The policy compliant check flag

Example request

$ curl 'http://localhost:8080/users/checkPasswordComplexity' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer 09a51e46-d970-4da6-8ad3-07cd3915dc44' \
    -d '{"token":"52824c06-6f54-472b-af49-84b60659b354","password":"Um1#3U6$","applicationCode":""}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 315

{
  "lengthCheckValid" : true,
  "uppercaseCheckValid" : true,
  "lowercaseCheckValid" : true,
  "digitCheckValid" : true,
  "excludeWordsCheckValid" : true,
  "accountNameCheckValid" : true,
  "passwordHistoryCheckValid" : true,
  "specialCharacterCheckValid" : true,
  "message" : "",
  "policyCompliant" : true
}

Validate Password (Authenticate)

A POST to validate the user’s username and password (authenticate a user).
Intended for use with single sign on authentication mechanisms like PingFederate.

Request structure

Table 13. Fields for password validation
Path Type Constraints Description

username

String

[Must not be empty]

The user’s username

password

String

[Must not be empty]

The user’s password

Response structure

Path Type Description

username

String

The user’s login name

status

String

The result of the login attempt

userId

Number

The user ID

organizationId

Number

The user’s organization ID

Example request

$ curl 'http://localhost:8080/users/validatePassword' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 926fd205-b2eb-4dd3-b8aa-e40d3d7935e8' \
    -d '{
  "username" : "userName-1650186906",
  "password" : "Um123456$$"
}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 134

{
  "username" : "userName-1650186906",
  "status" : "AUTHORIZED",
  "userId" : 1841421058,
  "organizationId" : 7008458500182019771
}

Get Reset Token

A POST request that will get a reset token for the provided user. Requires clauth-user-service-pingdir.password scope to be added to your Client and User in UAA to be able to use the endpoint.

Request structure

Table 14. Fields for requesting a password reset token
Path Type Constraints Description

emailAddress

String

Required field

The user’s email address

applicationCode

Null

Non mandatory field

The user’s application code

Response structure

Path Type Description

error

Boolean

Error status of the request

token

String

The password reset token

identityProvider

String

The user’s identity provider

applicationCode

String

The user’s application code

Example request

$ curl 'http://localhost:8080/getResetToken' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 09a51e46-d970-4da6-8ad3-07cd3915dc44' \
    -d '{
  "emailAddress" : "userName438122838@example.com",
  "applicationCode" : null
}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 135

{
  "error" : false,
  "token" : "3f7e4523-27d9-49cf-a743-fe5e08d92603",
  "identityProvider" : "CLAUTH",
  "applicationCode" : "CLP"
}

Reset Password

A POST request that will set a user’s password. Requires clauth-user-service-pingdir.password scope to be added to your Client and User in UAA to be able to use the endpoint.

Request structure

Table 15. Fields for setting a password
Path Type Constraints Description

token

String

[Must not be empty]

The user token

password

String

[Must be well-formed, Must not be empty]

The new user password

applicationCode

String

Non mandatory field

The user’s application code

Example request

$ curl 'http://localhost:8080/users/setPassword' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer 09a51e46-d970-4da6-8ad3-07cd3915dc44' \
    -d '{"token":"b6c56b2c-dc3c-4ba8-a597-44c440800192","password":"P@ssw0rd1234","applicationCode":""}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 126

{
  "emailAddress" : "userName21177449@example.com",
  "applicationCodes" : [ "CLP" ],
  "passwordLastModified" : 1689207386
}

Update Password

A POST request that will update a user’s password.

Request structure

Table 16. Fields for updating a password
Path Type Constraints Description

login

String

[Must not be empty]

User login

currentPassword

String

[Must not be empty]

Current user password

newPassword

String

[Must not be empty]

New password

Example request

$ curl 'http://localhost:8080/passwords' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer 09a51e46-d970-4da6-8ad3-07cd3915dc44' \
    -d '{"login":"userName-2030804572","currentPassword":"Um123456$$","newPassword":"newP4ssw0rd1$"}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 37

{
  "login" : "userName-2030804572"
}

Get Application Codes

A GET request that will retrieve application codes for a user. For the AOTF App, results are limited to 5 entries.

Parameters structure

Table 17. /organizations/{organizationId}/users/{userId}/applications
Parameter Description

organizationId

The organization’s id

userId

The user’s id

Response structure

Path Type Description

applications[].id

String

The application code id

applications[].applicationCode

String

The application code

Example request

$ curl 'http://localhost:8080/organizations/7008458500182019771/users/1008458500182019771/applications' -i -X GET \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 149

{
  "applications" : [ {
    "id" : "0000000",
    "applicationCode" : "445FOLNEW"
  }, {
    "id" : "0000000",
    "applicationCode" : "CLP"
  } ]
}

Add Application Codes

A POST request that will add application codes for a user to gain access.

Parameters structure

Table 18. /organizations/{organizationId}/users/{userId}/applications
Parameter Description

organizationId

The organization’s id

userId

The user’s id

Request structure

Table 19. Fields for adding application codes
Path Type Constraints Description

applicationCodes

Array

Each appCode must be between 1 and 20 characters, Application code can only have letters, numbers and underscores.

List of application codes to add to user

Example request

$ curl 'http://localhost:8080/organizations/7008458500182019771/users/1008458500182019771/applications' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7' \
    -d '{
  "applicationCodes" : [ "109LOP", "109POL" ]
}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 273

{
  "applications" : [ {
    "id" : "0000000",
    "applicationCode" : "109LOP"
  }, {
    "id" : "0000000",
    "applicationCode" : "109POL"
  }, {
    "id" : "0000000",
    "applicationCode" : "CLP"
  }, {
    "id" : "0000000",
    "applicationCode" : "445FOLNEW"
  } ]
}

Delete Application Code

A DELETE request that will remove an application code for a user to remove access

Parameters structure

Table 20. /organizations/{organizationId}/users/{userId}/applications/{applicationCode}
Parameter Description

organizationId

The organization’s id

userId

The user’s id

applicationCode

The user’s associated application code to remove

Example request

$ curl 'http://localhost:8080/organizations/7008458500182019771/users/1008458500182019771/applications/FOLNEW' -i -X DELETE \
    -H 'Authorization: Bearer 926fd205-b2eb-4dd3-b8aa-e40d3d7935e8'

Example response

HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Organization

The Organization resource is used to create organizations.

Get Organization

A GET request will get an Organization by id.

Parameters structure

Table 21. /organizations/{organizationId}
Parameter Description

organizationId

The organization’s id

Response structure

Path Type Description

id

Number

The id of the organization

name

String

The name of the organization

Example request

$ curl 'http://localhost:8080/organizations/7008458500182019771' -i -X GET \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 66

{
  "id" : 7008458500182019771,
  "name" : "Starfleet1394713553"
}

Get Organizations

A GET request will get all Organizations. For the AOTF App, results are limited to 5 entries.

Request structure

Table 22. Field to get organizations by application code
Parameter Description

applicationCode

The application code to search for (Optional)

Response structure

Path Type Description

organizations[]

Array

An array of organizations

organizations[].id

Number

The id for an organization

organizations[].name

String

The name of an organization

Example request

$ curl 'http://localhost:8080/organizations?applicationCode=CLP' -i -X GET \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 313

{
  "organizations" : [ {
    "id" : 160444257,
    "name" : "test organization name 63"
  }, {
    "id" : 1709751,
    "name" : "Starfleet23598394450466"
  }, {
    "id" : 7008458500182019771,
    "name" : "Starfleet1394713553"
  }, {
    "id" : 1622220221,
    "name" : "TestOrganizationWithoutLegacyID"
  } ]
}

Create Organization

A POST request will create an Organization.

Request structure

Table 23. Field for organization creation
Path Type Constraints Description

name

String

Must not be empty (allows special characters)

The name for this organization

applicationCode

String

Optional. Must be between 1 and 20 characters, Application code can only have letters, numbers and underscores.

The application code associated with this organization

Response structure

Path Type Description

id

Number

The id for this organization

name

String

The name for this organization

applicationCode

String

The application code for this organization

Example request

$ curl 'http://localhost:8080/organizations' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7' \
    -d '{
  "name" : "Starfleet23598394450466",
  "applicationCode" : "CLP"
}'

Example response

HTTP/1.1 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 87

{
  "id" : 1709751,
  "name" : "Starfleet23598394450466",
  "applicationCode" : "CLP"
}

Update Organization

A PUT request will update an Organization’s name. Requires clauth-user-service-pingdir.admin scope to be added to your Client and User in UAA to be able to use the endpoint.

Request structure

Table 24. Field for organization update
Path Type Constraints Description

name

String

Must be unique

The name for this organization

Response structure

Path Type Description

id

Number

The id for this organization

name

String

The updated name for this organization

Example request

$ curl 'http://localhost:8080/organizations/7008458500182019771' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 926fd205-b2eb-4dd3-b8aa-e40d3d7935e8' \
    -d '{
  "name" : "Starfleet1394713553"
}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 66

{
  "id" : 7008458500182019771,
  "name" : "Starfleet1394713553"
}

Identity Provider

Get IDP Information for a User

A GET request will get Identity Provider information for a User by Username or EmailAddress.

Request structure

Table 25. Fields for get identity provider
Parameter Description

userLogin

The user’s username or email address for login

Response structure

Path Type Description

userExists

Boolean

Boolean value indicating whether the user was found

userLogin

String

The user’s username or email address provided by the 'userLogin' query parameter

idpName

String

The name of the user’s Identity Provider

Example request

$ curl 'http://localhost:8080/idps?userLogin=testSuperAdmin214' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 09a51e46-d970-4da6-8ad3-07cd3915dc44'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 86

{
  "userLogin" : "testSuperAdmin214",
  "idpName" : "CLAUTH",
  "userExists" : true
}

Search (Autocomplete)

The search resource is used to search through users and organizations to find them.

A GET request will get users (up to 5) and organizations (up to 5) for a given input and optional AppCode.

Request structure

Table 26. Fields for autocomplete parameters
Parameter Description

input

The searched user’s username or email

applicationCode

The searched user’s application code (Optional)

Response structure

Path Type Description

user_result_set[].id

Number

The id for a user

user_result_set[].firstName

String

The first name of a user

user_result_set[].lastName

String

The last name of a user

user_result_set[].username

String

The username for a user

user_result_set[].emailAddress

String

The email address for a user

user_result_set[].enabled

Boolean

The enabled status for this user

user_result_set[].phoneNumber

Null

The phone number for this user

user_result_set[].organizationId

Number

The organization id this user belongs to

user_result_set[].organizationName

String

The organization name this user belongs to

user_result_set[].createdDate

Number

The date and time the user was created in unix epoch time

user_result_set[].passwordLastModified

Null

The date and time the user’s password was last changed in unix epoch time

user_result_set[].identityProvider

String

The identity provider for this user

user_result_set[].applicationCode

String

The application code for this user

organization_result_set

Array

The organization

Example request

$ curl 'http://localhost:8080/autocomplete?input=smith179&applicationCode=CLP' -i -X GET \
    -H 'Authorization: Bearer 09a51e46-d970-4da6-8ad3-07cd3915dc44'

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 932

{
  "user_result_set" : [ {
    "id" : 307681723,
    "emailAddress" : "Jada407@smith179.com",
    "enabled" : true,
    "firstName" : "user A1",
    "lastName" : "Smith",
    "username" : "testSuperAdmin646",
    "phoneNumber" : null,
    "createdDate" : 1689207384,
    "identityProvider" : "CLAUTH",
    "applicationCode" : "CLP",
    "passwordLastModified" : null,
    "organizationId" : 7008458500182019771,
    "organizationName" : "TestOrganization"
  }, {
    "id" : 292747326,
    "emailAddress" : "Will582@smith179.com",
    "enabled" : true,
    "firstName" : "user A2",
    "lastName" : "Smith",
    "username" : "testPassExp177",
    "phoneNumber" : null,
    "createdDate" : 1689207384,
    "identityProvider" : "CLAUTH",
    "applicationCode" : "CLP",
    "passwordLastModified" : null,
    "organizationId" : 7008458500182019771,
    "organizationName" : "TestOrganization"
  } ],
  "organization_result_set" : [ ]
}

Profile

The Profile resource is used to get, create, or update Profiles.

Create Profile

A POST request will create and return "Profile".

Request Fields

Table 27. Field for profile creation
Path Type Constraints Description

identityProvider

String

The profiles user authenticated method

userName

String

The profiles user name

userId

String

The profile’s user id

customerNumber

String

The profile’s customer/organization id

applicationCode

String

The profile’s application code

metadata

Object

The profile’s metadata

metadata.abcRole

String

The profile’s metadata key value pair

Example request

$ curl 'http://localhost:8080/profiles' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7' \
    -d '{
  "identityProvider" : "CLGX_USER_SSO",
  "userName" : "userName316",
  "userId" : "339277673",
  "customerNumber" : "customerNumber316",
  "applicationCode" : "APP",
  "metadata" : {
    "abcRole" : "abcValue"
  }
}'

Response structure

Path Type Description

id

String

The profile’s id

identityProvider

String

The profile’s user authenticated method

userName

String

The profile’s user name

userId

String

The profile’s user id

customerNumber

String

The profile’s customer/organization id

applicationCode

String

The profile’s application code

metadata

Object

The profile’s metadata

metadata.abcRole

String

The profile’s metadata key value pair

Example response

HTTP/1.1 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 267

{
  "id" : "bafaef34-3aea-4ca9-8559-9b9176e74f27",
  "identityProvider" : "CLGX_USER_SSO",
  "userName" : "userName316",
  "userId" : "339277673",
  "customerNumber" : "customerNumber316",
  "applicationCode" : "APP",
  "metadata" : {
    "abcRole" : "abcValue"
  }
}

Get Profile

A GET request will return "Profile".

Path Parameters

Table 28. /profiles/{profileId}
Parameter Description

profileId

The id of the profile to get

Example request

$ curl 'http://localhost:8080/profiles/e19d452d-e41b-4dcb-ade5-f8ac8f9b711a' -i -X GET \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7'

Response structure

Path Type Description

id

String

The profile’s id

identityProvider

String

The profile’s user authenticated method

userName

String

The profile’s user name

userId

String

The profile’s user id

customerNumber

String

The profile’s customer/organization id

applicationCode

String

The profile’s application code

metadata

Object

The profile’s metadata

metadata.some key

String

The profile’s metadata key value pair

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 279

{
  "id" : "e19d452d-e41b-4dcb-ade5-f8ac8f9b711a",
  "identityProvider" : "CLGX_USER_SSO",
  "userName" : "userName23614075671153",
  "userId" : "509125882",
  "customerNumber" : "some custId",
  "applicationCode" : "APP1234",
  "metadata" : {
    "some key" : "some value"
  }
}

Get Profiles

A GET request will return list of "Profiles" by parameters.

Path Parameters

Table 29. Field for get profiles
Parameter Description

identityProvider

Identity provider of the profile to retrieve (Case Insensitive), optional

applicationCode

Application code of the profile to retrieve (Case Insensitive), optional

Example request

$ curl 'http://localhost:8080/profiles?identityProvider=CLGX_USER_SSO&applicationCode=APP180366494' -i -X GET \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7'

Response structure

Path Type Description

profiles[0].id

String

The profiles id

profiles[0].identityProvider

String

The profiles user authenticated method

profiles[0].userName

String

The profiles user name

profiles[0].userId

String

The profiles user id

profiles[0].customerNumber

String

The profiles customer/organization id

profiles[0].applicationCode

String

The profiles application code

profiles[0].metadata

Object

The profiles metadata

profiles[0].metadata.some key

String

The profiles metadata key value pair

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 327

{
  "profiles" : [ {
    "id" : "a34d62ed-84ef-4fc6-b7ef-3dc5b1e01415",
    "identityProvider" : "CLGX_USER_SSO",
    "userName" : "userName23615729870342",
    "userId" : "163158755",
    "customerNumber" : "some custId",
    "applicationCode" : "APP180366494",
    "metadata" : {
      "some key" : "some value"
    }
  } ]
}

Search Profile

A GET request will find "Profile" by parameters.

Request Parameters

Table 30. Field for search profile
Parameter Description

userName

Username of the profile to retrieve (Case Insensitive)

identityProvider

Identity provider of the profile to retrieve (Case Insensitive)

applicationCode

Application code of the profile to retrieve (Case Insensitive)

Example request

$ curl 'http://localhost:8080/profiles/search?userName=userName23613693913026&identityProvider=CLGX_USER_SSO&applicationCode=APP1234' -i -X GET \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7'

Response structure

Path Type Description

id

String

The profile’s id

identityProvider

String

The profile’s user authenticated method

userName

String

The profile’s user name

userId

String

The profile’s user id

customerNumber

String

The profile’s customer/organization id

applicationCode

String

The profile’s application code

metadata

Object

The profile’s metadata

metadata.some key

String

The profile’s metadata key value pair

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 280

{
  "id" : "142a0603-92cf-4ed4-8eb9-7d47416d7adc",
  "identityProvider" : "CLGX_USER_SSO",
  "userName" : "userName23613693913026",
  "userId" : "1996198859",
  "customerNumber" : "some custId",
  "applicationCode" : "APP1234",
  "metadata" : {
    "some key" : "some value"
  }
}

Update Profile

A PUT request will return "Profile".

Request Fields

Table 31. Field for profile update
Path Type Constraints Description

identityProvider

String

The profile’s user authenticated method

userName

String

The profile’s user name

userId

String

The profile’s user id

customerNumber

String

The profile’s customer/organization id

applicationCode

String

The profile’s application code

metadata

Object

The profile’s metadata

metadata.new key

String

The profile’s metadata key value pair

Example request

$ curl 'http://localhost:8080/profiles/a3a658f0-82a5-4c58-8971-da6229d6c101' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer 9dbb83ec-615b-4859-aa71-5aff15a6d7b7' \
    -d '{
  "identityProvider" : "CLGX_USER_SSO",
  "userName" : "userName276",
  "userId" : "1534356517",
  "customerNumber" : "customerNumber",
  "applicationCode" : "APP12345",
  "metadata" : {
    "new key" : "new value"
  }
}'

Response structure

Path Type Description

id

String

The profile’s id

identityProvider

String

The profile’s user authenticated method

userName

String

The profile’s user name

userId

String

The profile’s user id

customerNumber

String

The profile’s customer/organization id

applicationCode

String

The profile’s application code

metadata

Object

The profile’s metadata

metadata.new key

String

The profile’s metadata key value pair

Example response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 274

{
  "id" : "a3a658f0-82a5-4c58-8971-da6229d6c101",
  "identityProvider" : "CLGX_USER_SSO",
  "userName" : "userName276276",
  "userId" : "1534356517",
  "customerNumber" : "customerNumber",
  "applicationCode" : "APP12345",
  "metadata" : {
    "new key" : "new value"
  }
}

Delete Profile

A DELETE request will return "Profile".

Path Parameters

Table 32. /profiles/{profileId}
Parameter Description

profileId

The id of the profile to delete

Example request

$ curl 'http://localhost:8080/profiles/6e386f1d-af0e-44ae-b9ad-333fe2021451' -i -X DELETE \
    -H 'Authorization: Bearer 926fd205-b2eb-4dd3-b8aa-e40d3d7935e8'

Example response

HTTP/1.1 204 No Content
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY