Use external names in schema definitions
The external name allows you to specify the name of the matching configured forms used in the KEEP service URL. The customer is one of the configured forms that can deliver the same data using multiple cases from different clients and schemas. If no other schema mode is identified, the data will be sent and received using the default mode.
About this task
The procedures guide you on using external names in schema definitions and in testing external name results in Postman.
Prerequisite
- You must have credentials to use the service user interface.
- Configured schema and scopes
Procedure
- Log in to HCL Domino REST API.
- Choose the Database Management REST API option.
- Under the Schema Management page, turn on the only show schemas configured with scope toggle.
- Choose the default schema.
- Under the Database Form tab, choose Customer configured form.
-
Click Add Mode. This opens the dialog for creating a new mode.
The default mode will be used if no added mode exists for this configured form (i.e, customer).
-
Enter the new mode name (i.e. test) and click Save. The new mode will be available. The customer fields can be seen in the left pane.
The new mode will be added on the schema Mode dropdown menu. Click the dropdown menu to see the schema modes.
-
Hover over the available field name and click "+" to add the field to your newly created mode.
This customer field on the left pane came from the schema default mode. You can include these fields in your newly created mode. You can modify the field name from the schema default mode and use it as your field name in the new mode.
-
The field name added is available on the right pane. Modify the name displayed in the
Field Name
field (i.e., email,field name
= Sulatroniko).The field name you change will be used as the translation for the default field name on the mode you created. When using this new schema mode to create, get, or update data through API, this field will refer to the default customer field name. This is the case regardless of which mode is being used.
-
Click Save. You can add more fields to your new mode using the fields in the default mode.
Expected result
The image below is the default mode.
The service UI will return the field names you put in the new test mode.
The image below is the test mode.
How to test external names result in Postman
Pre-requisite
- Configured postman
Procedure:
-
Modify the schema mode according the mode you have defined in the service URL by using the
GET
command: -
When you are using the default mode, change the
mode=default
.{{ HOST }}/document/{{ UNID_0 }}?dataSource=demo&mode=default&meta=false
-
When you are using the test mode, change the
mode=test
.{{ HOST }}/document/{{ UNID_0 }}?dataSource=demo&mode=test&meta=false
It retrieves the same data result but a different field name translation. The same thing happens if you want to edit the data. It's delivered to the field name of a different schema mode.
Expected Result
Default (mode)
{
"Email": "mbranthwaite0@nba.com",
"first_name": "Madisons",
"last_name": "Branthwaite",
"Pet": "Black-capped chickadee",
"Form": "Customer"
}
test (mode)
{
"Sulatroniko": "mbranthwaite0@nba.com",
"Pangalan": "Madisons",
"Apelyido": "Branthwaite",
"AlagangHayop": "Black-capped chickadee",
"Form": "Customer"
}