Mmadu Registration Service Reference

1. Overview

Mmadu Registration Service is an independent service for managing user flows.

For now, only user registration flow is supported.

It exposes the following resources for handling dynamic generation of registration forms:

  1. Domain Registration Profile - Handles registration service configuration for the domain

  2. Field Types - Global field types supported by the registration service

  3. Field - Domain Fields supported by a domain

2. Features

Currently, mmadu user service provides the following:

  1. Resource Management - Management of registration profiles, fields, and field types.

  2. Registration - Provides a dynamic registration form to register users.

3. Default Configuration

3.1. Default Port

Mmadu Registration Service listens to port 15552 by default and this can be configured using the SERVER_PORT environment variable or the server.port SpringBoot property.

4. Setting Up A Domain

A domain can be initialized for handling user registration by making a POST /domains call with the required fields and profile configuration needed to form your registration page.

Authority: domain_flow.initialize

This api is only used for initial domain setup.

4.1. Domain Setup Request Fields

Path Type Description

fieldTypes

Array

Field Type List

domains.[].domainId

String

Domain ID to be configured

domains.[].registrationProfiles

Array

Registration proiles

domains.[].fields

Array

List of fields in registration form

This api first creates the field types, and then the domain registration profile and fields. Any field type or domain that exists previously will be ignored.

4.2. Domain Setup Response

The api responds with a HTTP 201 CREATED response.

5. User Registration

The registration service provides an api to access the registration page for a domain. The registration service generates a form from the configured fields and field types of a domain.

5.1. Displaying the registration form

The registration form can be accessed in the browser using the url:

http://[registration-host]:[registration-port]/[domain-id]/register/[registration-profile-code]

For example, accessing the default domain with the default configuration can be done by entering the url below on your browser.

http://localhost:15552/0/register/user

The registration services redirects to the defaultRedirectionUrl specified in the registration profile for this domain. To specify a url to redirect to, add the redirectUrl parameter. Here we are using a registration profile with code user.

http://localhost:1552/0/register/user?redirectUrl=http://myapp.com

6. Customizing Registration Forms

Registration forms for a domain can be customized by adding and removing fields and field types. The registration service ensures that form fields are created for each field.

7. Domain Flow Configurations

Each domain has a Domain Flow Configuration object that is used for configuring the applications behaviour during registration.

7.1. Creating a Domain Flow Configuration

A POST /repo/domainFlowConfigurations Request will create a Domain Flow Configuration.

Authority: flow_config.create

7.1.1. Create Domain Flow Configuration Request Body

Path Type Description

id

string

Domain Flow Configuration ID

domainId

string

Domain Id

7.1.2. Sample Create Domain Flow Configuration Request

POST /repo/domainFlowConfigurations HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMjYsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLmZsb3dfY29uZmlnLmNyZWF0ZSIsImV4cCI6MTU5NDQ0OTMzMSwiaWF0IjoxNTk0NDQ5MzI2LCJqdGkiOiJmNWJmNzVhNi0wNGEwLTQyZjctYTFlMC01ODNlMjljZGU4NmMifQ.UJPyN0X93F3FQ3ZmSvFOZcJDoWQ1RFUjeD1Xn2E2WBM5NRq38omOd8SFRtoOyOBu6Je6L34Xzje90mPm7dfDRdqEPCknvQNjOU91vxv1FrrSLNHvSF_v8my5tyzidAmsGAZsJpxXW9Zz3Pc1vYlqBpXA3u5sNfZHxYf25EOvWIHp_H_hz12-VztUJ7xOLLL9Wn1vSzYYFOtuvkTi7H5S6d90cT2bkVUCISYxkKspeay5pmTxMbu1AElEaBIHU5uQ_SBCifuAOqx5GvQcRxjlw7X99RIa0XZdSfGFRNPbFHgApy-jrFRBQIPZVGWsVtztYOC8wAspn-AIrHTA5UGYmg
Content-Length: 42
Host: localhost:8080

{
  "id" : "1",
  "domainId" : "1234"
}

7.1.3. Create Domain Flow Configuration Response

This API returns a HTTP 201 CREATED response with an empty body.

7.2. Retrieving a Domain Flow Configuration

A GET Request will return a Domain Flow Configuration with its ID

Authority: flow_config.read

7.2.1. Domain Flow Configuration Retrieval Path Parameter

Table 1. /repo/domainFlowConfigurations/{domainFlowConfigurationId}
Parameter Description

domainFlowConfigurationId

The Domain Flow Configuration ID

7.2.2. Sample Domain Flow Configuration Retrieval Request

GET /repo/domainFlowConfigurations/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMjYsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLmZsb3dfY29uZmlnLnJlYWQiLCJleHAiOjE1OTQ0NDkzMzEsImlhdCI6MTU5NDQ0OTMyNiwianRpIjoiZjViZjc1YTYtMDRhMC00MmY3LWExZTAtNTgzZTI5Y2RlODZjIn0.AHBnDpYHUiqHE048ZHQ9zzOJQWgWbK3aT37dJPH2ASQKk0fBA-Sgm5E6Sf3nrzvT_KhAH4B9bx-SgIyltBKWzQz0g-fcgdO0HSw2lBnfodscv_gi-HNG0cF5eHO8aiB-D1l86PrWHDOJZqCJJJ-T11mizsPRdA3tV9sRp5R7dxaDsAuAGJgrtH9v-Tq9O2gadbZYRF1_CH1AQI7bR3ZL_y2jI_zRY8YQzRxoFmDLnDy8PcwI4VrbAUoN5iRj6KUt71qTyCTeEsHIvg0HCPBkKw2pC5y4hFubqtqDuaWZWhAQyzK2yf8tsaj_f9U54J-1lu9U3iuLNEoK_D0PfKt8Dw
Host: localhost:8080

