Update Schema
Schemas
Domino REST API Schema is the first part on exposing a database with Domino REST API.
The schema defines what can be exposed and requires an understanding of the database design. It will usually be set up by a developer and is stored as part of the database.
Creating an NSF automatically creates a basic schema, although with nothing exposed.
Viewing the Schema
- Hover over the
Domino-REST-API-NewDB
collection name and click on the ellipsis (three dots). Select Add Request. - Name the request
view schema
and click Save. - Set the URL as
{{SETUP_HOST}}/schema?configName=customers&nsfPath=customers.nsf
. - On the Headers tab, add a HTTP request header called Authorization with the value
{{bearer}}
. This maps to the bearer collection variable we set from theauthenticate
request. - Click Send to make the request.
- Save and close the request. The JSON object for the schema will be returned. This can be used to make update requests to the schema.
Updating the Schema
- Hover over the
Domino-REST-API-NewDB
collection name and click on the ellipsis (three dots). Select Add Request. - Name the request
update schema
and click Save. - Change the method from GET to POST.
- Set the URL as
{{SETUP_HOST}}/schema?configName=customers&nsfPath=customers.nsf
. - On the Headers tab, add a HTTP request header called Authorization with the value
{{bearer}}
. This maps to the bearer collection variable we set from theauthenticate
request. - Add an HTTP request header Content-Type set to
application/json
. - On the Body tab change the type to
Raw
and also change the type fromText
toJSON
. - Copy the results from
view schema
request and paste it inside the request body ofupdate schema
request. - Replace
iconName
withmountain
. -
Replace
icon
with:PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMiA1MTI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwb2x5Z29uIHN0eWxlPSJmaWxsOiNERTRDM0M7IiBwb2ludHM9IjMwOC45NjYsMjYuNDgzIDI1NiwwIDI1Niw1Mi45NjY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xsOiM4OEIzMzc7IiBwb2ludHM9IjQzMi41NTIsNDY3Ljg2MiA0ODUuNTE3LDQ2Ny44NjIgNDU5LjAzNCwzODguNDE0ICIgLz4NCjxyZWN0IHg9IjUyLjk2NiIgeT0iNDQxLjM3OSIgc3R5bGU9ImZpbGw6IzVFMzgyNTsiIHdpZHRoPSIxNy42NTUiIGhlaWdodD0iOC44MjgiIC8+DQo8cmVjdCB4PSIxNjcuNzI0IiB5PSIzODguNDE0IiBzdHlsZT0iZmlsbDojNUUzODI1OyIgd2lkdGg9IjE3LjY1NSIgaGVpZ2h0PSI4LjgyOCIgLz4NCjxyZWN0IHg9IjM3MC43NTkiIHk9IjQzMi41NTIiIHN0eWxlPSJmaWxsOiM1RTM4MjU7IiB3aWR0aD0iMTcuNjU1IiBoZWlnaHQ9IjguODI4IiAvPg0KPHJlY3QgeD0iNDUwLjIwNyIgeT0iNDY3Ljg2MiIgc3R5bGU9ImZpbGw6IzVFMzgyNTsiIHdpZHRoPSIxNy42NTUiIGhlaWdodD0iOC44MjgiIC8+DQo8L3N2Zz4NCg==
- Replace
description
withMy favorite Customers database
. - Find
dqlFormula
and replace itsformula
value with@True
. This enables the use of DQL queries on this schema. - Click Send to make the request.
- Save and close the request.
Congratulations!
This request has updated our schema with a new description and icon, and enabled DQL queries to be used.