Schema Management
Select Database Management - REST API from the home page or Schemas from the side navigation pane to access the Schema Management page.
View available database schemas
The Schema Management page shows the available schemas.
You can arrange the schemas in Stack View, Card View, Alphabetical View, or NSF View. There is also a provision to search through the list either via Schema Name or NSF Name.
Add a schema
The shape of data available is referred to as a schema. The schema is a JSON file in the design resources of the database. It gets created by a developer with Designer access to the NSF.
This creates an alias to the schema. This, along with a scope, provides access to the database via the Domino REST API. One NSF can have multiple schemas, which is useful to provide different data sets or different levels of access to data.
You can add a schema by creating your own schema or importing a schema.
Create a schema
-
On the Schema Management page, click Add Schema.
-
In the Add New Schema dialog, click Create Schema.
-
In the Create Schema dialog:
-
Select a database from the Database drop-down list.
You can also enter the database name in the Database field to filter the list of available databases.
-
Select an Icon.
- Enter a Schema Name and a Schema Description.
- Click Save Schema.
-
Import a schema
Use this option if you want to import a new schema from a JSON file produced by exporting database schema as JSON file.
- On the Schema management page, click Add Schema.
- In the Add New Schema dialog, click Import Schema.
-
Select the JSON database file and click Open. The JSON database file is the exported file from another database or within your server.
-
In the Import Schema dialog:
- Choose the
.nsf
database from the Import Into Database dropdown list. The default.nsf
is from the imported database JSON file. - Update the Icon, Schema Name, Schema Description, and Formula Engine as needed.
- Click Save Schema.
- Choose the
The nsf
database file and schema are added to the schema list.
Note
The imported schema name must be unique. You'll be warned if you try to save a schema to a database that already has a schema with the same name.
Edit a schema
- On the Schema Management page, select the schema you want to edit.
-
In the schema details card, click the edit icon.
-
In the Edit Schema dialog:
- You can select a new icon from the drop-down icon list.
- You can update the description of the schema in the Description.
- You can update the configuration by clicking the toggles to enable or disable the configuration settings. For more information, refer to the following table:
Configuration setting Description DQL Access Enable the setting to allows DQL queries to run against the elements of the schema. A mode named dql
must be created on each form specifying the fields allowed for that form.In $DATA Scope Enable the setting to make schema available in the system $DATA
scope. Disable the setting to limit access to the schema to those with the specific scope.Enable Code feature under development Require Revision Enable the setting to require the provision of the correct revision version of the document to update the document through an update endpoint. -
You can enter a valid Notes formula in DQL Formula to limit DQL usage. The formula must evaluate to
@TRUE
for DQL to be allowed. The default is@TRUE
, which means no limitations.
-
Click Save.
List available database forms
- Select a schema from the list of schemas to load the details.
-
Select Database Forms from the menu bar to show the list of all the forms for the selected database schema.
Add new form schema
Tip
The Add New Form Schema feature enables the creation of a new custom form through which you can set up a schema. The feature doesn't create a new form on the backend, so it won't exist in the database. Everything related to the new form is contained within the schema. Therefore, if you delete the form, it's only removed from the list of forms on the Database Forms tab.
- Click Add New Form Schema.
- In the Add New Form Schema dialog, enter your schema name and click Create.
- On the Schema Management - <schema name> page, select a form from the Show fields from dropdown field to display the fields of the selected form. You can also select All Fields from the dropdown field to display all the fields from all the available forms.
- Select the fields that you want to add to the mode.
- Configure the Field Setting and Mode Settings as needed for each added field.
- Click Save.
The new form is now added to the list of forms and has an Active status.
Note
- The form created using this feature can't be deactivated and can only be deleted. To delete the form, click the menu icon beside the form's status and select Delete. In the WARNING: Deleting Custom Form dialog, click Yes to confirm.
- You can identify a custom form by the marker beside the form name and by the custom form text below the form name.
Activate a form
To activate a specific form or forms
- Select the form that you want to activate, click the corresponding menu icon beside the form's status, and then select Activate.
The activated form now has an Active status.
Tip
Clicking the menu icon and selecting Deactivate corresponding to a form deactivates the form. In the Reset Form dialog, click Yes to confirm. The form now has an Inactive status.
To activate all forms
- Click Activate All.
All forms are now activated with default settings and have Active status.
Tip
-
Clicking Deactivate All deactivates all active forms and removes all the configurations you have made to each of the forms. In the confirmation dialog, click Yes to confirm. All forms now have an Inactive status.
-
Clicking Deactivate All won't deactivate forms created using the Add New Form Schema feature.
Change form configuration
-
On the Database Forms tab, click the pencil icon corresponding to the activated form that you want to edit.
Note
Clicking the pencil icon corresponding to an inactive form shows the Activate Form dialog, which requires you to confirm the activation of the form. If you click OK, the form is activated, and you are directed to the form Access Mode page.
The Access Mode page opens showing the
default
access mode. -
Under Show fields from, hover over a field item and click the + icon. This adds the field in the form. Repeat this for all the fields to be added.
When you hover over the info icon beside the field name, the field property is shown. The field can be editable, which means that the field has Read/Write access setting. The field can also be either computed, computed when composed, or computed for display, which means that the field has Read Only access setting.
-
Set the read or write access of each field in the form in Field Setting.
-
Under Mode Settings, click the pencil icon corresponding to a mode formula. A dialog opens.
The following image shows the opened Formula for Delete Access dialog.
-
In the text field in the dialog, edit the
@True
or@False
entry and click Save to close the dialog. -
Click Save.
Tip
- Click Add All Fields icon to add all the available fields to the form.
- Click Refresh List of Fields icon to refresh the list of avaialble fields.
- Use the Search Field search box to search for a field by field name.
- Enter a custom field name in the Add custom field and click the + icon to add a custom field to the form.
- Click Delete Fields, select the fields to remove, and then click Remove to remove the selected fields from the form.
- Click the Multi-Value toggle to the on position to specify a Field Group. The Multi-Value toggle isn't clickable to the off position if a field group is specified.
Note
The encryption and signing features are available starting from the Domino REST API v1.1.0 release. Make sure to set up Domino REST API for encryption, decryption, and signing before executing the following steps for encryption and signing.
- Click the Encrypt toggle in Field Setting to the on position to enable encryption.
- Click the Sign Document toggle in Mode Settings to the on position to enable this feature.
For more information on encryption and signing, see Using encryption, decryption, and signing during development.
Add a mode
- On the Database Forms tab, click the pencil icon corresponding to the activated form that you want to add a mode. The form Access Mode page opens showing the
default
access mode. - Click Add Mode.
-
In the Add New Mode dialog, enter the name of the new mode and click Save. The new mode has been added to the
Mode
list.The following image shows an example of the added mode, which is the
dql
. -
Add fields and set the read or write access formula for each of the added fields.
- Click Save.
Clone a mode
Use Clone Mode to add a new mode based on an existing mode in the same schema.
- On the Database Forms tab, click the pencil icon corresponding to the activated form that you want to clone a mode. The form Access Mode page opens showing the
default
access mode. - From the Mode dropdown list, choose the mode you want to clone, for example the
default
mode. - Click Clone Mode.
-
In the Clone <mode name> dialog, enter the name of the mode and click Save.
The new mode cloned from an existing mode is now available. You can remove or add fields to the new mode and read or write access formula for each of the fields.
-
Click Save.
Compare modes
Use this function to see the differences between the modes of a selected form. To use this function, you must have at least two modes in your selected form.
- On the Database Forms tab, click the pencil icon corresponding to the activated form that you want to compare the modes. The form Access Mode page opens showing the
default
access mode. - Click Open Mode Compare. The Mode Compare - <form name> page opens.
- Select the modes to compare from the drop-down lists in the comparison columns. The comparison result is displayed.
Note
- A field available in only one mode is highlighted, and then indicated as Field not existing in the other mode.
- Fields with differences are highlighted.
Tip
- Click the Show only fields with differences toggle to only show fields with differences.
- In case there are too many fields, and you want to find a specific field, you can enter the field name in the Search Field to only display the specific field if available.
- Click Add New Column to add more modes in the comparison.
- Click the close icon to close the Mode Compare - <form name> page.
List available database views
- Select a schema from the list of schemas to load the details.
-
Select Database Views from the menu bar. This lists all the views for the selected schema.
Activate a view
To activate a specific view or views:
- Select the view that you want to activate, and then click the corresponding Active option under Status.
Tip
Clicking the Inactive option corresponding to a view deactivates the view. On the Reset Views Columns dialog, click Yes to confirm deactivation of the view.
To activate all views:
- Click Activate All.
Tip
Clicking Deactivate All deactivates all active views and removes all configurations you have made to each of the views. On the Reset ALL View Columns dialog, click Yes to confirm deactivation of all views.
Edit a view
See Edit a database view of a schema for more information.
List available database agents
- Select a schema from the list of schemas to load the details.
-
Select Database Agents from the menu bar. This lists all the Agents for the selected database.
Activate an agent
To activate a specific agent or agents
- Select the agent you want to activate, and then click the corresponding Active option under Status.
Tip
Clicking the Inactive option corresponding to an agent deactivates the agent.
To activate all agents
- Click Activate All.
Tip
Clicking Deactivate All deactivates all active agents. On the Reset ALL Agents dialog, click Yes to confirm the deactivation of all agents.
View Source
The Source tab allows you to view the database schema details in JSON format.
- Select a schema from the list of schemas to load the schema details.
-
Select Source from the menu bar to show the details for the selected schema in the following view mode:
- Text View - shows the text view of the details of the selected schema in JSON format
- Tree View - shows the collapsible view of the details of the selected schema in JSON format
Note
-
To edit the database schema JSON details, see Edit database schema JSON.
-
To export the schema in a JSON file, see Export schema as JSON file.