7.2.3. Domain Flow Configuration Retrieval Response

This API returns the Domain Flow Configuration with the following fields:

Path Type Description

id

string

Domain Flow Configuration ID

domainId

string

Domain Id

7.2.4. Sample Domain Flow Configuration Retrieval Response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+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: 259

{
  "domainId" : "1234",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/repo/domainFlowConfigurations/1"
    },
    "domainFlowConfiguration" : {
      "href" : "http://localhost:8080/repo/domainFlowConfigurations/1"
    }
  }
}

7.3. Updating Domain Flow Configuration by ID

A PATCH /repo/domainFlowConfigurations/{domainFlowConfigurationId} Request will update a Domain Flow Configuration. The example below updates the defaultRegistrationUrl property.

Authority: flow_config.update

7.3.1. Domain Flow Configuration Update Request Path Parameter

Table 2. /repo/domainFlowConfigurations/{domainFlowConfigurationId}
Parameter Description

domainFlowConfigurationId

The Domain Flow Configuration ID

7.3.2. Sample Domain Flow Configuration Update Request

PATCH /repo/domainFlowConfigurations/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMjUsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLmZsb3dfY29uZmlnLnVwZGF0ZSIsImV4cCI6MTU5NDQ0OTMzMCwiaWF0IjoxNTk0NDQ5MzI1LCJqdGkiOiJmNWJmNzVhNi0wNGEwLTQyZjctYTFlMC01ODNlMjljZGU4NmMifQ.ZWRjJfAsUsjpRM6nBEwdNIJrdNkO6xw_cvz3PQ3vFjhOvMFUkMKMiERXcgInbNWvEljTCZnVA4h2RGQdZ3vwrWkMt1C4EdXZXeYneT98XSUNvPPeocsqafILj1DiJ5fNQVvJkDeY6CknkVJug0RGaZjOuHYciW5qAheS_kn48uvg6JZ2zf2riFMtossc_M5dvmmJ_-hwwJaWgXz-UDbitkrPm53XyEaTlQfnnPMJWDuS6Z5hXgMWLgxJU5tTaeGFA5dngeR1vd7FQIMwqea1IveXjadr1HINuHITPeQpUDEP73_axPG9KLkgJHbBF3Euim_cURLTfHHaScuGLq83XA
Content-Length: 23
Host: localhost:8080

{"domainId":"my-app-2"}

7.3.3. Domain Flow Configuration Update Response

This API returns a HTTP 204 NO CONTENT response.

7.3.4. Sample Domain Flow Configuration Update Response

Authority: flow_config.update

HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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

7.4. Deleting a Domain Flow Configuration by ID

A DELETE /repo/domainFlowConfigurations/{domainFlowConfigurationID} request will delete a Domain Flow Configuration.

Authority: flow_config.delete

7.4.1. Domain Flow Configuration Delete Request Path

Table 3. /repo/domainFlowConfigurations/{domainFlowConfigurationId}
Parameter Description

domainFlowConfigurationId

The Domain Flow Configuration ID

7.4.2. Sample Domain Flow Configuration Delete Request

DELETE /repo/domainFlowConfigurations/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMjYsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLmZsb3dfY29uZmlnLmRlbGV0ZSIsImV4cCI6MTU5NDQ0OTMzMSwiaWF0IjoxNTk0NDQ5MzI2LCJqdGkiOiJmNWJmNzVhNi0wNGEwLTQyZjctYTFlMC01ODNlMjljZGU4NmMifQ.XC6rPooMlYNKjpk4cjWS0wuh0edf_IqcH6twWyN9BgIycT2Fh2LnhYsGsPVmFtdfo0j8kohLmmQ9dcQzClvqDpFpy71gBKjvxowXyry5xvnVhiA-LAJKpP6c29uBQrFyNAPLIp4r1zuHYuZVkFQ0LrTMj_4x6acxUXkKrxR7k4XFd9zBO_Vn6KzpGtxNhnKilT1HQJg49v-vxUUH5ph5YcZH1YUYy-V1oLk8CmtH8SREmSiRuRbAitH88Wce8SuMD7o4lxJok3iDiZfmFOfb5a9yeeoIsQ3QExg3VUQo_CdKGz3CN7AIXBjb3vvArdOwDSOXrxCygW2lzivwUJdLqQ
Host: localhost:8080

7.4.3. Domain Flow Configuration Delete Response

This API returns a HTTP 204 NO CONTENT response.

7.4.4. Sample Domain Flow Configuration Delete Response

HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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

8. Registration Profiles

Each domain has a registration profile object that is used for configuring the applications behaviour during registration.

8.1. Creating a Registration Profile

A POST /repo/registrationProfiles Request will create a registration profile.

Authority: reg_profile.create

8.1.1. Create Registration Profile Request Body

Path Type Description

id

string

Registration profile ID (auto generated if absent)

domainId

String

domain ID

defaultRoles

Array

Roles assigned to newly registered users

defaultAuthorities

Array

Authorities assigned to newly registered users

defaultGroups

Array

Groups assigned to newly registered users

code

String

Registration Profile code, used in the registration url

fields

Array

Field codes of domain fields to display in this form

defaultRedirectUrl

String

Url to redirect to after registration success

headerOne

String

Main registration page title - h1

headerTwo

String

Secondary registration page title - h2

headerThree

String

Tertiary registration page title - h3

instruction

String

Instruction message for registering users displayed at the top of the form

submitButtonTitle

String

Submit button text

8.1.2. Sample Create Registration Profile Request

