Skip to content

Commit 1c26ddc

Browse files
authored
Merge pull request #26 from oracle-samples/apex_update
feat: ✨ Added the ability to create and delete IoT Platform objects.
2 parents b18b214 + 8d1b943 commit 1c26ddc

File tree

6 files changed

+2372
-541
lines changed

6 files changed

+2372
-541
lines changed

apex/dashboard/CHANGELOG.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
1+
<!-- markdownlint-disable MD024 -->
12
# IoT Explorer - Release Notes
23

3-
## September 16th 2025
4+
## October 17th, 2025
5+
6+
### New Features
7+
8+
- Creation and deletion available for models, adapters, and instances.
9+
- Secrets and certificates can be created as part of the instance
10+
creation form.
11+
12+
### Changes
13+
14+
- DTDL Model D in Adapter and Instance reports links to Model Detail and
15+
Usage page.
16+
17+
### Bug Fixes
18+
19+
- Report column names and order consistency
20+
21+
## September 16th, 2025
422

523
### New Features
624

@@ -15,16 +33,16 @@
1533

1634
### Bug Fixes
1735

18-
- Report column names and order consistancy
36+
- Report column names and order consistency
1937

20-
## August 25th 2025
38+
## August 25th, 2025
2139

22-
### Inital Release
40+
### Initial Release
2341

2442
Features
2543

2644
- Traffic monitoring dashboard
27-
- Listing of OcI IoT Platform objects (models, adapters, and instances)
45+
- Listing of OCI IoT Platform objects (models, adapters, and instances)
2846
- Reports of Raw Data, Errors, and Historized data
29-
- Dynamic tree structure of OCI IoT Platform objects, their relationships, and most
30-
recent data collected
47+
- Dynamic tree structure of OCI IoT Platform objects, their relationships, and
48+
most recent data collected

apex/dashboard/README.md

Lines changed: 103 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,119 @@
1-
21
# OCI IoT Platform Explorer
32

43
This APEX application serves as a dashboard for monitoring IoT devices and messages.
54

65
## Prerequisites
76

