Lab 04 - Additional scope & schema
Rationale: An external training provider shall get access to Name and Course, but neither cost nor approval flows.
Duration 10 min
What you will learn:
A database can expose different sets of information based on different schema.
Prerequisites
- Lab 03 completed
- Domino running
- Postman available
Steps for schema and scope exploration
Create schema
- In the Admin UI, select "Database Management - REST API"
- Click Schemas from the navigation pane.
- On the Schema Management, click Add Schema".
- Select
ApprovalCentral.nsf
from the Available Databases. -
Fill in Schema Name:
training
-
Switch to the "NSF View"
-
Click to edit the
training
schema. -
Under the Database Forms, configure only the form
Training
.Field Type Access Form string read-write from names read-write Training string read-write Set formula for write access to
@false
Important
Don't forget to save.
-
On the Databse Views, the view
(TrainingApprovals)
, andPendingApprovals
must set toactive
.
Create scope
- Click Scopes from the navigation pane.
- Click Add Scope, on the Scope Management
- Select the schema
training
from theApprovalCentral.nsf
from the Available Schema -
Fill in Scope Name as
trainingcorp
. Fill the Description.Leave the Server and Maximum Level Access as they are.
-
Click Add. It will be added to your scopes list.
Alternative POST
to /api/setup-v1/admin/scope
{
"apiName": "trainingcorp",
"createSchema": false,
"description": "Subset Training for XY Training Inc",
"iconName": "handshake",
"isActive": true,
"nsfPath": "ApprovalCentral.nsf",
"schemaName": "training",
"server": "*"
}
How to check
- Retrieve list of schemas for
ApprovalCentral.nsf
. - Retrieve list of scopes.
- Check admin UI.
- Login with limit to scope
trainingcorp
and look at data in POSTMAN
Things to explore
- Login with a limited scope and try to access the other scope's data.