POST /repo/registrationProfiles HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMjcsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuMC5yZWdfcHJvZmlsZS5jcmVhdGUiLCJleHAiOjE1OTQ0NDkzMzIsImlhdCI6MTU5NDQ0OTMyNywianRpIjoiZjViZjc1YTYtMDRhMC00MmY3LWExZTAtNTgzZTI5Y2RlODZjIn0.Y44_2HBFI-8S71_PJKVJoVObt4I1z-RGs1iLL2L4Zq3SaDn1T1xaK1FS1caGvEHb4YZCzlUpl6yTULAe1GqJyLGG7B5VarCFf8ifIyVs6mqtBS3JFE-wPlT15mFqpIIjH8S1Gyl1RAUrQfgB3WYEfYEnjVuhvLqN0rlkaa0k0FI0A9alHYtU3pHFHe2V2faMf6BA-sUoEW6jLPOr4eBlUuVlNLCOrKypwvuDjCv8tEQ95AAbN6F5-Q3RJ4Jn-CVygm5LtgAq-QE35h-LCPPivjiKkeUD1XlCKUeR6uMtxOdlDzNajELt5IV77xqYuB762PLpTD1DMqFaLg2CGRw6pg
Content-Length: 482
Host: localhost:8080

{
  "id" : "1",
  "code" : "user",
  "domainId" : "0",
  "defaultRedirectUrl" : "http://my.app.com/home",
  "defaultRoles" : [ "member" ],
  "defaultAuthorities" : [ "view-list" ],
  "defaultGroups" : [ "admins" ],
  "fields" : [ "field.username", "field.email", "field.password" ],
  "headerOne" : "My App",
  "headerTwo" : "Register",
  "headerThree" : "Fill all required fields",
  "instruction" : "Ensure that all fields are filled",
  "submitButtonTitle" : "Go"
}

8.1.3. Create Registration Profile Response

This API returns a HTTP 201 CREATED response with an empty body.

8.2. Retrieving a Registration Profile

A GET Request will return a registration profile with its ID

Authority: reg_profile.read

8.2.1. Registration Profile Retrieval Path Parameter

Table 4. /repo/registrationProfiles/{profileId}
Parameter Description

profileId

The registration profile ID

8.2.2. Sample Registration Profile Retrieval Request

GET /repo/registrationProfiles/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMjgsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLnJlZ19wcm9maWxlLnJlYWQiLCJleHAiOjE1OTQ0NDkzMzMsImlhdCI6MTU5NDQ0OTMyOCwianRpIjoiZjViZjc1YTYtMDRhMC00MmY3LWExZTAtNTgzZTI5Y2RlODZjIn0.TheT13RmHrAJObkx3BRHK6ramqfgU26c3AxZnK0bFuZ7Jx2xdbYCYaMXxQQhrcblfEyt8LxdZDh_eC7tWc0ur7bTJCax82e0FpGrz7TXMmXFnWeUZNxkJnPoOHy4OtF6DBBTjOW91C5--n1zoIRJUYYvfB82Txn_hGKu-eFmhPzDZ8P3bF-OfH_5n9lBrRcdmtcxSWf4F_cAD2NVPkQN4Jd9hhrs8e22SfEj_LlY29nytbpMr78yUq8QaERA7xIgHIrrbrT8v3p3ecqL0QBOQFmKQ4sXaEwPhMyI2EYgy2jUPaaj3rjIRTJgwW1TZwcRYGSHUCKEbpyHM3ZV4voEPw
Host: localhost:8080

8.2.3. Registration Profile Retrieval Response

This API returns the registration profile with the following fields:

Path Type Description

id

string

Registration profile ID (auto generated if absent)

domainId

String

domain ID

defaultRoles

Array

Roles assigned to newly registered users

defaultAuthorities

Array

Authorities assigned to newly registered users

defaultGroups

Array

Groups assigned to newly registered users

code

String

Registration Profile code, used in the registration url

fields

Array

Field codes of domain fields to display in this form

defaultRedirectUrl

String

Url to redirect to after registration success

headerOne

String

Main registration page title - h1

headerTwo

String

Secondary registration page title - h2

headerThree

String

Tertiary registration page title - h3

instruction

String

Instruction message for registering users displayed at the top of the form

submitButtonTitle

String

Submit button text

8.2.4. Sample Registration Profile Retrieval Response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+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: 687

{
  "code" : "user",
  "domainId" : "0",
  "defaultRedirectUrl" : "http://my.app.com/home",
  "defaultRoles" : [ "member" ],
  "defaultAuthorities" : [ "view-list" ],
  "defaultGroups" : [ "admins" ],
  "fields" : [ "field.username", "field.email", "field.password" ],
  "headerOne" : "My App",
  "headerTwo" : "Register",
  "headerThree" : "Fill all required fields",
  "instruction" : "Ensure that all fields are filled",
  "submitButtonTitle" : "Go",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/repo/registrationProfiles/1"
    },
    "registrationProfile" : {
      "href" : "http://localhost:8080/repo/registrationProfiles/1"
    }
  }
}

8.3. Updating Registration Profile by ID

A PATCH /repo/registrationProfiles/{profileId} Request will update a registration profile. The example below updates the defaultRegistrationUrl property.

Authority: reg_profile.update

8.3.1. Registration Profile Update Request Path Parameter

Table 5. /repo/registrationProfiles/{profileId}
Parameter Description

profileId

The registration profile ID

8.3.2. Sample Registration Profile Update Request