8-
1. Complete setup of Iot Platform including access to APEX:
9-
2. Create an APEX user to install and access the application.
10-
11-
Documentation about creating APEX users can be found in the
7+
1. Setup of IoT Platform. [IoT Platform Getting Started](https://docs.oracle.com/en-us/iaas/Content/internet-of-things/overview.htm)
8+
2. Allow access to APEX. [APEX Setup](https://docs.oracle.com/en-us/iaas/Content/internet-of-things/connect-iot-apex.htm)
9+
3. Create an APEX user to install and access the application.
1210
[APEX Administration Guide](https://docs.oracle.com/en/database/oracle/apex/24.2/aeadm/managing-users-across-an-application-express-instance.html#GUID-CE23292D-05D1-4E79-BF40-8BC31E74E6C8).
1311

14-
### Optional
12+
### Enabling Optional Features
13+
14+
The application includes the following optional features that require OCI
15+
credentials to function.
16+
17+
1. Creation and deletion of models, adapters, and instances.
18+
2. Creation of certificates and passwords for instances created in the
19+
application.
20+
3. retrieval of passwords stored in a vault and private keys of certificates to
21+
facilitate device setup.
22+
4. retrieval of IoT Domain Group and IoT Domain information where the
23+
application is running.
24+
25+
>[!WARNING]
26+
>Providing these settings gives a group access to your IoT domain group(s),
27+
>the IoT domain(s) they contain, as well as certificates, private keys, and
28+
>other Vault secrets.
29+
>
30+
>**All users with access to the IoT Platform Explorer application will be able
31+
>to view this sensitive information**.
32+
>
33+
>This application is for demonstration purposes only and you should carefully
34+
>consider the access it provides, should you decide to configure these
35+
>settings.
36+
37+
In order to mitigate some risk it is **recommended** that you create a
38+
dedicated OCI user and group that OCI IoT Explorer can use to access OCI REST
39+
APIs.
40+
41+
1. Begin by creating an OCI user group.
42+
2. Next, create a user with an API Key assigned to that group.
1543

16-
It is recommended that you create an OCI user and group that OCI IoT Explorer can use to
17-
access OCI REST APIs. However, any user with sufficient access will suffice.
44+
Then, as the admin-level user, create a new policy and set the policy
45+
statements appropriate for you.
1846

19-
1. Begin by creating an OCI user group.
20-
2. Next, create a user with an API Key assigned to that group.
47+
- Allow access read IoT Domain Group and Domain information
48+
49+
```text
50+
Allow group <grp_name> to read iot-family in compartment <cmp_name>
51+
```
52+
53+
- Allow group members to create IoT objects. (models, adapters, instances,
54+
relationships )
55+
56+
```text
57+
Allow group <grp_name> to manage iot-digital-twin-family in compartment
58+
<cmp_name>
59+
```
2160

22-
Then, as the admin-level user, create a new policy and set the following.
61+
- Allow group members access, create, and read secrets stored in a vault.
2362

24-
```text
25-
Allow group <grp_name> to manage iot-family in compartment <cmp_name>
26-
Allow group <grp_name> to manage iot-domain-family in compartment <cmp_name>
27-
Allow group <grp_name> to manage iot-digital-twin-family in compartment <cmp_name>
28-
```
63+
```text
64+
Allow group <grp_name> to use vaults in compartment <cmp_name>
65+
Allow group <grp_name> to manage secret-family in compartment <cmp_name>
66+
Allow group <grp_name> to use keys in compartment <cmp_name>
67+
```
68+
69+
- Allow group members to access and read certificate authority information and;
70+
access, read, and create certificates.
71+
72+
```text
73+
Allow group <grp_name> to read certificate-authority-family in compartment
74+
<cmp_name>
75+
Allow group <grp_name> to use certificate-authority-delegate in compartment
76+
<cmp_name>
77+
Allow group <grp_name> to manage leaf-certificate-family in compartment
78+
<cmp_name>
79+
Allow group <grp_name> to use key-delegate in compartment <cmp_name>
80+
```
2981

3082
## Setup
3183

32-
After completing your IoT Platform setup, you should be able to access your APEX
33-
instance with the user you created in the prerequisites. Log in to your instance and
34-
complete the following tasks to install the dashboard.
84+
After completing your IoT Platform setup, you should be able to access your
85+
APEX instance with the user you created in the prerequisites. Log in to your
86+
instance and complete the following tasks to install the dashboard.
3587

3688
### Part One
3789

3890
There are several database objects that need to be created that are
39-
prerequisites for the IoT Explorer. The iot_explorer.sql file is a creation script
40-
for creating the following objects.
41-
42-
* Synonyms
43-
* A synonym will be created in the *__wksp schema for each of the views in the
44-
*__iot schema. The synonym names are derived by removing 'DIGITAL_TWIN_' from the
45-
view name (if present) and appending '_syn'.
46-
* Views
47-
* iot_stats - merges messages/records that have occured after the last refresh of
48-
iot_msg_stats to report basic stats for all data.
49-
* iot_hierarchy - a hierarchy view of models -> adapters -> instances.
50-
* Materialized Views
51-
* iot_msg_stats - computes basic stats on raw messages, rejected messages,
52-
historized records, and command records.
53-
* Scheduled Tasks
54-
* REFRESH_MVIEW_IOT_MSG_STATS - task is executed daily at 01:00 (1:00 am) and
55-
updates the iot_msg_stats materialized view.
56-
* Functions
57-
* compact_number( n number ) - accepts a number and returns a shorter string
58-
representation of that number.
91+
prerequisites for the IoT Explorer. The iot_explorer.sql file is a creation
92+
script for creating the following objects.
93+
94+
- Synonyms
95+
- A synonym will be created in the *__wksp schema for each of the views in
96+
the \*__iot schema. The synonym names are derived by removing
97+
'DIGITAL_TWIN_' from the view name (if present) and appending '_syn'.
98+
99+
- Views
100+
- iot_stats - merges messages/records that have occurred after the last
101+
refresh of iot_msg_stats to report basic stats for all data.
102+
- iot_hierarchy - a hierarchy view of models -> adapters -> instances.
103+
- auth_view - lists certs and secrets accessible to IoT.
104+
- iot_certs - detailed information about certs available to IoT.
105+
- iot_passwords - detailed information about passwords stored in the vault.
106+
107+
- Materialized Views
108+
- iot_msg_stats - computes basic stats on raw messages, rejected messages,
109+
historized records, and command records.
110+
111+
- Scheduled Tasks
112+
- REFRESH_MVIEW_IOT_MSG_STATS - task is executed daily at 01:00 (1:00 am) and
113+
updates the iot_msg_stats materialized view.
114+
115+
- Packages
116+
- See [iot_explorer_packages.md](iot_explorer_packages.md)
59117

60118
#### Instructions
61119

@@ -81,16 +139,16 @@ application number.
81139

82140
## Running the Application
83141

84-
The application is accessable through any standard web browser via a url. To
85-
obtain that url use the instructions below.
142+
The application is accessible through any standard web browser via a URL. To
143+
obtain that URL use the instructions below.
86144

87145
1. From the APEX home screen, click "App Builder".
88146
2. Then click "OCI IoT Platform Explorer".
89147
3. Then, click the "Run" button located at the top right of the page below your
90148
username.
91-
4. Copy and save / bookmark the url.
149+
4. Copy and save / bookmark the URL.
92150

93-
The application uses APEX user account for authorization.
151+
The application uses an APEX user account for authorization.
94152

95153
## Usage
96154

@@ -104,8 +162,8 @@ in a hierarchy starting with models, next adapters, then digital twins.
104162

105163
The 'Settings' page allows you to enter a user's credentials and information
106164
about your tenancy. This information, along with OCI policies allows the
107-
application to make the REST API calls to the IoT service. Any features requiring a
108-
value that has not been set will display a message to that effect.
165+
application to make the REST API calls to the IoT service. Any features requiring
166+
a value that has not been set will display a message to that effect.
109167

110168
## Removal
111169

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:007df5138ee8fb979636739cdf20bbf3823fa1d9015ab70350d7d264eb8e7771
3-
size 845208
2+
oid sha256:5fe5982ade7b4478e63bf4db245bacabf91618932811beec56947b4d35d78e82
3+
size 1331625

0 commit comments

Comments
 (0)