Data Models Viewer

Estimated Reading Time:  5 minutes

Overview

Unqork Data Models form the backbone of Unqork’s data-driven development. They connect JSON JSON (JavaScript Object Notation) is an open standard file and data interchange format. Unqork uses JSON for submission (record) data. Schemas to Unqork applications and provide a reference to store records from those applications. The Data Models Viewer displays a list of all Data Models created and available in a workspace.

Using Unqork Data Modeling, Creators Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform. can enforce data structure, integrity, and security. Unqork Data Models leverage Unqork schemas to dictate the shape of collected records and the validations for the data stored in those records. They can also provide additional security to your application by applying RBAC RBAC (Role-Based Access Control) is a method to control system access for authorized users. The role in RBAC refers to the levels of access employees have to a network. to the Data Model and its individual fields.

Only Creators Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform. with an Administrator role can access the Data Models Viewer.

What You'll Learn

In this article, you'll learn the Data Models Viewer and how to create, edit, and set up RBAC in your Unqork Data Models.

Accessing the Data Models Viewer

The Data Models Viewer is located under Data Elements to the left of your Workspaces page.

To access the Data Models Viewer:

1. In Workspaces view, navigate to and select your Workspace.
2. To the left of the page, select  Data Models.

About the Data Models Viewer

Once you've accessed the Data Models Viewer, you'll see a list of Data Models available in the workspace. Use this page to create, edit, view, and set up RBAC in your Data Models.

A static image displaying the Data Models Viewer and all its avaliable attributes and actions.

Below are the available attributes and actions you can take in the Data Models Viewer:

  Attribute Description

1

+ Create Data Model

Creates a Data Model from a published JSON Schema.

To learn more, see the Creating a Data Model section of this article.

2

Data Models

Displays a list of Data Models created in your workspace. Each Data Model tile includes a title, a timestamp when it was last modified, and its associated schemas and modules.

You can also click a schema tile to view its details on a new page.

To learn more about Data Model Details, see the Viewing Data Model Details section of this article.

3

 (ellipsis)

Click this button on a specific Data Model tile to perform the following actions:

  • Rename: Lets you rename the Data Model.

  • Archive: Archives the Data Model.

  • Delete: Deletes the Data Model.

The available actions depend on the status of your Data Model.

4

Associated Schema

Each tile displays the JSON Schema associated with the Data Model. Click the link to open the Schemas Viewer and display the schema in a side panel.

5

Associated Modules

Each tile displays the module(s) associated with the Data Model. Click View Module to view it in a side panel.

Creating a Data Model

Data Models consist of a single JSON schema. Once you have your JSON schema uploaded to your workspace, you can create your Data Model. Once created, you can use the Data Model in your application to structure and validate data.

To create a Data Model

1. At the top right of the Data Models Viewer, click + Create Data Model.
2. In the Data Model Name* field, enter a unique name for your Data Model.
3. From the Select Schema* drop-down, select the schema you want to use.

4. Click Create.

Viewing Data Model Details

Click on a Data Model tile to open its details page. For a given Data Model, you can view the schema fields and their data types.

A static image displaying the various attributes and actions you can take when viewing the details of a Data Model.

Below are the available attributes and actions you can take when viewing a Data Model’s details:

  Attribute Description

1

Data Model Name

The name of the selected Data Model. Use the breadcrumbs to return to its workspace.

2

Last Modified

The date and time the Data Model was last modified.

3

(settings)

Click this button to open the Settings modal A modal is a window that appears on top of the content you are currently viewing.. This modal lets you view and edit your Data Model's roles and permissions.

To learn more, see the Data Model Settings section of this article.

4

View Records

Clicking this button opens the Data Model's records data in the Record Collections Viewer.

To learn more about the Record Collections Viewer, view our Record Collections Viewer article.

5

JSON Schema

Use this link to view the associated JSON Schema's details in the Schemas Viewer.

To learn more about the Schemas Viewer, view our Schemas Viewer article.

6

Schema Data

A list of the schema fields and data types associated with the Data Model's JSON Schema. You can view nested schema values, like array indexes, by expanding (Down Arrow Icon) the parent field.

Data Model Settings

When viewing a Data Model's details, click (settings) to view and edit the Data Model's permissions. A modal displays with two tabs:

  • Model Settings: Lets you set the permissions for the Data Model.

  • Field Settings: Lets you set the permission for the specific fields in the Data Model's JSON Schema.

Model Settings

Using the Model Settings tab, you can apply RBAC permissions to your Data Model. These permissions determine which roles can access these Data Models and the fields they contain. These permissions apply to both the Creator Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform. and the end-user End-users, also known as Express Users, are the individuals accessing an application through Express View. In most cases, end-users are the customers using the product..

Below are the available RBAC options you can make when using the Model Settings tab in the Data Model Settings:

  Attribute Description

1

Replace Associated Schema

The current JSON schema associated with the Data Model. Use the drop-down menu to select a different schema.

Changing the schema might affect the associated modules. If so, it might require you to edit the modules to support the Data Model.

2

Role (Express)

The Express user role.

3

Permission

Permissions set by the administrator. Permissions include:

  • Inherit: Grants permissions from parent role.

  • No-Access: Denies user role access.

  • Read Only: Allows user role to view but not edit.

  • Write: Allows user role to view and edit.

4

Effective Permission

The permissions granted to the user role.

5

Inherited From

The permissions granted from a parent role.

Field Settings

The Field Settings tab is where you can apply the same RBAC permissions as in the Model Settings tab. The difference is that these permissions are associated with JSON schema fields in your Data Model.

Select which field you want to apply RBAC settings to using the menu to the left.

Resources