PATCH /repo/registrationProfiles/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMjcsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuMC5yZWdfcHJvZmlsZS51cGRhdGUiLCJleHAiOjE1OTQ0NDkzMzIsImlhdCI6MTU5NDQ0OTMyNywianRpIjoiZjViZjc1YTYtMDRhMC00MmY3LWExZTAtNTgzZTI5Y2RlODZjIn0.DOqx179RRq_E8q7r-a1qljdcDYGSz_gHXS_M9o7vMxHufn-XVRjxhxMolTqUTDX28sRJt4a0S_sbLjTdY0yT-tAMng9hGiY9QJYsANHsEtbZOBq7fg6jU5VXpesUieBp7wWcIWYEjE_Rd9u1eejWJnR-UBqqqJptjwK190H47Jjq_dkRMGk_XTKCfxUV5f2A-QBGC9YCGdoC-bL1joaBJEdH09tfhB6X7_D542YU8qB8OGv_ThcNFcts9vFOqanKD6e3byoZl0Sesd5c1-eDXU2lf3YL2JJKvKwqr6J_22tpALn3VnRW0Fky2G726B9PRc6KLmFqfSYkvOeVUeLeAQ
Content-Length: 48
Host: localhost:8080

{"defaultRedirectUrl":"http://modified.app.com"}

8.3.3. Registration Profile Update Response

This API returns a HTTP 204 NO CONTENT response.

8.3.4. Sample Registration Profile Update Response

Authority: reg_profile.update

HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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

8.4. Deleting a Registration Profile by ID

A DELETE /repo/registrationProfiles/{profileId} request will delete a registration profile.

Deleting a registration profile will remote all fields associated with the profile and a registration page for that domain will be unavailable.

Authority: reg_profile.delete

8.4.1. Registration Profile Delete Request Path

Table 6. /repo/registrationProfiles/{profileId}
Parameter Description

profileId

The registration profile ID

8.4.2. Sample Registration Profile Delete Request

DELETE /repo/registrationProfiles/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMjcsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuMC5yZWdfcHJvZmlsZS5kZWxldGUiLCJleHAiOjE1OTQ0NDkzMzIsImlhdCI6MTU5NDQ0OTMyNywianRpIjoiZjViZjc1YTYtMDRhMC00MmY3LWExZTAtNTgzZTI5Y2RlODZjIn0.KjY4nef9dMn-jgT6SSvuo6s_BpCluwtyfFegTPdrgJNekGlD8GYz27Qbwf_SUeV4gXssNSF_sOtmPOYC3HlhtwmoUK-CGdPK41szG5xFGc6MhToWFbPL1VAR5wd8o0nDyiNyUv2xoIgentmPqOwws7GM_GQ76xlzPdk0x3k7NPgQ-qXeyB-YSAJePlijthSWXMrNzKSIJOEqIVGUkZz-vsrFUFlN_l2Lzfp2_IXpsia5g2lXxCoDxfwLOzs6HJzvEfSGwSzzxw2LsIKkhvwtBM2tTwx3p2OcrgFwBJS5AAOQ5yC0GUPTthSsIeMrWriP1W3ExSsJ4zKeB8xG3PSnXw
Host: localhost:8080

8.4.3. Registration Profile Delete Response

This API returns a HTTP 204 NO CONTENT response.

8.4.4. Sample Registration Profile Delete Response

HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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

9. Managing Field Types

Field type objects specify the properties of a field type in the registration form. You can create a field type that can be used by fields in a registration form. Field types are global and can be used by any domain.

See Defining Markup for fields for more information on how to customize field types.

9.1. Creating a field Type

A POST /repo/fieldTypes request will create a field type

Authority: field_type.create

9.1.1. Field Type Creation Request Body

Path Type Description

id

string

Field Type ID

fieldTypePattern

String

Allowed string pattern for field type

min

String

Minimum value for field type

max

String

Maximum value for field type

style

Null

Style applied to all fields of the type

type

String

Data type of to field type (integer, date, time, datetime, string, decimal)

css

String

css for all fields with this type (can be overriden by field css)

script

String

Script for field

classes

Array

css classes for field

markup

String

HTML markup for field type

name

String

The field type name

enclosingElement

String

The element enclosing the field

9.1.2. Sample Field Type Creation Request

POST /repo/fieldTypes HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMzYsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLmZpZWxkX3R5cGUuY3JlYXRlIiwiZXhwIjoxNTk0NDQ5MzQxLCJpYXQiOjE1OTQ0NDkzMzYsImp0aSI6ImY1YmY3NWE2LTA0YTAtNDJmNy1hMWUwLTU4M2UyOWNkZTg2YyJ9.DOq9POrsoe7A5JP47UjwxupvWWZKDkHbvAN9cVP6ug7zdeQfn3ne112IuJV7BiZCdE6pnxd2AiPrpfLOjEkaX1DfYGeBOCVXTOs0lxVDDpRbC1cuO0HMM30kMurNT6RHkA2qALQZ_tumwP8bAUJygnksKYOOM0iesDEoR7ljhEsFbJVsyORC3oxwpGIBhUD8jngCiaLOxYnDC0Wv8qC1kboUH5mLChwh4o3Gwr851bN9lfV4_oVfeh6YxsSfzlOecbjXfjM8OJTxYv1HOVn3-W2_CYtVuwWUm9M22dvBicD27MqleAcSR8jK5s7qE5cvP4aganEJOMox7tQgbrBmVA
Content-Length: 521
Host: localhost:8080

{
  "id" : "1",
  "name" : "Age",
  "markup" : "<label for='$field.name' class='sr-only'>$field.label</label><input type='number' id='$field.name' name='$field.name' class='form-control' placeholder='$field.placeholder' $maxValue $minValue autofocus $required $inputField $inputStyle $errorStyle >$errorDisplay",
  "fieldTypePattern" : "",
  "type" : "integer",
  "enclosingElement" : "div",
  "classes" : [ "form-control" ],
  "style" : null,
  "script" : "",
  "css" : "",
  "max" : "100",
  "min" : "10"
}

9.1.3. Field Type Creation Response

This API returns a HTTP 201 CREATED response with an empty body.

9.2. Retrieving a Field Type

A `GET /repo/fieldTypes/{fieldTypeId} `request will get a field type with an ID.

Authority: field_type.read

9.2.1. Field Type Retrieval Request Path

Table 7. /repo/fieldTypes/{fieldTypeId}
Parameter Description

fieldTypeId

The field type ID

9.2.2. Sample Field Type Retrieval Request

GET /repo/fieldTypes/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMzYsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLmZpZWxkX3R5cGUucmVhZCIsImV4cCI6MTU5NDQ0OTM0MSwiaWF0IjoxNTk0NDQ5MzM2LCJqdGkiOiJmNWJmNzVhNi0wNGEwLTQyZjctYTFlMC01ODNlMjljZGU4NmMifQ.BTQCKF5TGbnHfm5vcq5mFHUkH7Ia54qM4gZ2wUzwj_gPuOXtZ7NMvZJEuBu7tV2AynBp5a3PnpR2iBB8Apt0bCxtv3UQvReH0AhlpWKsFVk324HHvvkqzikfsscPWRgoOUOV7wYB1RQzpWatBDe_LmNn3eagfqopDrMDrm5-D1k3Dtg20GhcHDKLL0ulYd_jRVcfAOFHXYpD_MEogWsImx9ylST_fgWTv4eG0zjvylwQphlGsfhOuI8XHBtZfFxCxYBaE5-E1XZpJTygxIjIMzMMHDOZ2PJ7pPEwaYVb1NwyL-tIPCz-_kb-gcmLMsrMB7A6VN8G0DF1Yn7wZsgalA
Host: localhost:8080

9.2.3. Field Type Retrieval Response

This API returns a FieldType object with these fields:

Path Type Description

id

string

Field Type ID

fieldTypePattern

String

Allowed string pattern for field type

min

String

Minimum value for field type

max

String

Maximum value for field type

style

Null

Style applied to all fields of the type

type

String

Data type of to field type (integer, date, time, datetime, string, decimal)

css

String

css for all fields with this type (can be overriden by field css)

script

String

Script for field

classes

Array

css classes for field

markup

String

HTML markup for field type

name

String

The field type name

enclosingElement

String

The element enclosing the field

9.2.4. Sample Field Type Retrieval Response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+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: 696

{
  "name" : "Age",
  "markup" : "<label for='$field.name' class='sr-only'>$field.label</label><input type='number' id='$field.name' name='$field.name' class='form-control' placeholder='$field.placeholder' $maxValue $minValue autofocus $required $inputField $inputStyle $errorStyle >$errorDisplay",
  "fieldTypePattern" : "",
  "type" : "integer",
  "enclosingElement" : "div",
  "classes" : [ "form-control" ],
  "style" : null,
  "script" : "",
  "css" : "",
  "max" : "100",
  "min" : "10",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/repo/fieldTypes/1"
    },
    "fieldType" : {
      "href" : "http://localhost:8080/repo/fieldTypes/1"
    }
  }
}

9.3. Getting All Field Types

A GET /repo/fieldTypes request will get all field types.

Authority: field_type.read

9.3.1. Sample All Fields Retrieval Request

GET /repo/fieldTypes HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMzcsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLmZpZWxkX3R5cGUucmVhZCIsImV4cCI6MTU5NDQ0OTM0MiwiaWF0IjoxNTk0NDQ5MzM3LCJqdGkiOiJmNWJmNzVhNi0wNGEwLTQyZjctYTFlMC01ODNlMjljZGU4NmMifQ.ipWurrptkRBNEyzA2l-np2k04Rr-E3QCthKXX9gkz3_LVQUbSRy4KO6Bdj1fRYPmPiup7S0yjJDI4mdpJDBaT_vZE4MlDdkmrjP7MaOj-6aKG-fAoDACzQgyB8VTmXDxQXzhvxw8d_bcGrshlInH_S4ldkVaZhq98JDmbeLIjzbM14B41u6dACPWFpNFe24XhmFItObFYPwsLvs1D8Iq-qHq-SH3KT3ZN5-CsdRozLQZpNgsvpxLxpFeawf9TPlUQI5qypKzDgiS4wa8Hk0Bx8HQjYalJT8hn9p34OJ04DgqbRzlRZuYsqVEviNhrdRUvt6-gKcYeXSo6joNOs4u8Q
Host: localhost:8080

9.3.2. All Fields Retrieval Response

This API returns a list of all field types with these fields:

Path Type Description

_embedded.fieldTypes.[].fieldTypePattern

String

Allowed string pattern for field type

_embedded.fieldTypes.[].min

String

Minimum value for field type

_embedded.fieldTypes.[].max

String

Maximum value for field type

_embedded.fieldTypes.[].type

String

Data type of to field type (integer, date, time, datetime, string, decimal)

_embedded.fieldTypes.[].css

String

css for all fields with this type (can be overriden by field css)

_embedded.fieldTypes.[].script

String

Script for field

_embedded.fieldTypes.[].classes

Array

css classes for field

_embedded.fieldTypes.[].markup

String

HTML markup for field type

_embedded.fieldTypes.[].name

String

The field type name

_embedded.fieldTypes.[].enclosingElement

String

The element enclosing the field

9.3.3. Sample All Fields Retrieval Response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+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: 1126

{
  "_embedded" : {
    "fieldTypes" : [ {
      "name" : "Age",
      "markup" : "<label for='$field.name' class='sr-only'>$field.label</label><input type='number' id='$field.name' name='$field.name' class='form-control' placeholder='$field.placeholder' $maxValue $minValue autofocus $required $inputField $inputStyle $errorStyle >$errorDisplay",
      "fieldTypePattern" : "",
      "type" : "integer",
      "enclosingElement" : "div",
      "classes" : [ "form-control" ],
      "style" : null,
      "script" : "",
      "css" : "",
      "max" : "100",
      "min" : "10",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/repo/fieldTypes/1"
        },
        "fieldType" : {
          "href" : "http://localhost:8080/repo/fieldTypes/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/repo/fieldTypes"
    },
    "profile" : {
      "href" : "http://localhost:8080/repo/profile/fieldTypes"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

9.4. Updating A Field Type

A PATCH request will update a field type

Authority: field_type.update

9.4.1. Field Type Update Request

Table 8. /repo/fieldTypes/{fieldTypeId}
Parameter Description

fieldTypeId

The field type ID

9.4.2. Sample Field Type Update Request

PATCH /repo/fieldTypes/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMzcsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLmZpZWxkX3R5cGUudXBkYXRlIiwiZXhwIjoxNTk0NDQ5MzQyLCJpYXQiOjE1OTQ0NDkzMzcsImp0aSI6ImY1YmY3NWE2LTA0YTAtNDJmNy1hMWUwLTU4M2UyOWNkZTg2YyJ9.JhJvfKlPbUkToiCXcx_nAapAhEZQzDCQ7HCVkljygLIjmAREoBwxBTk3mP8p9LASpKwLEMNtNEfxrz3IzOvxccAUilS_HxUzQBBV9OSjdqpaaE_iDp7XWwUrupXzIpLR2wDoV1eCRqDNg2ZW1B-wlYax5FDYdAESlxqFkm6rRhvuKTBFmQwfJaaqlfq2xwZCqs8b8n2rDXILLIuPXNv1sYvcGaDTOaSSr5V42B5mbpZhscGrSWeNQXOy1ug0c4ED7yWwOXoAhLzVyXP8jqTqIk5qnW5orEp9syl9Td-uO9ffnWf6dre4KtJm4ySo2FssxFpkQBq-zopapfjZxx2WQw
Content-Length: 19
Host: localhost:8080

{"name":"New Type"}

9.4.3. Field Type Update Response

This API returns a HTTP 204 NO CONTENT response.

9.4.4. Sample Field Type Update Response

HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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

9.5. Removing A Field Type

A DELETE /repo/fieldTypes/{fieldTypeId} request will remove a field type.

Authority: field_type.delete

9.5.1. Delete Field Type Request

Table 9. /repo/fieldTypes/{fieldTypeId}
Parameter Description

fieldTypeId

The field type ID

9.5.2. Sample Delete Field Type Request

DELETE /repo/fieldTypes/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkzMzYsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLmZpZWxkX3R5cGUuZGVsZXRlIiwiZXhwIjoxNTk0NDQ5MzQxLCJpYXQiOjE1OTQ0NDkzMzYsImp0aSI6ImY1YmY3NWE2LTA0YTAtNDJmNy1hMWUwLTU4M2UyOWNkZTg2YyJ9.altTnYyZQz1IR_zsQjLKBcFBN9MTwxM3qQG5my2irEDpPJncEkrMea82yA-oWwP0Z-IbXsZAjX9daIlBsMB72oNqxceZyr69MqS0bfQKR3qlYSSbReAO--d5TrvEk89PIx5fi_nG6Ed2O1vLFHFNpqHYedB_HY742FmNvoBANxrz_hn8xhvhG6CQRiwSvvS1lYYBMFdHs0PdejhcV9ARsETk6hmvnIcwv7yH1TSRWpavfFlV9UqEbvaB-PqHBe658EQnS6NYfQbbJUUqmsWpmg2QIZ9F93GFMntgVmeS7KLrvXODua4RoA2XgnCZgjph2Yu8Cgxs1lBWzwAJ_ZRvqg
Host: localhost:8080

9.5.3. Delete Field Type Response

This API returns a HTTP 204 NO CONTENT response.

9.5.4. Sample Delete Field Type Response

HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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

10. Managing Fields

Fields contain information used in rendering each field in a registration form. Fields utilize properties of their field types in order to render an adequate representation of the field. Fields also specify the user property that the input field is bound to. Fields can override and extend certain properties of the field types.

See Defining Markup for fields for more information on how to customize fields.

10.1. Creating a field

A POST /repo/fields request will create a field.

Authority: field.create

10.1.1. Field Creation Request

Path Type Description

id

string

Field ID

pattern

String

Allowed string pattern for field

style

String

css style for input element in field

label

String

Input field label

placeholder

String

input field placeholder

fieldTypeId

String

Id of the field’s type

property

String

User property that the field will set

order

Number

Order of the field in Layout

required

Boolean

If the field input is required or not

name

String

the form name of the field

code

String

the field code

domainId

String

the ID of the domain

10.1.2. Sample Field Creation Request

POST /repo/fields HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkyOTAsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuMS5maWVsZC5jcmVhdGUiLCJleHAiOjE1OTQ0NDkyOTUsImlhdCI6MTU5NDQ0OTI5MCwianRpIjoiZjViZjc1YTYtMDRhMC00MmY3LWExZTAtNTgzZTI5Y2RlODZjIn0.Z1hxaydyULh1V2gU3rkQnqlA6qDeU-3JTpurX-Qw-nrPukjmYwVJ7wFBVEDZsYRqQdMNTh_er4IpMGt2b3gn8TufgejIiTy-vBVSKxEw9mQHlE5TRi8UkhG25l_zIYvqtxXlH8NOYw14cPCmZxW1qHJwW30YJKKxtPr0owd-4ikQ3e81gmlGXU2fkshed1jIlKO6V3TKHlgaF3d9yVTosaJq0qgOnLX3Ug9T2sOpX-Q3DfMb185_u3uYrFizRINwefwy0hfdOsweI-SP62_nxatTnS1QDRzssUNECJXbcWuMGw487aJD5OmAPhm5wrX3nBGKs8QWSYLaSG17BV4svA
Content-Length: 275
Host: localhost:8080

{
  "id" : "1",
  "code" : "username",
  "domainId" : "1",
  "name" : "username",
  "placeholder" : "Enter Username",
  "property" : "username",
  "fieldTypeId" : "1",
  "style" : "",
  "label" : "Username",
  "order" : 1,
  "pattern" : "",
  "required" : true
}

10.1.3. Field Creation Response

This API returns a HTTP 201 CREATED response with an empty body.

10.2. Retrieving a Field

A GET /repo/fields/{id} request will get a field with an ID.

Authority: field.read

10.2.1. Field Retrieval Request

Table 10. /repo/fields/{fieldId}
Parameter Description

fieldId

The field ID

10.2.2. Sample Field Retrieval Request

GET /repo/fields/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkyOTAsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuZ2xvYmFsLmZpZWxkLnJlYWQiLCJleHAiOjE1OTQ0NDkyOTUsImlhdCI6MTU5NDQ0OTI5MCwianRpIjoiZjViZjc1YTYtMDRhMC00MmY3LWExZTAtNTgzZTI5Y2RlODZjIn0.OiqRiZdh_w4gnjUljCxugVsHBVOSyPK8MwVHA9wFhhmeen8TNvmy5myLDHAfUaNnmDeTiy7JkH3J9aVbhiLmpyu0ETMX4icreDwFPMHY6cLIFiBGukJN4dgYyXAnt1qKEK7AsTQAph9ktnlrcDjNHVuviWreniDURI8wwwDXwBXrEgE4CISYgxy4fpMBhacoGjwZ14dbdZVmbi7WxLBIBabrSHSVs13dWeiC5po_HOATzCz_k-4OhCuHWpog3GnNLXtiSoIuNuYu36MoALypJBxq0V0uP5fQcfhYfoaWytiUr-KFdKAg8oi1R-V1iG2I2y_zx-4ijHjMmEqd5TQAAQ
Host: localhost:8080

10.2.3. Field Retrieval Response

This API returns a Field object with these fields:

Path Type Description

id

string

Field ID

pattern

String

Allowed string pattern for field

style

String

css style for input element in field

label

String

Input field label

placeholder

String

input field placeholder

fieldTypeId

String

Id of the field’s type

property

String

User property that the field will set

order

Number

Order of the field in Layout

required

Boolean

If the field input is required or not

name

String

the form name of the field

code

String

the field code

domainId

String

the ID of the domain

10.2.4. Sample Field Retrieval Response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+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: 438

{
  "code" : "username",
  "domainId" : "1",
  "name" : "username",
  "placeholder" : "Enter Username",
  "property" : "username",
  "fieldTypeId" : "1",
  "style" : "",
  "label" : "Username",
  "order" : 1,
  "pattern" : "",
  "required" : true,
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/repo/fields/1"
    },
    "field" : {
      "href" : "http://localhost:8080/repo/fields/1"
    }
  }
}

10.3. Retrieving all Domain Fields

A GET /repo/fields/search/findByDomainId request will get all fields in a domain.

Authority: field.read

10.3.1. Domain Retrieval Request Query Parameter

Parameter Description

domainId

Domain ID of the request

10.3.2. Sample Domain Retrieval Request

GET /repo/fields/search/findByDomainId?domainId=1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkyODksInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuMS5maWVsZC5yZWFkIiwiZXhwIjoxNTk0NDQ5Mjk0LCJpYXQiOjE1OTQ0NDkyODksImp0aSI6ImY1YmY3NWE2LTA0YTAtNDJmNy1hMWUwLTU4M2UyOWNkZTg2YyJ9.lsKE2SGLAv7LjlDcZVgqdF4uq6phmB7_dLtG4VHFHNt_KazbgxTs-1bvvZ6h82wnt1pKTbEvbPL2bnR5eBcm-kgJlZP28RZEFcC9c41WmtX8EFAP5uDHXmKVY08yycB-cnDHNz2WK0srgpG-PkVm972CCgVOaNzJYqY-CPWSy-DJ1s-QBbcFTLBpeAw7kDqWNnOiSJM_zFyZpzWKXKzBA_ozJ-DKoftajxHpne-yjVwUPxpRjsGHzN0UsisYFOgCS0bJwqY4iVPorXlDiAxVMsvvM-v620_A_wp1ocTjVtA1uVWJBga3c82RE29FJmQleoqJ0t10686TfHkdIy3Ndg
Host: localhost:8080

10.3.3. Domain Retrieval Response

This API returns a list of all fields with these properties:

Path Type Description

_embedded.fields.[].pattern

String

Allowed string pattern for field

_embedded.fields.[].style

String

css style for input element in field

_embedded.fields.[].label

String

Input field label

_embedded.fields.[].placeholder

String

input field placeholder

_embedded.fields.[].fieldTypeId

String

Id of the field’s type

_embedded.fields.[].property

String

User property that the field will set

_embedded.fields.[].order

Number

Order of the field in Layout

_embedded.fields.[].required

Boolean

If the field input is required or not

_embedded.fields.[].name

String

the form name of the field

_embedded.fields.[].code

String

the field code

_embedded.fields.[].domainId

String

the ID of the domain

10.3.4. Sample Domain Retrieval Response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+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: 686

{
  "_embedded" : {
    "fields" : [ {
      "code" : "username",
      "domainId" : "1",
      "name" : "username",
      "placeholder" : "Enter Username",
      "property" : "username",
      "fieldTypeId" : "1",
      "style" : "",
      "label" : "Username",
      "order" : 1,
      "pattern" : "",
      "required" : true,
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/repo/fields/1"
        },
        "field" : {
          "href" : "http://localhost:8080/repo/fields/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/repo/fields/search/findByDomainId"
    }
  }
}

10.4. Updating A Field

A PATCH /repo/fields/{id} request will update a field

Authority: field.update

10.4.1. Field Update Request

Table 11. /repo/fields/{fieldId}
Parameter Description

fieldId

The field ID

10.4.2. Sample Field Update Request

PATCH /repo/fields/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkyODgsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuMS5maWVsZC51cGRhdGUiLCJleHAiOjE1OTQ0NDkyOTMsImlhdCI6MTU5NDQ0OTI4OCwianRpIjoiZjViZjc1YTYtMDRhMC00MmY3LWExZTAtNTgzZTI5Y2RlODZjIn0.nL0_zbyOYdguFR6yMXWhqHtGCvqDpnVkmZFOloYTyfHkLFJdhiHzmOP4G3cp42lPkBw0-rVmD4HLh_8hMftx57Hm3xBRIpfaxbK3FEh13gkDn_-QkD4flE6qEWf6iRVpKxxI-z-w6iUywjNiyt94vOrbZNGCEmfT1zIo7ksAjkcSZqE5NNyXeJjGGmF0t_tf42SxLQl3m3CWftTAh72AR2j2t4nRrU-eEyD0LRZvVC8vzQ4bIiea3LHe3H1RfoUQCGRceXWhYr3YbXe1CbMkHKZSi7dmZCQFdU6Y9HmS5gR8f8nxkArL8t_0eHNIojLVOom_5am_YARDrLFgpVrJzg
Content-Length: 34
Host: localhost:8080

{"placeholder":"Enter a Username"}

10.4.3. Field Update Response

This API returns a HTTP 204 NO CONTENT response.

10.4.4. Sample Field Update Request

HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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

10.5. Removing A Field

A DELETE /repo/fields/{id} request will remove a field.

Authority: field.delete

10.5.1. Field Removal Request

Table 12. /repo/fields/{fieldId}
Parameter Description

fieldId

The field ID

10.5.2. Sample Field Removal Request

PATCH /repo/fields/1 HTTP/1.1
Authorization: Bearer eyJraWQiOiIxMjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI1ZWUzNzhhZDQ3NDg5MTI5Y2M0OWIzYjAiLCJyb2xlcyI6W10sImlzcyI6Im1tYWR1LmNvbSIsImdyb3VwcyI6W10sImF1dGhvcml0aWVzIjpbXSwiY2xpZW50X2lkIjoiMjJlNjViNzItOTIzNC00MjgxLTlkNzMtMzIzMDA4OWQ0OWE3IiwiZG9tYWluX2lkIjoiMCIsImF1ZCI6InRlc3QiLCJuYmYiOjE1OTQ0NDkyODgsInVzZXJfaWQiOiIxMTExMTExMTEiLCJzY29wZSI6ImEuMS5maWVsZC51cGRhdGUiLCJleHAiOjE1OTQ0NDkyOTMsImlhdCI6MTU5NDQ0OTI4OCwianRpIjoiZjViZjc1YTYtMDRhMC00MmY3LWExZTAtNTgzZTI5Y2RlODZjIn0.nL0_zbyOYdguFR6yMXWhqHtGCvqDpnVkmZFOloYTyfHkLFJdhiHzmOP4G3cp42lPkBw0-rVmD4HLh_8hMftx57Hm3xBRIpfaxbK3FEh13gkDn_-QkD4flE6qEWf6iRVpKxxI-z-w6iUywjNiyt94vOrbZNGCEmfT1zIo7ksAjkcSZqE5NNyXeJjGGmF0t_tf42SxLQl3m3CWftTAh72AR2j2t4nRrU-eEyD0LRZvVC8vzQ4bIiea3LHe3H1RfoUQCGRceXWhYr3YbXe1CbMkHKZSi7dmZCQFdU6Y9HmS5gR8f8nxkArL8t_0eHNIojLVOom_5am_YARDrLFgpVrJzg
Content-Length: 34
Host: localhost:8080

{"placeholder":"Enter a Username"}

10.5.3. Field Removal Response

This API returns a HTTP 204 NO CONTENT response.

10.5.4. Sample Field Removal Response

HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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

10.6. Defining Markup for Fields

You define how you want your registration fields by configuring fields and field types. The markup property in the field type is used to define the markup of that specific field type. An age field type markup can be defined as shown:

<label for='$field.name' class='sr-only'>$field.label</label>
<input type='number' id='$field.name' name='$field.name' class='form-control'
placeholder='$field.placeholder' $maxValue $minValue autofocus $required $inputField $inputStyle $errorStyle >
$errorDisplay"

Mmadu registration service uses apache velocity to generate markup for fields. It provies the following in the template context for use in defining fields. You reference context objects by adding the $ prefix. For example, the $field.name returns the name property in the field object.

Object Name Description

field

The field object

type

The field type object

inputField

Input attribute and value that marks an element as a model input

inputStyle

style attribute, any element with this property will have the field type style property appended to that element

errorStyle

style attribute, any element with this property will have the style appended with the error style when the field contains errors

errorDisplay

HTML markup for displaying field errors

maxValue

max attribute, any element with this will have the max attribute set to the max value of the field type

minValue

min attribute, any element with this will have the min attribute set to the min value of the field type