diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/create-user-and-database-objects.md b/build-ords-apis-in-adb/1-create-user-and-database-objects/create-user-and-database-objects.md index 196bb84bf..65f0bffcc 100644 --- a/build-ords-apis-in-adb/1-create-user-and-database-objects/create-user-and-database-objects.md +++ b/build-ords-apis-in-adb/1-create-user-and-database-objects/create-user-and-database-objects.md @@ -2,7 +2,7 @@ ## Introduction -In this lab, you will, as the Admin, create a new database developer user to be used for the remainder of this workshop. Your new user will automatically be REST-enabled. This means the new user will also be able to log into Database Actions as well as have the ability to REST-enable their database objects. +In this lab you will create a new database developer user to use for the remainder of this workshop. You'll used this REST-enabled user to log into Database Actions as well as have the ability to REST-enable their own database objects. You'll build out your schema with database objects, and AutoREST-enable a table in your Autonomous Database. Finally, you'll test the endpoint using the cURL command line tool @@ -15,8 +15,9 @@ Estimated Lab Time: 20 minutes - REST-enable a table for this new user ### Prerequisites - + - The following lab requires an [Oracle Cloud account](https://www.oracle.com/cloud/free/). You may use your own cloud account, a cloud account obtained through a trial, or a training account whose details were given to you by an Oracle instructor. + - This lab uses the command line application cURL for testing APIs; some familiarity is suggested. - This lab assumes you have completed all previous Labs. @@ -24,288 +25,377 @@ Estimated Lab Time: 20 minutes 1. You should still be logged in as the ADMIN user, if not, sign back in as the ADMIN and select the Administration tab from the LaunchPad. Then select the Database Users menu option. - ![Logged in as the Admin user](./images-new/1-launchpad-as-admin.png " ") + ![Logged in as the Admin user](./images/1-launchpad-as-admin.png " ") - ![Navigate to Database Users](./images-new/2-navigate-to-administration-db-users.png " ") + ![Navigate to Database Users](./images/2-navigate-to-administration-db-users.png " ") 2. From the User Management dashboard, select the **Create User** button. - ![Create new user button](./images-new/3-create-new-user.png " ") + ![Create new user button](./images/3-create-new-user.png " ") + +3. A Create User dialogue will appear. Choose a username and password that conforms to Oracle Autonomous AI database [password requirements](https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/manage-users-create.html#GUID-72DFAF2A-C4C3-4FAC-A75B-846CC6EDBA3F). -3. A Create User dialogu will appear. Use the name `ORDS101`, choose a password that conforms to Oracle database password requirements. + ![Above the fold, create user info](./images/4-create-new-user-dialogue.png " ") - ![Above the fold, create user info](./images-new/4-create-new-user-dialogue.png " ") +4. Use the Radio button to enable **REST, GraphQL, MongoDB API, and Web access**. Leave **REST Alias** unchanged. -4. Use the Radio button to enable **REST, GraphQL, MongoDB API, and Web access**. The REST Alias should remain unchanged. +5. The user will automatically be granted the `CONNECT` and `RESOURCE` roles. Select the `DB_DEVELOPER_ROLE` and `DWROLE` roles as well; ensure the `Default` field has been "checked". -5. The ORDS101 user will automatically be granted the `CONNECT` and `RESOURCE` roles. However, you can manually enable the new 23ai `DB_DEVELOPER_ROLE`, as this is an easy way to ensure a Developer user has many of the required roles aimed at the Oracle database developer user. Once complete, click the Create User button. +Once complete, click the **Create User** button. - ![Toggling the web access button](./images-new/5-toggle-web-access-button.png " ") + ![Toggling the web access button](./images/5-toggle-web-access-button.png " ") - ![Manually selecting the db_developer_role role](./images-new/6-add-db-developer-role-click-create-user.png " ") + ![Manually selecting the db_developer_role role](./images/6-add-db-developer-role-click-create-user.png " ") -## Task 2: Sign-in as the ORDS101 user +## Task 2: Sign-in as new user -1. After creating the ORDS101 user, you will be redirected back to the User Management dashboard. There you'll see a new card that includes the unique URL for the ORDS101 user. Click the icon to open the URL in a new tab. +1. From the User Management dashboard, you'll see a new card that includes the unique URL for the user. Click the Open in New Tab icon to open the URL in a new tab. - ![Linking out to ords101 users launchpad](./images-new/7-link-for-new-db-user.png " ") + ![Linking out to ords101 users launchpad](./images/7-link-for-new-db-user.png " ") -2. Sign-in with the ORDS101 credentials. +2. Sign-in with the user's credentials. - ![Linking out to ords101 users launchpad](./images-new/8-login-as-new-dev-user.png " ") + ![Linking out to ords101 users launchpad](./images/8-login-as-new-dev-user.png " ") 3. From the Database Actions LaunchPad, click the Development tab, followed by the SQL menu option. - ![Selecting sql from the launchpad](./images-new/9-launchpad-for-new-ords-user.png " ") + ![Selecting sql from the launchpad](./images/9-launchpad-for-new-ords-user.png " ") > **NOTE:** You will use this developer user for the remainder of the labs in this workshop. 4. You should now see the SQL Worksheet. If you are prompted for a Tour, you can proceed through the helpful tips, or exit the tour. Next, you'll populate your brand new schema with database objects. - ![Selecting sql from the launchpad](./images-new/10-new-sql-worksheet-screen.png " ") + ![Selecting sql from the launchpad](./images/10-new-sql-worksheet-screen.png " ") ## Task 3: Populate the schema -1. Next you'll populate your schema with the included code snippet. Copy the contents of the snippet and paste it into the SQL Worksheet code playground, then click the **Run Script** icon to execute the script. +1. Next, populate your schema with the included code snippet. Copy the contents of the snippet and paste it into the SQL Worksheet code playground, then click the **Run Script** icon to execute the script. - ![Clicking execute script button](./images-new/11-build-out-schema.png " ") - -
- (click) Sample prompt -

+
+ SQL Script +

```sql - -- ========================================== - -- CREATE TABLES - -- ========================================== - - -- DEPARTMENT table - - CREATE TABLE DEPARTMENT ( - DEPT_ID NUMBER GENERATED BY DEFAULT AS IDENTITY - CONSTRAINT DEPT_ID_PK PRIMARY KEY, - DEPT_CODE VARCHAR2(5) CONSTRAINT DEPT_CODE_NN NOT NULL, - ESTABLISHED DATE, - DETAILS JSON - ); - - CREATE UNIQUE INDEX DEPT_CODE_UK ON DEPARTMENT (DEPT_CODE); - - -- EMPLOYEE table - - CREATE TABLE EMPLOYEE ( - EMP_ID NUMBER GENERATED BY DEFAULT AS IDENTITY - CONSTRAINT EMP_ID_PK PRIMARY KEY, - EMP_NAME VARCHAR2(100) CONSTRAINT EMP_NAME_NN NOT NULL, - DEPT_ID NUMBER CONSTRAINT EMP_DEPT_ID_NN NOT NULL, - COMMENTS CLOB, - CONSTRAINT FK_EMPLOYEE_DEPT FOREIGN KEY (DEPT_ID) - REFERENCES DEPARTMENT (DEPT_ID) - ); - - CREATE INDEX EMP_DEPARTMENT_IX ON EMPLOYEE (DEPT_ID); - - -- PROJECT table - - CREATE TABLE PROJECT ( - PROJ_ID NUMBER GENERATED BY DEFAULT AS IDENTITY - CONSTRAINT PROJ_ID_PK PRIMARY KEY, - PROJ_NAME VARCHAR2(100) CONSTRAINT PROJ_NAME_NN NOT NULL, - DEPT_ID NUMBER CONSTRAINT PROJ_DEPT_ID_NN NOT NULL, - IS_ACTIVE BOOLEAN, - CONSTRAINT FK_PROJECT_DEPT FOREIGN KEY (DEPT_ID) - REFERENCES DEPARTMENT (DEPT_ID) - ); - - CREATE INDEX PROJ_DEPARTMENT_IX ON PROJECT (DEPT_ID); - - -- ========================================== - -- INSERT DATA - -- ========================================== - INSERT INTO DEPARTMENT (DEPT_CODE, ESTABLISHED, DETAILS) VALUES - ('HR001', DATE '2001-04-13', JSON_OBJECT('location' VALUE 'Bldg 1', 'members' VALUE 25)), - ('FN002', DATE '2002-06-20', JSON_OBJECT('location' VALUE 'Bldg 2', 'members' VALUE 20)), - ('EN003', DATE '2000-11-01', JSON_OBJECT('location' VALUE 'Bldg 3', 'members' VALUE 40)), - ('SA004', DATE '2005-01-15', JSON_OBJECT('location' VALUE 'Bldg 4', 'members' VALUE 18)), - ('MK005', DATE '2003-12-07', JSON_OBJECT('location' VALUE 'Bldg 5', 'members' VALUE 15)), - ('LG006', DATE '2010-03-31', JSON_OBJECT('location' VALUE 'Bldg 6', 'members' VALUE 5)), - ('IT007', DATE '2001-09-23', JSON_OBJECT('location' VALUE 'Bldg 7', 'members' VALUE 30)), - ('SP008', DATE '2015-05-05', JSON_OBJECT('location' VALUE 'Bldg 8', 'members' VALUE 12)), - ('LG009', DATE '2012-07-14', JSON_OBJECT('location' VALUE 'Bldg 9', 'members' VALUE 10)), - ('OP010', DATE '2008-08-01', JSON_OBJECT('location' VALUE 'Bldg 10', 'members' VALUE 22)); - - INSERT INTO PROJECT (PROJ_NAME, DEPT_ID, IS_ACTIVE) VALUES - ('Onboarding', 1, TRUE), - ('Audit2024', 2, FALSE), - ('NewApp', 3, TRUE), - ('SalesCampaign', 4, TRUE), - ('SocialMediaPush', 5, FALSE), - ('Compliance', 6, TRUE), - ('UpgradeInfra', 7, TRUE), - ('HelpdeskRevamp', 8, TRUE), - ('FleetUpdate', 9, TRUE), - ('ProcessReorg', 10, FALSE); - - INSERT INTO EMPLOYEE (EMP_NAME, DEPT_ID, COMMENTS) VALUES - ('Alice', 1, 'Strong analyst, quick learner.'), - ('Bob', 2, 'CPA certification in progress.'), - ('Carol', 3, 'Dev team lead for NewApp project.'), - ('David', 4, 'Consistent sales over target.'), - ('Eve', 5, 'Leads digital campaigns.'), - ('Frank', 6, 'Subject matter expert in compliance.'), - ('Grace', 7, 'Skilled in infrastructure upgrades.'), - ('Heidi', 8, 'Customer support supervisor.'), - ('Ivan', 9, 'Fleet manager - long tenure.'), - ('Judy', 10, 'Operations management veteran.'); - - -- ========================================== - -- PROCEDURE: PR_ADD_AND_ASSIGN_EMPLOYEE - -- ========================================== - CREATE OR REPLACE PROCEDURE ORDS101.PR_ADD_AND_ASSIGN_EMPLOYEE ( - p_emp_name IN VARCHAR2, -- Employee's name to be inserted - p_dept_code IN VARCHAR2, -- Department code (case-insensitive search) - p_comments IN CLOB -- Additional textual comments about the employee - ) AS - v_dept_id NUMBER; -- Variable to store the department ID once found - BEGIN - - SELECT dept_id INTO v_dept_id - FROM DEPARTMENT - WHERE UPPER(dept_code) = UPPER(p_dept_code); - - - INSERT INTO EMPLOYEE (emp_name, dept_id, comments) - VALUES (p_emp_name, v_dept_id, p_comments); - - - EXCEPTION - - WHEN NO_DATA_FOUND THEN - DBMS_OUTPUT.put_line( - 'Department code (DEPT_CODE) not found. Please use one of the following:' || - ' EN003, FN002, HR001, IT007, LG006, LG009, MK005, OP010, SA004, SP008 ' - ); - - WHEN OTHERS THEN - DBMS_OUTPUT.put_line('Error: ' || SQLERRM); - - END; - / - - - + + -- ========================================== + -- CREATE DEPARTMENT TABLE + -- Source: create_department_table.sql + -- ========================================== + CREATE TABLE "DEPARTMENT" + ( "DEPT_ID" NUMBER GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE , + "DEPT_CODE" VARCHAR2(5 BYTE) COLLATE "USING_NLS_COMP", + "ESTABLISHED" DATE, + "DETAILS" JSON + ) DEFAULT COLLATION "USING_NLS_COMP" ; + + CREATE UNIQUE INDEX "DEPT_CODE_UK" ON "DEPARTMENT" ("DEPT_CODE") + ; + + CREATE UNIQUE INDEX "DEPT_ID_PK" ON "DEPARTMENT" ("DEPT_ID") + ; + + CREATE UNIQUE INDEX "DEPARTMENT_DEPT_CODE_UQ" ON "DEPARTMENT" (UPPER("DEPT_CODE")) + ; + + ALTER TABLE "DEPARTMENT" MODIFY ("DEPT_ID" NOT NULL ENABLE); + + ALTER TABLE "DEPARTMENT" MODIFY ("DEPT_CODE" CONSTRAINT "DEPT_CODE_NN" NOT NULL ENABLE); + + ALTER TABLE "DEPARTMENT" ADD CONSTRAINT "DEPT_ID_PK" PRIMARY KEY ("DEPT_ID") + USING INDEX ENABLE; + + + -- ========================================== + -- CREATE EMPLOYEE TABLE + -- Source: create_employee_table.sql + -- ========================================== + CREATE TABLE "EMPLOYEE" + ( "EMP_ID" NUMBER GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE , + "EMP_NAME" VARCHAR2(100 BYTE) COLLATE "USING_NLS_COMP", + "DEPT_ID" NUMBER, + "COMMENTS" CLOB COLLATE "USING_NLS_COMP" + ) DEFAULT COLLATION "USING_NLS_COMP" ; + + CREATE UNIQUE INDEX "EMP_ID_PK" ON "EMPLOYEE" ("EMP_ID") + ; + + CREATE INDEX "EMP_DEPARTMENT_IX" ON "EMPLOYEE" ("DEPT_ID") + ; + + ALTER TABLE "EMPLOYEE" MODIFY ("EMP_ID" NOT NULL ENABLE); + + ALTER TABLE "EMPLOYEE" MODIFY ("EMP_NAME" CONSTRAINT "EMP_NAME_NN" NOT NULL ENABLE); + + ALTER TABLE "EMPLOYEE" MODIFY ("DEPT_ID" CONSTRAINT "EMP_DEPT_ID_NN" NOT NULL ENABLE); + + ALTER TABLE "EMPLOYEE" ADD CONSTRAINT "EMP_ID_PK" PRIMARY KEY ("EMP_ID") + USING INDEX ENABLE; + + ALTER TABLE "EMPLOYEE" ADD CONSTRAINT "FK_EMPLOYEE_DEPT" FOREIGN KEY ("DEPT_ID") + REFERENCES "DEPARTMENT" ("DEPT_ID") ENABLE; + + + -- ========================================== + -- CREATE PROJECT TABLE + -- Source: create_project_table.sql + -- ========================================== + CREATE TABLE "PROJECT" + ( "PROJ_ID" NUMBER GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE , + "PROJ_NAME" VARCHAR2(100 BYTE) COLLATE "USING_NLS_COMP", + "DEPT_ID" NUMBER, + "IS_ACTIVE" BOOLEAN + ) DEFAULT COLLATION "USING_NLS_COMP" ; + + CREATE UNIQUE INDEX "PROJ_ID_PK" ON "PROJECT" ("PROJ_ID") + ; + + CREATE INDEX "PROJ_DEPARTMENT_IX" ON "PROJECT" ("DEPT_ID") + ; + + ALTER TABLE "PROJECT" MODIFY ("PROJ_ID" NOT NULL ENABLE); + + ALTER TABLE "PROJECT" MODIFY ("PROJ_NAME" CONSTRAINT "PROJ_NAME_NN" NOT NULL ENABLE); + + ALTER TABLE "PROJECT" MODIFY ("DEPT_ID" CONSTRAINT "PROJ_DEPT_ID_NN" NOT NULL ENABLE); + + ALTER TABLE "PROJECT" ADD CONSTRAINT "PROJ_ID_PK" PRIMARY KEY ("PROJ_ID") + USING INDEX ENABLE; + + ALTER TABLE "PROJECT" ADD CONSTRAINT "FK_PROJECT_DEPT" FOREIGN KEY ("DEPT_ID") + REFERENCES "DEPARTMENT" ("DEPT_ID") ENABLE; + + -- ========================================== + -- INSERT DATA + -- Source: insert_data.sql + -- ========================================== + INSERT INTO DEPARTMENT (DEPT_CODE, ESTABLISHED, DETAILS) VALUES + ('HR001', DATE '2001-04-13', JSON_OBJECT('location' VALUE 'Bldg 1', 'members' VALUE 25)), + ('FN002', DATE '2002-06-20', JSON_OBJECT('location' VALUE 'Bldg 2', 'members' VALUE 20)), + ('EN003', DATE '2000-11-01', JSON_OBJECT('location' VALUE 'Bldg 3', 'members' VALUE 40)), + ('SA004', DATE '2005-01-15', JSON_OBJECT('location' VALUE 'Bldg 4', 'members' VALUE 18)), + ('MK005', DATE '2003-12-07', JSON_OBJECT('location' VALUE 'Bldg 5', 'members' VALUE 15)), + ('LG006', DATE '2010-03-31', JSON_OBJECT('location' VALUE 'Bldg 6', 'members' VALUE 5)), + ('IT007', DATE '2001-09-23', JSON_OBJECT('location' VALUE 'Bldg 7', 'members' VALUE 30)), + ('SP008', DATE '2015-05-05', JSON_OBJECT('location' VALUE 'Bldg 8', 'members' VALUE 12)), + ('LG009', DATE '2012-07-14', JSON_OBJECT('location' VALUE 'Bldg 9', 'members' VALUE 10)), + ('OP010', DATE '2008-08-01', JSON_OBJECT('location' VALUE 'Bldg 10', 'members' VALUE 22)); + COMMIT; + + INSERT INTO PROJECT (PROJ_NAME, DEPT_ID, IS_ACTIVE) VALUES + ('Onboarding', 1, TRUE), + ('Audit2024', 2, FALSE), + ('NewApp', 3, TRUE), + ('SalesCampaign', 4, TRUE), + ('SocialMediaPush', 5, FALSE), + ('Compliance', 6, TRUE), + ('UpgradeInfra', 7, TRUE), + ('HelpdeskRevamp', 8, TRUE), + ('FleetUpdate', 9, TRUE), + ('ProcessReorg', 10, FALSE); + COMMIT; + + INSERT INTO EMPLOYEE (EMP_NAME, DEPT_ID, COMMENTS) VALUES + ('Alice', 1, 'Strong analyst, quick learner.'), + ('Bob', 2, 'CPA certification in progress.'), + ('Carol', 3, 'Dev team lead for NewApp project.'), + ('David', 4, 'Consistent sales over target.'), + ('Eve', 5, 'Leads digital campaigns.'), + ('Frank', 6, 'Subject matter expert in compliance.'), + ('Grace', 7, 'Skilled in infrastructure upgrades.'), + ('Heidi', 8, 'Customer support supervisor.'), + ('Ivan', 9, 'Fleet manager - long tenure.'), + ('Judy', 10, 'Operations management veteran.'); + COMMIT; + + + -- ========================================== + -- CREATE PROCEDURE + -- Source: create_procedure.sql + -- ========================================== + CREATE OR REPLACE EDITIONABLE PROCEDURE "PR_ADD_AND_ASSIGN_EMPLOYEE" ( + p_emp_name IN VARCHAR2, + p_dept_code IN VARCHAR2, + p_comments IN CLOB + ) AS + l_dept_id department.dept_id%TYPE; + BEGIN + SELECT dept_id + INTO l_dept_id + FROM department + WHERE UPPER(dept_code) = UPPER(p_dept_code); + + INSERT INTO employee ( + emp_name, + dept_id, + comments + ) + VALUES ( + p_emp_name, + l_dept_id, + p_comments + ); + + EXCEPTION + WHEN NO_DATA_FOUND THEN + raise_application_error( + -20001, + 'Department code not found. Valid values: ' || + 'EN003, FN002, HR001, IT007, LG006, LG009, ' || + 'MK005, OP010, SA004, SP008' + ); + END; + / + + ``` -
-

+
+

-2. Click the Refresh button in the Navigator tab to refresh the Table objects. You should now see three new tables: + ![Clicking execute script button](./images/11-build-out-schema.png " ") - - `DEPARTMENT` - - `EMPLOYEE` - - `PROJECT` - -3. Right-click on the `PROJECT` table to reveal various context menu options. Select the **Open** option. New table details slider will appear. + 2. Click the Refresh button in the Navigator tab to refresh the Table objects. You'll see three new tables: - ![Right click on open option in the context menu](./images-new/13-right-click-project-object-open.png " ") + - `DEPARTMENT` + - `EMPLOYEE` + - `PROJECT` + + 3. Right-click on the `PROJECT` table. Select the **Open** option. A details slider will appear. -4. Click the **Data** tab review the `PROJECT` table data. You'll notice just 10 entries; in the next lab you'll use the ORDS `BATCHLOAD` REST API to significantly add to the entries. + ![Right click on open option in the context menu](./images/13-right-click-project-object-open.png " ") - ![Click data tab to review table data](./images-new/14-data-menu-review-rows.png " ") + 4. Click the **Data** tab to review the `PROJECT` table data. Later on, you'll insert additional data using the ORDS `BATCHLOAD` REST API. -5. Click the **Close** button, then right-click on the `PROJECT` table again and select **Edit**. + ![Click data tab to review table data](./images/14-data-menu-review-rows.png " ") - ![Click the edit option on the table context menu](./images-new/15-edit-option-review-object-characteristics.png " ") + 5. Click the **Close** button, right-click on the `PROJECT` table and select **Edit**. -6. Click the `DDL` tab, to review the fully formatted, and syntactically correct DDL that was used to create this table. You may explore additional details of the table. When finished, click the **Close** button. + ![Click the edit option on the table context menu](./images/15-edit-option-review-object-characteristics.png " ") - ![Click the edit option on the table context menu](./images-new/16-reviewing-object-ddl.png " ") + 6. Click the `DDL` tab, to review the fully formatted, and syntactically correct DDL for this table. When finished, click the **Close** button. -7. Next you'll use ORDS to AutoREST-enable the `PROJECT` table. + ![Click the edit option on the table context menu](./images/16-reviewing-object-ddl.png " ") -## Task 4: AutoREST-enable a table + 7. Next you'll use ORDS to AutoREST-enable the `PROJECT` table. -1. Right-click on the `PROJECT` table, select **REST**, then **Enable**. + ## Task 4: AutoREST-enable a table - ![Click the REST > Enable option](./images-new/17-rest-enabling-project-table.png " ") + 1. Right-click on the `PROJECT` table, select **REST**, then **Enable**. -2. A new REST Enable Object slider will appear. ORDS automatically generates an API endpoint for you, along with the Roles and Privileges associated with this new resource. You can select a new **Object Alias**; but for this lab keep the default Alias. You can also toggle the **Show Code** radio button to reveal the PL/SQL procedure that ORDS will execute to REST-enable this table. Once satisfied, click **Enable**. Congratulations, you've just created your first ORDS API. + ![Click the REST > Enable option](./images/17-rest-enabling-project-table.png " ") - ![The REST Enable Object slider](./images-new/18-rest-enable-table-dialogue.png " ") + 2. A new REST Enable Object slider will appear. ORDS automatically generates an API endpoint for you, along with the Roles and Privileges associated with this new resource. You can select a new **Object Alias**; but for this lab keep the default Alias. You can also toggle the **Show Code** radio button to reveal the PL/SQL procedure that ORDS will execute to REST-enable this table. Once satisfied, click **Enable**. -3. You'll notice a new plug icon on the table, this indicates that the database object is now REST-enabled (i.e., it is associated with a URI for HTTP/S requests). Right-click on the `PROJECT` table, scroll to **REST**, and select the new menu item: **cURL command**. + ![The REST Enable Object slider](./images/18-rest-enable-table-dialogue.png " ") - ![Selecting cURL command on the context menu](./images-new/19-curl-command-option.png " ") + 3. You'll notice a new plug icon on the table, this indicates that the database object is now REST-enabled (i.e., it is associated with an URI for HTTP/S requests). Right-click on the `PROJECT` table, scroll to **REST**, and select the new **cURL command** menu item. -4. You'll see the new ORDS API endpoints that were automatically created for you: `GET ALL`, `GET Single`, `POST`, `BATCH LOAD`, `PUT`, and `DELETE`. The definitions, and procedures for these methods/operations are all securly stored and executed on the Oracle database; nothing is saved in your application layer. Highlight or copy the URI for the `GET ALL` endpoint and open it in a new browser tab or window. + ![Selecting cURL command on the context menu](./images/19-curl-command-option.png " ") - ![Opening GET ALL in a new browser tab](./images-new/20-go-to-address-in-new-tab.png " ") + 4. ORDS API endpoints are automatically created for you: `GET ALL`, `GET Single`, `POST`, `BATCH LOAD`, `PUT`, and `DELETE`. The definitions, and procedures for these methods/operations are all securely stored and executed on the Oracle database; nothing is saved in your application layer. Highlight or copy the URI for the `GET ALL` endpoint and open it in a new browser tab or window. -5. You'll see the JSON payload that was requested as a result of visiting that GET ALL endpoint. By visiting that endpoint you've effectively just accomplised something similar to logging into the database and executing something similar to the following: + ![Opening GET ALL in a new browser tab](./images/20-go-to-address-in-new-tab.png " ") - ```sql - SELECT * - FROM PROJECT - ORDER BY PROJ_ID - OFFSET 0 ROWS FETCH NEXT 25 ROWS ONLY; - ``` + 5. Notice the JSON payload of the `GET ALL` endpoint. The results on screen are analagous to executing something like this: + + ```sql + SELECT * FROM PROJECT ORDER BY PROJ_ID OFFSET 0 ROWS FETCH NEXT 25 ROWS ONLY; + ``` - ![Using inspect in the browser's developer tools](./images-new/21-inspect-browser-network-tab.png " ") + ![Using inspect in the browser's developer tools](./images/21-inspect-browser-network-tab.png " ") -6. In fact, you've accomplished a great deal more than that. From your browser's Developer/Inspect tools, navigate to the Network tab, and adjust the page's response to view the Object Tree. In addition to `FETCHING` the first 25 rows, an ORDS AutoREST-enabled endpoint also includes links for each of the results (for an indiviual row), the total `count` (`10`) of the results of the payload (`items:Array`), the `limit` used (`25` is the ORDS default), the `offset` (`0`), and two more special properties: `hasMore` and `links:Array`. + 6. Open your brower's Developer/Inspect tools, navigate to the Network tab, and adjust the page's response to view the Object Tree. In addition to `FETCHING` the first 25 rows, an ORDS AutoREST-enabled endpoint also includes links for each of the results (for an indiviual row), the total `count` (`10`) of the results of the payload (`items:Array`), the `limit` used (`25` is the ORDS default), the `offset` (`0`), and two more special properties: `hasMore` and `links:Array`. - The `hasMore: Boolean` informs a client if more results exist past the initial 25; allowing you to programmatically scale the results using this condition plus the `limit` and `offset` for finer grain control and easier pagination. + - `hasMore: Boolean` - informs a client if more results exist past the initial 25; allowing you to programmatically scale the results using this condition plus `limit` and `offset` for finer grain control and easier pagination. + - `links:Array` - provides self-describing and self-referring links + - `first` points to the first set of results (1-25) + - larger results sets would include `next` and `previous` links too - The `links:Array` is a powerful property. The links therein are self-describing and self-referring; like the `first` link, which points to the first set of results (1-25). And in larger results sets you'd find `next` and `previous` links too. + ![Reviewing the Response Object Tree](./images/22-object-tree-view.png " ") - ![Reviewing the Response Object Tree](./images-new/22-object-tree-view.png " ") + 7. Return to the SQL Worksheet. The **cURL for the table PROJECT** slider should still be visible, if not review the instructions in Step 3 above. Click the `BATCH LOAD` tab, choose the appropriate shell environment, and copy the `BATCH LOAD` cURL command to your clipboard. -7. Once you've finished exploring, close out this tab, and return the the SQL Worksheet. + ![Copying the BATCHLOAD URI](./images/23-prepare-for-batchload.png " ") -8. The **cURL for the table PROJECT** slider should still be visible, if not review the instructions in Step 3 above. Click the `BATCH LOAD` tab, choose the appropriate shell environment, and copy the `BATCH LOAD` cURL command to your clipboard. + 8. You'll use this `BATCH LOAD` endpoint to perform a bulk insert on the `PROJECT` table via an HTTP request. - ![Copying the BATCHLOAD URI](./images-new/23-prepare-for-batchload.png " ") + ## Task 5: Using the ORDS BATCH LOAD endpoint -9. Next you'll use this `BATCH LOAD` endpoint to perform a bulk insert on the `PROJECT` table via an HTTP request. + 1. This `BATCH LOAD` example uses cURL to simulate a client application executing/recieving HTTP requests/responses. In a text editor, paste the example `BATCHLOAD` cURL command you copied from the previous lab. -## Task 5: Using the ORDS BATCH LOAD endpoint + ![Copying the BATCHLOAD URI](./images/23-prepare-for-batchload.png " ") -1. This `BATCH LOAD` example uses cURL to simulate using a client application for executing and recieving HTTP requests and responses. In a text editor, paste the example `BATCHLOAD` cURL command you copied from the previous lab. + ![Unedited batchload curl command](./images/24-unedited-batchload-curl-command.png " ") - ![Copying the BATCHLOAD URI](./images-new/23-prepare-for-batchload.png " ") + 2. Retrieve the sample payload via [this link](https://c4u04.objectstorage.us-ashburn-1.oci.customer-oci.com/p/EcTjWk2IuZPZeNnD_fYMcgUhdNDIDA6rt9gaFj_WZMiL7VvxPBNMY60837hu5hga/n/c4u04/b/livelabsfiles/o/developer-library/batchload_directory.zip) that you'll use for testing this `BATCH LOAD` endpoint. Unzip the .zip file if this did not occur automatically. - ![Unedited batchload curl command](./images-new/24-unedited-batchload-curl-command.png " ") + 3. Once downloaded, copy the filepath details to use in the `--data-binary` option of the cURL command. In this example, the .csv file is located at: `/Users/me/Downloads/project_batchload.csv`. -2. Retrieve the sample payload via [this link](https://c4u04.objectstorage.us-ashburn-1.oci.customer-oci.com/p/EcTjWk2IuZPZeNnD_fYMcgUhdNDIDA6rt9gaFj_WZMiL7VvxPBNMY60837hu5hga/n/c4u04/b/livelabsfiles/o/developer-library/batchload_directory.zip) that you'll use for testing this `BATCH LOAD` endpoint. Unzip the .zip file if this did not occur automatically. + ```shell + + curl -v -i -X POST + -H "Content-Type: text/csv" + "https://my-ocid-db-name.adb.my-region-1.oraclecloudapps.com/ords/ords101/project/batchload" + --data-binary "@\Users\me\Downloads\project_batchload.csv" + + ``` -3. Once downloaded, copy the filepath details to use in the `--data-binary` option of the cURL command. In this example, the .csv file is located at: `/Users/me/Downloads/project_batchload.csv`. +
+ Learn about the available BATCHLOAD parameters +

- > **IMPORTANT:** Your Command Prompt or Power Shell sample cURL Command may default to `-d` `--data` instead of `--data-binary`. Windows users should use a cURL command as seen in this example: + You may optionally pass reserved `BATCHLOAD` URL query parameters. in your `POST` request. Available parameters include: - ```shell - - curl -v -X POST ^ - -H "Content-Type: text/csv" ^ - "https://my-ocid-db-name.adb.my-region-1.oraclecloudapps.com/ords/ords101/project/batchload" ^ - --data-binary "@\Users\me\Downloads\project_batchload.csv" - + | Parameter | Description | URL example | Details / unencoded value | + |---|---|---|---| + | `batchesPerCommit` | Commit frequency after batches are sent to the database. Default: every 10 batches. `0` defers commit until the end of the load. Integer. | `?batchesPerCommit=10` | `10` is the literal integer value. | + | `batchRows` | Number of rows in each batch sent to the database. Default: 50. Integer. | `?batchRows=1000` | `1000` is the literal integer value. | + | `dateFormat` | Format mask used to convert input values for `DATE` columns. | `?dateFormat=YYYY-MM-DD` | Unencoded value: `YYYY-MM-DD`. | + | `delimiter` | Field delimiter for the input file. Default: comma (`,`). | `?delimiter=%2C`
`?delimiter=%7C` | `%2C` = `,` (comma); `%7C` = `|` (pipe). | + | `enclosures` | Character(s) enclosing each field. Default: double quote (`"`). One character is used for both sides; two characters specify left then right enclosures. | `?enclosures=%22`
`?enclosures=%27%22` | `%22` = `"`; both left and right enclosures are double quotes.
`%27%22` = `'"`; left is `'`, right is `"`. | + | `embeddedRightDouble` | Controls handling of two consecutive right-enclosure characters inside an enclosed field. `true` treats them as one literal enclosure; `false` treats them as an error. | `?embeddedRightDouble=true` | `true` is the literal Boolean value. | + | `encoding` | Character encoding of the input file. Default: `UTF8`. | `?encoding=UTF-8` | Unencoded value: `UTF-8`. | + | `errors` | Maximum row errors allowed before terminating the load, subject to the service-level `db.batchload.errorsMax` limit. `0` allows no errors; `UNLIMITED` / `-1` allows errors up to the service limit. | `?errors=0`
`?errors=UNLIMITED` | `0` is the literal integer value; `UNLIMITED` is the literal keyword. | + | `lineEnd` | Input record terminator. Omit it when the file uses standard `\\r`, `\\r\\n`, or `\\n` endings. | `?lineEnd=%0A`
`?lineEnd=%0D%0A` | `%0A` = line feed (`LF`, `\\n`).
`%0D%0A` = carriage return + line feed (`CRLF`, `\\r\\n`). | + | `lineMax` | Maximum line length used to recognize rows in the stream. Default: unlimited. | `?lineMax=4096`
`?lineMax=UNLIMITED` | `4096` is a literal integer; `UNLIMITED` is the literal keyword. | + | `locale` | Locale used for locale-sensitive loader parsing and formatting. | `?locale=en-US` | Unencoded value: `en-US`. | + | `responseEncoding` | Encoding of the loader response stream. | `?responseEncoding=UTF-8` | Unencoded value: `UTF-8`. | + | `responseFormat` | Format of loader messages and bad-data output. Valid values: `RAW`, `SQL`. Default: `RAW`. | `?responseFormat=RAW` | `RAW` is the literal keyword. | + | `timestampFormat` | Format mask used to convert input values for `TIMESTAMP` columns. | `?timestampFormat=YYYY-MM-DD%22T%22HH24%3AMI%3ASS` | Unencoded value: `YYYY-MM-DD"T"HH24:MI:SS`. `%22` = `"`, `%3A` = `:`. | + | `timestampTZFormat` | Format mask used to convert input values for `TIMESTAMP WITH TIME ZONE` columns. | `?timestampTZFormat=YYYY-MM-DD%22T%22HH24%3AMI%3ASSTZH%3ATZM` | Unencoded value: `YYYY-MM-DD"T"HH24:MI:SSTZH:TZM`. `%22` = `"`, `%3A` = `:`. | + | `truncate` | Whether to delete existing table rows before loading. `false` (default) retains them; `true` uses `DELETE`; `truncate` uses `TRUNCATE TABLE`. | `?truncate=true`
`?truncate=truncate` | `true` is the literal Boolean value; `truncate` is the literal keyword. |eibccddubtfcttnlbdvefekfejdcnkhdniktnddfgilr + + **A combined example** + + ```text + /ords/hr/employees/batchload?truncate=true&batchRows=1000&batchesPerCommit=10&errors=0&dateFormat=YYYY-MM-DD&encoding=UTF-8&delimiter=%2C&lineEnd=%0A&enclosures=%22&embeddedRightDouble=true ``` +> **Reminder:** Percent-encode URL-reserved characters; double quote → `%22`, comma → `%2C`, pipe → `%7C`, line feed → `%0A`, carriage return/line feed (CRLF) → `%0D%0A`, etc. +
+

+ 4. In your text editor replace `` with `text/csv` and `--data-binary @` with your own file path. Optionally you may include other cURL options like those in the example. - ![Edited batchload curl command](./images-new/25-batchload-curl-command-with-edits.png " ") + ![Edited batchload curl command](./images/25-batchload-curl-command-with-edits.png " ") - > **NOTE:** Your `BATCHLOAD` URI will differ as well. File paths for macOS/Linux and Windows differ; double check your complete cURL command. + > **NOTE:** Your `BATCHLOAD` URI will differ as well. File paths for macOS/Linux and Windows differ; double check your complete cURL command. 5. Execute the `BATCH LOAD` request. After a few moments the results of the operation will appear in your terminal. - ![Unedited batchload curl command](./images-new/26-completed-batchload-command.png " ") + ![Unedited batchload curl command](./images/26-completed-batchload-command.png " ") + +6. You've just inserted an additional 5,000,000 records into the Project table using this ORDS `BATCH LOAD` API. Execute a `Select count(*) from PROJECT;` query to review the new total entries in the `PROJECT` table. -6. You've just inserted an additional 5,000,000 records into the Project table using this ORDS `BATCH LOAD` API! Optionally, navigate to the SQL Worksheet and execute a `Select count(*) from PROJECT` query to review the new total entries in the `PROJECT` table. + ```sql + + Select count(*) from PROJECT; + + ``` - ![Select count from PROJECT table](./images-new//27-count-from-project-table.png " ") + ![Select count from PROJECT table](./images//27-count-from-project-table.png " ") -7. You've just performed a massive insert using a single AutoREST-enabled endpoint. In the next lab you'll see how easy it is to take your existing PL/SQL and create your own custom ORDS APIs. +7. In the next lab you'll see how easy it is to take your existing PL/SQL and create your own custom ORDS APIs. You may now [proceed to the next lab](#next). @@ -318,4 +408,4 @@ You may now [proceed to the next lab](#next). ### Last Updated By/Date -- Chris Hoina, October 2025 +- Chris Hoina, September 2026 diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/6-add-db-developer-role-click-create-user.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/6-add-db-developer-role-click-create-user.png deleted file mode 100644 index dfa85b005..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/6-add-db-developer-role-click-create-user.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/1-launchpad-as-admin.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/1-launchpad-as-admin.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/1-launchpad-as-admin.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/1-launchpad-as-admin.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/10-new-sql-worksheet-screen.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/10-new-sql-worksheet-screen.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/10-new-sql-worksheet-screen.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/10-new-sql-worksheet-screen.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/11-build-out-schema.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/11-build-out-schema.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/11-build-out-schema.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/11-build-out-schema.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/12-refreshing-navigator-tab.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/12-refreshing-navigator-tab.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/12-refreshing-navigator-tab.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/12-refreshing-navigator-tab.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/13-right-click-project-object-open.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/13-right-click-project-object-open.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/13-right-click-project-object-open.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/13-right-click-project-object-open.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/14-data-menu-review-rows.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/14-data-menu-review-rows.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/14-data-menu-review-rows.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/14-data-menu-review-rows.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/15-edit-option-review-object-characteristics.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/15-edit-option-review-object-characteristics.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/15-edit-option-review-object-characteristics.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/15-edit-option-review-object-characteristics.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/16-reviewing-object-ddl.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/16-reviewing-object-ddl.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/16-reviewing-object-ddl.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/16-reviewing-object-ddl.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/17-rest-enabling-project-table.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/17-rest-enabling-project-table.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/17-rest-enabling-project-table.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/17-rest-enabling-project-table.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/18-rest-enable-table-dialogue.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/18-rest-enable-table-dialogue.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/18-rest-enable-table-dialogue.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/18-rest-enable-table-dialogue.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/19-curl-command-option.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/19-curl-command-option.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/19-curl-command-option.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/19-curl-command-option.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/2-navigate-to-administration-db-users.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/2-navigate-to-administration-db-users.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/2-navigate-to-administration-db-users.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/2-navigate-to-administration-db-users.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/20-go-to-address-in-new-tab.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/20-go-to-address-in-new-tab.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/20-go-to-address-in-new-tab.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/20-go-to-address-in-new-tab.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/21-inspect-browser-network-tab.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/21-inspect-browser-network-tab.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/21-inspect-browser-network-tab.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/21-inspect-browser-network-tab.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/22-object-tree-view.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/22-object-tree-view.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/22-object-tree-view.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/22-object-tree-view.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/23-prepare-for-batchload.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/23-prepare-for-batchload.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/23-prepare-for-batchload.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/23-prepare-for-batchload.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/24-unedited-batchload-curl-command.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/24-unedited-batchload-curl-command.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/24-unedited-batchload-curl-command.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/24-unedited-batchload-curl-command.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/25-batchload-curl-command-with-edits.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/25-batchload-curl-command-with-edits.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/25-batchload-curl-command-with-edits.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/25-batchload-curl-command-with-edits.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/26-completed-batchload-command.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/26-completed-batchload-command.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/26-completed-batchload-command.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/26-completed-batchload-command.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/27-count-from-project-table.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/27-count-from-project-table.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/27-count-from-project-table.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/27-count-from-project-table.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/3-create-new-user.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/3-create-new-user.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/3-create-new-user.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/3-create-new-user.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/4-create-new-user-dialogue.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/4-create-new-user-dialogue.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/4-create-new-user-dialogue.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/4-create-new-user-dialogue.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/5-toggle-web-access-button.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/5-toggle-web-access-button.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/5-toggle-web-access-button.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/5-toggle-web-access-button.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/6-add-db-developer-role-click-create-user.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/6-add-db-developer-role-click-create-user.png new file mode 100644 index 000000000..b66f9a836 Binary files /dev/null and b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/6-add-db-developer-role-click-create-user.png differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/7-link-for-new-db-user.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/7-link-for-new-db-user.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/7-link-for-new-db-user.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/7-link-for-new-db-user.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/8-login-as-new-dev-user.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/8-login-as-new-dev-user.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/8-login-as-new-dev-user.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/8-login-as-new-dev-user.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/9-launchpad-for-new-ords-user.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/9-launchpad-for-new-ords-user.png similarity index 100% rename from build-ords-apis-in-adb/1-create-user-and-database-objects/images-new/9-launchpad-for-new-ords-user.png rename to build-ords-apis-in-adb/1-create-user-and-database-objects/images/9-launchpad-for-new-ords-user.png diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/access-sql-worksheet-from-oci-console.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/access-sql-worksheet-from-oci-console.png deleted file mode 100644 index 06531d931..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/access-sql-worksheet-from-oci-console.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/adb-details-open-sql-developer-web.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/adb-details-open-sql-developer-web.png deleted file mode 100644 index dde871cb2..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/adb-details-open-sql-developer-web.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/adb-details-tools-action.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/adb-details-tools-action.png deleted file mode 100644 index 8e1229ffc..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/adb-details-tools-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/bash-curl-command.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/bash-curl-command.png deleted file mode 100644 index 1a55a3847..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/bash-curl-command.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-data-load-button-to-load-new-table.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-data-load-button-to-load-new-table.png deleted file mode 100644 index 4a33c526f..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-data-load-button-to-load-new-table.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-finish-for-data-load.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-finish-for-data-load.png deleted file mode 100644 index d814f99ae..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-finish-for-data-load.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-for-sql-worksheet.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-for-sql-worksheet.png deleted file mode 100644 index 67fd25aec..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-for-sql-worksheet.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-settings-option-from-kebab-menu-in-data-load-slider.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-settings-option-from-kebab-menu-in-data-load-slider.png deleted file mode 100644 index 77d3ca7e5..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-settings-option-from-kebab-menu-in-data-load-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-the-upload-button-once-checked-for-accuracy.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-the-upload-button-once-checked-for-accuracy.png deleted file mode 100644 index cfaaebcd2..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/click-the-upload-button-once-checked-for-accuracy.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/command-prompt-curl-command.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/command-prompt-curl-command.png deleted file mode 100644 index 6fcba8463..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/command-prompt-curl-command.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/copy-curl-command-action.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/copy-curl-command-action.png deleted file mode 100644 index 21cde6f3e..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/copy-curl-command-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/copy-icon.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/copy-icon.png deleted file mode 100644 index 1de018684..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/copy-icon.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/curl-in-new-browser-tab-or-window.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/curl-in-new-browser-tab-or-window.png deleted file mode 100644 index f3fd1fca5..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/curl-in-new-browser-tab-or-window.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-column-layout-preview.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-column-layout-preview.png deleted file mode 100644 index 3e209c741..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-column-layout-preview.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-load-area.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-load-area.png deleted file mode 100644 index 3c04af0ac..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-load-area.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-load-results-tab.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-load-results-tab.png deleted file mode 100644 index 9d131842d..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-load-results-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-load-tab.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-load-tab.png deleted file mode 100644 index 63dd2610b..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-load-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-preview-click-next.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-preview-click-next.png deleted file mode 100644 index 90ae8fc05..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/data-preview-click-next.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/drag-and-drop-csv-file-into-data-load-slider.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/drag-and-drop-csv-file-into-data-load-slider.png deleted file mode 100644 index bdebe68b3..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/drag-and-drop-csv-file-into-data-load-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/file-load-modal.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/file-load-modal.png deleted file mode 100644 index 0192e2775..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/file-load-modal.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/final-review-column-mapping.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/final-review-column-mapping.png deleted file mode 100644 index 737905e39..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/final-review-column-mapping.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/final-review-data-load.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/final-review-data-load.png deleted file mode 100644 index 1c554e03a..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/final-review-data-load.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/first-time-logging-in-to-sql-worksheet-as-admin-user.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/first-time-logging-in-to-sql-worksheet-as-admin-user.png deleted file mode 100644 index c22510009..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/first-time-logging-in-to-sql-worksheet-as-admin-user.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/navigating-reviewing-new-table.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/navigating-reviewing-new-table.png deleted file mode 100644 index 705acd984..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/navigating-reviewing-new-table.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/open-in-new-tab.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/open-in-new-tab.png deleted file mode 100644 index b1ad275f8..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/open-in-new-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/plug-icon.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/plug-icon.png deleted file mode 100644 index 569437cc5..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/plug-icon.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/powershell-curl-command.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/powershell-curl-command.png deleted file mode 100644 index f319d5d1c..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/powershell-curl-command.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/rest-enable-slider-context.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/rest-enable-slider-context.png deleted file mode 100644 index 0a95b6201..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/rest-enable-slider-context.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/rest-enabling-table.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/rest-enabling-table.png deleted file mode 100644 index c2beb170c..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/rest-enabling-table.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/retrieve-curl-command-for-object.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/retrieve-curl-command-for-object.png deleted file mode 100644 index 42aba90d8..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/retrieve-curl-command-for-object.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/review-ddl-code.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/review-ddl-code.png deleted file mode 100644 index 2b981cdc6..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/review-ddl-code.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/review-the-csv-data-before-reviewing-datatype-info.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/review-the-csv-data-before-reviewing-datatype-info.png deleted file mode 100644 index 78620bbf2..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/review-the-csv-data-before-reviewing-datatype-info.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/reviewing-datatype-info-for-new-csv-table.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/reviewing-datatype-info-for-new-csv-table.png deleted file mode 100644 index 87002011f..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/reviewing-datatype-info-for-new-csv-table.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/select-files-option.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/select-files-option.png deleted file mode 100644 index ee39cce62..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/select-files-option.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/set-columns-to-varchar2.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/set-columns-to-varchar2.png deleted file mode 100644 index f5722654d..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/set-columns-to-varchar2.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/table-options-slider.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/table-options-slider.png deleted file mode 100644 index 09e6892e4..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/table-options-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/three-dot-pop.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/three-dot-pop.png deleted file mode 100644 index 1f724d0e0..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/three-dot-pop.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/uploaded-success-screen-in-data-load-slider.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/uploaded-success-screen-in-data-load-slider.png deleted file mode 100644 index 853cf5a25..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/uploaded-success-screen-in-data-load-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/uploading-data-modal-dialog.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/uploading-data-modal-dialog.png deleted file mode 100644 index 1f0c750d8..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/uploading-data-modal-dialog.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/using-navigator-to-find-table.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/using-navigator-to-find-table.png deleted file mode 100644 index 6303c7492..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/using-navigator-to-find-table.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/viewing-results-from-table-in-browser-and-dev-tools.png b/build-ords-apis-in-adb/1-create-user-and-database-objects/images/viewing-results-from-table-in-browser-and-dev-tools.png deleted file mode 100644 index a2120e1e1..000000000 Binary files a/build-ords-apis-in-adb/1-create-user-and-database-objects/images/viewing-results-from-table-in-browser-and-dev-tools.png and /dev/null differ diff --git a/build-ords-apis-in-adb/1-create-user-and-database-objects/notes.txt b/build-ords-apis-in-adb/1-create-user-and-database-objects/notes.txt deleted file mode 100644 index 724ce8255..000000000 --- a/build-ords-apis-in-adb/1-create-user-and-database-objects/notes.txt +++ /dev/null @@ -1,2 +0,0 @@ -Task 1, step 5 - CSV data is missing -Is this the correct URL? https://c4u04.objectstorage.us-ashburn-1.oci.customer-oci.com/p/EcTjWk2IuZPZeNnD_fYMcgUhdNDIDA6rt9gaFj_WZMiL7VvxPBNMY60837hu5hga/n/c4u04/b/livelabsfiles/o/developer-library/csv_data.csv \ No newline at end of file diff --git a/build-ords-apis-in-adb/2-build-ords-apis/build-ords-apis.md b/build-ords-apis-in-adb/2-build-ords-apis/build-ords-apis.md index 94f0e8251..aa35c630f 100644 --- a/build-ords-apis-in-adb/2-build-ords-apis/build-ords-apis.md +++ b/build-ords-apis-in-adb/2-build-ords-apis/build-ords-apis.md @@ -2,7 +2,7 @@ ## Introduction -In this lab, you will use the SQL Worksheet and the REST Workshop to build ORDS REST API using a parameterized PL/SQL procedure and SQL statement. You'll also test these APIs in cURL. +In this lab, you will use the SQL Worksheet and the REST Workshop to build ORDS REST APIs. The APIs will each expose a parameterized PL/SQL procedure and a SQL statement. You'll also test these APIs in cURL. Estimated Lab Time: 25 minutes @@ -14,70 +14,56 @@ Estimated Lab Time: 25 minutes - Test ORDS APIs in cURL ### Prerequisites - + - The following lab requires an [Oracle Cloud account](https://www.oracle.com/cloud/free/). You may use your own cloud account, a cloud account that you obtained through a trial, or a training account whose details were given to you by an Oracle instructor. + - This lab uses the command line application cURL for testing APIs; some familiarity is suggested. - This lab assumes you have completed all previous Labs. ## Task 1: Review provided code snippets -1. In Lab 1, you created sample database objects. Among those objects was a PL/SQL Procedure. The PL/SQL procedure, along with sample SQL will both be used when creating your ORDS Handler code. +1. In this Lab, you'll create two custom APIs. One is based on SQL (which you'll execute shortly) the other based on the PL/SQL Procedure that was created in Lab 1; Task 3. -2. It would be helpful to understand both the SQL and PL/SQL prior to constructing your ORDS APIs. Navigate back to the SQL Worksheet. +2. As your development user, navigate back to the SQL Worksheet. 3. Copy and paste the following snippet into a new worksheet: ```sql - SELECT - PROJ_ID, - PROJ_NAME, - DEPT_ID, - IS_ACTIVE - FROM - PROJECT - WHERE - DEPT_ID = 9 - AND IS_ACTIVE = TRUE; - + SELECT PROJ_ID, PROJ_NAME, DEPT_ID, IS_ACTIVE FROM PROJECT WHERE DEPT_ID = 9 AND IS_ACTIVE = TRUE; ``` - ![Pasting the sql in the worksheet](./images-new/1-testing-sql-in-sql-worksheet.png " ") - -4. Execute this sample SQL using either the Run Statement or Run Script button. You'll see the results of the query in the **Query Result** or **Script Output** tabs. This should provide you with a good idea of what this SQL does: returns the `PROJ_ID`, `PROJ_NAME`, `DEPT_ID`, and `IS_ACTIVE` for the given `DEPT_ID` and `BOOLEAN`. - - ![SQL execution results](./images-new/2-sql-execution-results.png " ") + ![Pasting the sql in the worksheet](./images/1-testing-sql-in-sql-worksheet.png " ") -5. Now, select Procedures from the Navigator dropdown menu. Right-click on the `PR_ADD_AND_ASSIGN_EMPLOYEE` procedure, and select **Open**. +4. Execute this sample SQL using either the Run Statement or Run Script button. The query results will appear in either the **Query Result** or **Script Output** tabs (depending no how the SQL was executed). These results contain the same data that will be returned for an API response; from an ORDS API that you'll create shortly. Results returned are: `PROJ_ID`, `PROJ_NAME`, `DEPT_ID`, and `IS_ACTIVE` for the given `DEPT_ID` and `BOOLEAN`. - ![Selecting the Plsql procedure](./images-new/3-selecting-plsql-procedure.png " ") + ![SQL execution results](./images/2-sql-execution-results.png " ") - ![Right click to open the Plsql procedure](./images-new/4-right-click-on-plsql-proc.png " ") +5. Next, select Procedures from the Navigator dropdown menu. Right-click on the `PR_ADD_AND_ASSIGN_EMPLOYEE` procedure, and select **Open**. -6. The definiton for the PL/SQL procedure will be visible in the SQL Worksheet. This produre expects the following parameters; `p_emp_name`, `p_dept_code` (associated with a `dept_id`), and `comments` then inserts values into the `Employee` table. + ![Selecting the Plsql procedure](./images/3-selecting-plsql-procedure.png " ") - ![Reviewing the PLSQL Procedure in the worksheet](./images-new/5-plsql-definition-in-sql-worksheet.png " ") + ![Right click to open the Plsql procedure](./images/4-right-click-on-plsql-proc.png " ") -7. Go back to the Navigator, and select Tables from the dropdown menu. Right-click on the Department table, then select Open. +6. The definiton for the PL/SQL procedure will be visible in the SQL Worksheet. This produre expects the following parameters: `p_emp_name`, `p_dept_code` (associated with a `dept_id`), and `comments`. It then inserts these values into the `Employee` table. - ![Right click on the Department table](./images-new/6-right-click-on-department-table.png " ") + ![Reviewing the PLSQL Procedure in the worksheet](./images/5-plsql-definition-in-sql-worksheet.png " ") -8. Review, and note down one of the valid values for the `DEPT_CODE`. Then open a new SQL Worksheet. +7. Next, you'll insert a new row into the `Employee` table, using this procedure. Take note of one of the available, valid Department Codes: `EN003, FN002, HR001, IT007, LG006, LG009, MK005, OP010, SA004, SP008`. - ![Reviewing valid dept_code names](./images-new/7-review-valid-names-for-dept-code.png " ") - -9. Use the following code snippet to insert a new record into the Employee table (replace name with your name, the value for the DEPT_CODE with the one you chose in the previous step, and include a comment describing yourself.): +8. Return to the SQL Worksheet. Use the following code snippet to insert a new record into the `Employee` table (replace name with your name, the value for the DEPT_CODE with a valid code, and include a comment describing yourself).: ```sql - BEGIN + + BEGIN pr_add_and_assign_employee('Chris', 'HR001', 'Overqualified intern.'); END; ``` - ![Code snippet to add a record](./images-new/8-code-snippet-to-add-record.png " ") + ![Code snippet to add a record](./images/8-code-snippet-to-add-record.png " ") 10. Use the **Run Script** button; you will see `PL/SQL procedure successfully completed.` in the Script Output. - ![Executing the code snippet](./images-new/9-executing-the-code-snippet.png " ") + ![Executing the code snippet](./images/9-executing-the-code-snippet.png " ") 11. You can then query for your record in the Employee table. Use the following code snippet (edit where needed): @@ -85,7 +71,7 @@ Estimated Lab Time: 25 minutes Select * from Employee where emp_name='Your name'; ``` - ![Reviewing the results of the procedure](./images-new/10-reviewing-the-latest-insert.png " ") + ![Reviewing the results of the procedure](./images/10-reviewing-the-latest-insert.png " ") 12. Now that you have a general idea of what the sample code accomplishes, its time to build your own ORDS endpoints. @@ -93,33 +79,33 @@ Estimated Lab Time: 25 minutes 1. Click the Hamburger menu in the upper left hand corner of your browser, then select **REST**. - ![Click hamburger then rest](./images-new/11-click-hamburger-then-rest.png " ") + ![Click hamburger then rest](./images/11-click-hamburger-then-rest.png " ") 2. You are now in the **REST** Workshop. Here is where you build and test your ORDS APIs. Click the **AUTOREST** card. - ![Click the autorest card](./images-new/12-click-the-autorest-card.png " ") + ![Click the autorest card](./images/12-click-the-autorest-card.png " ") 3. This is the table you AutoREST-enabled in a previous lab. Before you continue, take a look at the resources available to you (these apply to all of your modules). Right-click the kebab menu, then select **Export OpenAPI**. - ![Export OpenAPI on the project table](./images-new/13-autorest-table-project-export-open-api.png " ") + ![Export OpenAPI on the project table](./images/13-autorest-table-project-export-open-api.png " ") 4. You'll see a downloadable version of your API in the OpenAPI specification. This makes it easy for you to review, and share definitions. - ![The downloadable OpenAPI Export](./images-new/14-open-api-export-download.png " ") + ![The downloadable OpenAPI Export](./images/14-open-api-export-download.png " ") 5. Close the Export OpenAPI slider, click the kebab menu again and select **OpenAPI View**. - ![The OpenAPI view on Project table](./images-new/15-openapi-view-on-project.png " ") + ![The OpenAPI view on Project table](./images/15-openapi-view-on-project.png " ") 6. You will see an in-browser testing dashboard based on the OpenAPI specification. Here you can test your APIs without having to log into, or open a separate application. When satisfied, click the **Modules** tab at the top of the REST Workshop page. - ![OpenAPI view dashboard](./images-new/16-open-api-view-dashboard.png " ") + ![OpenAPI view dashboard](./images/16-open-api-view-dashboard.png " ") ## Task 3: Building an ORDS GET API 1. You'll now build your first two custom ORDS APIs. Click the **Create Module** button. - ![resource-modules-dashboard](./images-new/17-resource-modules-dashboard.png " ") + ![resource-modules-dashboard](./images/17-resource-modules-dashboard.png " ") 2. Next, enter in values of the Create Module slider. and click the **Create** button. Use the same values provided to make following along easier: @@ -128,157 +114,183 @@ Estimated Lab Time: 25 minutes - **Protected By Privilege:** `Not Protected` (Select from drop-down) - **Comments:** `An employee records management module consisting of various templates and handlers for performing operations on the following target tables: Department, Project, Employee.` - ![create-new-resource-module](./images-new/18-create-new-resource-module.png " ") + ![create-new-resource-module](./images/18-create-new-resource-module.png " ") 3. Now, click the Template button; this will ultimately be the URI for your ORDS API (where clients issue HTTP requests to). - ![Click create template](./images-new/19-click-create-template.png " ") + ![Click create template](./images/19-click-create-template.png " ") - Enter in the values provided and click **Create**: + Enter in the values provided and click **Create**: - - **URI Template:** `dept_active/:dept_id/:is_active` - - **Comments:** `An example template that will accept the query parameters dept_id and is_active. Relies on ORDS Automatic Binding to take the path parameters and use them in the provided handler code.` + - **URI Template:** `:dept_id/:is_active?` + - **Comments:** `An example template that will accept the query parameters dept_id and is_active. Relies on ORDS Automatic Binding to take the path parameters and use them in the provided handler code. The is_active bind paramater is an optional query parameter.` - ![Enter-template-details](./images-new/20-enter-template-details.png " ") + ![Enter-template-details](./images/20-enter-template-details.png " ") + + > **NOTE:** This Template illustrates two important ORDS features: Route Patterns (i.e., `/:dept_id/:is_active?`) and optional bind parameters (e.g. `:is_active?`). This pattern allows developers to pass parameters directly in the URI. Additionally, because an optional modifier (`?`) is used, this endpoint can either return all results matching a particular :dept_id, and/or those matching `true` or `false` for the `:is_active` parameter. [Learn More](https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/26.2/orddg/extending-ords-functionality-plugins.html#GUID-2F072246-B593-48A0-B47E-8605F7A1F725) -> **NOTE:** This Template illustrates a very powerful feature in ORDS: Route Patterns (i.e., `/:det_id/:is_active`). This pattern allows developers to pass parameters directly in the URI. You'll see this in action shortly. +4. Next, click the **Create Handler** button. When the Slider appears, select `GET`, `Collection Query`. -4. Next, click the **Create Handler** button. When the Slider appears, select `GET`, `Collection Query`, and use the following snippet for the Source, and click the **Create** button: + ![New handler button](./images/21-new-handlers-screen.png " ") - ![New handler button](./images-new/21-new-handlers-screen.png " ") + ![Adding details to the handler code](./images/22-adding-sql-to.png " ") - ![Adding details to the handler code](./images-new/22-adding-sql-to.png " ") +5. Use the following snippet for the Source, and click the **Create** button. ```sql - SELECT - PROJ_ID, - PROJ_NAME, - DEPT_ID, - IS_ACTIVE - FROM - PROJECT - WHERE - DEPT_ID = :dept_id - AND IS_ACTIVE = :is_active + + SELECT PROJ_ID, PROJ_NAME, DEPT_ID, IS_ACTIVE FROM PROJECT WHERE DEPT_ID = :dept_id AND (:is_active IS NULL OR IS_ACTIVE = :is_active); ``` -> **NOTE:** Notice how the the values for the Route Pattern are included in the Handler's source code. -5. You have just created your first ORDS API, a `GET` handler. Click the Open in new Tab button, you'll be prompted to enter in values for the Route Parameters. ORDS will bind these values of the URI to those in the Handler's SQL source code, satisfying the conditions of the `WHERE` clause. + > **NOTE:** Notice how the the values for the Route Pattern are included in the Handler's source code. ORDS will automatically *bind* these to the parameters in the Handler code. - ![Adding details to the handler code](./images-new/23-finished-handler-code.png " ") +6. You have just created your first ORDS API, a `GET` handler. Click the Open in new Tab button, you'll be prompted to enter in values for the Route Parameters. ORDS will bind these values of the URI to those in the Handler's SQL source code, satisfying the conditions of the `WHERE` clause. -6. Enter a value between `1` and `10` for `dept_id`, and use either `true` or `false` (`BOOLEAN`) for the `is_active` parameter. Then, select **OK**. + ![Adding details to the handler code](./images/23-finished-handler-code.png " ") - ![Pressing OK for a new tab](./images-new/24-enter-substitution-pressing-enter.png " ") +7. Enter a value between `1` and `10` for `dept_id`, and use`true`, `false`, or `Null` for the `is_active` parameter. Then, select **OK**. -7. A new browser tab will appear, with the results of your `GET` request. You can review the Response in the Object Tree format using your browser's developer/inspect tools. Notice the `links:Array` property; specifically the `self` link. Also, notice the URI includes those parameters you selected in the previous step (the same parameters that ORDS uses in the Handler source code). + ![Pressing OK for a new tab](./images/24-enter-substitution-pressing-enter.png " ") - ![GET results in the browser](./images-new/25-new-browser-window-sql-get-results.png " ") +8. A new browser tab will appear, with the results of your `GET` request. You can review the Response in the Object Tree format using your browser's developer/inspect tools. Notice the `links:Array` property; specifically the `self` link. Also, notice the URI includes those parameters you selected in the previous step (the same parameters that ORDS uses in the Handler source code). -8. When you are ready, return the the Handler dashboard. You can test this API in cURL too. Click the kebab menu of your Handler, and select **Get cURL command**. + ![GET results in the browser](./images/25-new-browser-window-sql-get-results.png " ") - ![curl-command-test](./images-new/26-curl-command-test.png " ") +9. When you are ready, return the the Handler dashboard. You can test this API in cURL too. Click the kebab menu of your Handler, and select **Get cURL command**. -9. Press the **+ plus** button, and enter in Substitution values for the cURL command (you can use the same ones as before). Then press **OK**. + ![curl-command-test](./images/26-curl-command-test.png " ") - ![Press plus for substitution values](./images-new/27-press-plus-button-get.png " ") +10. Press the **+ plus** button, and enter in Substitution values for the cURL command; this time select `Null` for the `:is_active` value. Then press **OK**. - ![Press OK for substitution values](./images-new/28-new-values-before-press-ok.png " ") + ![Press plus for substitution values](./images/27-press-plus-button-get.png " ") -10. Copy the cURL command, and paste it into a new Terminal window. You'll notice how your values have been appended to the URI of your ORDS API. Press **Enter** to execute the cURL command. + ![Press OK for substitution values](./images/28-new-values-before-press-ok.png " ") - ![Copying the curl command](./images-new/29-copying-the-curl-command-for-get.png " ") +11. Copy the cURL command, and paste it into a new Terminal window. Remove the `?` placeholder. Execute the cURL command. - ![curl command in terminal](./images-new/30-curl-command-in-terminal.png " ") + ![Copying the curl command](./images/29-copying-the-curl-command-for-get.png " ") -> **NOTE:** You can optionally pipe in the `jq` processer to pretty print your `JSON` response. + ![Removing the value placeholder](./images/30-1-removing-value-placeholder.png " ") -11. You should see the response payload in your terminal. Scroll down, and you will see the rest of the payload. Because this is a large results set, you'll see a `next` link in the `links` array (unlike what you observed in the AutoREST lab). + ![curl command in terminal](./images/30-curl-command-in-terminal.png " ") - ![Get response part one](./images-new/31-get-response-one.png " ") + > **NOTE:** You can optionally pipe in the `jq` processer to pretty print your `JSON` response. - ![Get response part two](./images-new/32-get-response-two.png " ") +12. You should see the response payload in your terminal. Because the optional `:is_active` parameter was removed, all relevant projects are returned. -12. In the next task you'll create a slightly more advanced `POST` endpoint. + ![Get response part one](./images/31-get-response-one.png " ") + +13. Scroll down, and you will see the remainder of the payload. Because this is a large results set, you'll see a `next` link in the `links` array. + + ![Get response part two](./images/32-get-response-two.png " ") + +14. In the next task you'll create a slightly more advanced `POST` endpoint. ## Task 4: Building an ORDS POST API 1. In this example, you'll build a slightly more advanced ORDS API. You'll use an Anonymous Block in your ORDS Handler code to execute the `PR_ADD_AND_ASSIGN_EMPLOYEE` PL/SL procedure. Using the breadcrumbs in the REST Workshop, return to the `records.module` Resource. - ![Resource module breadcrumbs](./images-new/33-breadcrumbs.png " ") + ![Resource module breadcrumbs](./images/33-breadcrumbs.png " ") 2. Click the **+ Create Template** button. Use `emp_recs` as the value for the **URI Template**, and click **Create**. - ![Creating the next template](./images-new/34-create-second-template-button.png " ") - - ![New values for the template](./images-new/35-entering-values-for-new-template.png " ") + ![Creating the next template](./images/34-create-second-template-button.png " ") -3. Click the **+ Create Handler** button, and in the Create Handler slider enter/select POST for the Method and the below source, then click the **Create** button: + ![New values for the template](./images/35-entering-values-for-new-template.png " ") - ![Values for the post handler](./images-new/36-creating-handler-for-post.png " ") +3. Click the **+ Create Handler** button, and in the Create Handler slider enter/select `POST` for the Method and the below source, then click the **Create** button. - ``` - BEGIN - PR_ADD_AND_ASSIGN_EMPLOYEE( - P_EMP_NAME => :EMP_NAME, - P_DEPT_CODE => :DEPT_CODE, - P_COMMENTS => :COMMENTS - ); - - :RESPONSE := '{"status":"success","message":"Employee added."}'; + ```sql + + DECLARE + L_SQLCODE PLS_INTEGER; + BEGIN + DEMO_USER.PR_ADD_AND_ASSIGN_EMPLOYEE( + P_EMP_NAME => :EMP_NAME, + P_DEPT_CODE => :DEPT_CODE, + P_COMMENTS => :COMMENTS + ); + + COMMIT; + :STATUS_CODE := 201; + :RESPONSE_STATUS := 'success'; + :RESPONSE_MESSAGE := 'Employee added.'; EXCEPTION - WHEN OTHERS THEN - :RESPONSE := '{"status":"error","message":"' - || REPLACE(SQLERRM, '"', '\"') - || '"}'; - END; + WHEN OTHERS THEN + L_SQLCODE := SQLCODE; + ROLLBACK; + :STATUS_CODE := + CASE + WHEN L_SQLCODE = - 20001 THEN + 400 + ELSE + 500 + END; + :RESPONSE_STATUS := 'error'; + :RESPONSE_MESSAGE := + CASE + WHEN L_SQLCODE = - 20001 THEN + 'Department code not found.' + ELSE + SQLERRM + END; + END; + ``` + ![Values for the post handler](./images/36-creating-handler-for-post.png " ") 4. For this example, you'll create an output Bind Parameter. Press the Parameters tab, then the **+ Create Parameter** button. - ![Clicking the parameter tab](./images-new/37-click-parameter-tab.png " ") + ![Clicking the parameter tab](./images/37-click-parameter-tab.png " ") - ![Clicking create parameter button](./images-new/38-click-create-parameter-button.png " ") + ![Clicking create parameter button](./images/38-click-create-parameter-button.png " ") -5. Enter the following values for the response Parameter, and click the **Create** button: - - **Parameter name:** `response` - - **Bind Variable Name:** `response` +5. Enter the following values for the `response_status` parameter, and click the **Create** button: + - **Parameter name:** `response_status` + - **Bind Variable Name:** `response_status` - **Source Type:** `Response` - **Parameter Type:** `STRING` - **Access Method:** `Output` - ![New parameter values](./images-new/39-parameter-values.png " ") + ![New parameter values](./images/39-parameter-values.png " ") + +6. Create a second parameter, called `response_message`. Use the following values: + - **Parameter name:** `response_message` + - **Bind Variable Name:** `response_message` + - **Source Type:** `Response` + - **Parameter Type:** `STRING` + - **Access Method:** `Output` -6. You'll see the new Output Bind Parameter in the Parameter tab. +6. Once created, the new parameters will be visible in the Parameter tab. - ![A new parameter row](./images-new/40-new-parameter-row.png " ") + ![A new parameter row](./images/40-new-parameter-rows.png " ") -7. You'll use this Bind Parameter (aka Handler Parameter) to send the responses/results of your ORDS API to your client application. +7. You'll use these Bind Parameters (aka Handler Parameter) to send the responses/results of your ORDS API to your client application. - ![Locating the new parameters](./images-new/41-locating-the-parameters.png " ") + ![Locating the new parameters](./images/41-locating-the-parameters.png " ") -> **NOTE:** The values have already been included in the sample Anonymous Block snippet, but simply clicking the Handler Parameter name will place the parameter value at the current location of your cursor. + > **NOTE:** The values have already been included in the sample Anonymous Block snippet, but simply clicking the Handler Parameter name will place the parameter value at the current location of your cursor. -8. Now, you can test this new POST API. From the Handler's kebab menu, select **Get cURL command**, then the **+ plus** button of the curl Command modal. A Substitutions modal will appear. Enter in values for `EMP_NAME`, `DEPT_CODE`, `COMMENTS`, and check Null for the `RESPONSE`. Be sure to review and select valid values for the `DEPT_CODE`. Once finished, click **OK**. +8. Now, you can test this new POST API. From the Handler's kebab menu, select **Get cURL command**, then the **+ plus** button of the curl Command modal. A Substitutions modal will appear. Enter in values for `EMP_NAME`, `DEPT_CODE`, `COMMENTS`, and check Null for the `response_status` and `response_message`. Be sure to review and select valid values for the `DEPT_CODE`. Once finished, click **OK**. - ![Retrieving the curl command](./images-new/42-getting-the-post-curl.png " ") + ![Retrieving the curl command](./images/42-getting-the-post-curl.png " ") - ![clicking the plus button](./images-new/27-press-plus-button-get.png " ") + ![clicking the plus button](./images/27-press-plus-button-get.png " ") - ![Adding substitution details](./images-new/43-entering-substitution-details.png " ") + ![Adding substitution details](./images/43-entering-substitution-details.png " ") -9. Copy the curl command, and paste into a new Terminal window. Press **enter** to execute the curl command. +9. Copy the curl command into a clipboard, and remove the `response_status` and `response_message` key:value pairs, and the no-longer-required comma. Then, paste the updated command in a Terminal window and execute the curl command. - ![Copying the post request](./images-new/44-clicking-copy-for-post.png " ") + ![Copying the post request](./images/44-clicking-copy-for-post.png " ") - ![Pasting request in terminal](./images-new/45-entering-curl-command-in-terminal.png " ") + ![Empty key value pairs](./images/44-1-empty-key-value-pairs.png " ") -> **NOTE:** IF you observe a value of `` for `RESPONSE` remove it, so there is an empty string, before executing the cURL command. + ![Empty key value pairs removed](./images/44-2-key-value-pairs-removed.png " ") 10. You should see the success response message in your terminal. - ![Reviewing the response in terminal](./images-new/46-reviewing-response.png " ") + ![Reviewing the response in terminal](./images/45-response-in-terminal.png " ") 11. You can also perform a simple query to review that latest INSERT using the following code snippet: @@ -286,7 +298,7 @@ Estimated Lab Time: 25 minutes Select * from Employee where emp_name='The name you used in the POST request'; ``` - ![Querying the latest insert in sql worksheet](./images-new/47-querying-latest-post-in-sql-worksheet.png " ") + ![Querying the latest insert in sql worksheet](./images/46-querying-latest-post-in-sql-worksheet.png " ") 12. And that's it, you've just successfully created your first two custom ORDS APIs. But you've probably noticed, no security? Continue to the next lab to learn more about securing your ORDS APIs. @@ -301,4 +313,4 @@ You may now [proceed to the next lab](#next). ### Last Updated By/Date -- Chris Hoina, October 2025 +- Chris Hoina, September 2026 diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/20-enter-template-details.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/20-enter-template-details.png deleted file mode 100644 index 2c318e35e..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/20-enter-template-details.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/21-new-handlers-screen.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/21-new-handlers-screen.png deleted file mode 100644 index 214dd3533..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/21-new-handlers-screen.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/22-adding-sql-to.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/22-adding-sql-to.png deleted file mode 100644 index bd62dfdd2..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/22-adding-sql-to.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/23-finished-handler-code.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/23-finished-handler-code.png deleted file mode 100644 index c1903e78c..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/23-finished-handler-code.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/28-new-values-before-press-ok.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/28-new-values-before-press-ok.png deleted file mode 100644 index d32a1cece..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/28-new-values-before-press-ok.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/30-curl-command-in-terminal.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/30-curl-command-in-terminal.png deleted file mode 100644 index 6ba5bdd43..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/30-curl-command-in-terminal.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/31-get-response-one.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/31-get-response-one.png deleted file mode 100644 index 2fe74cea1..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/31-get-response-one.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/36-creating-handler-for-post.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/36-creating-handler-for-post.png deleted file mode 100644 index 4a1f14f9a..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/36-creating-handler-for-post.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/39-parameter-values.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/39-parameter-values.png deleted file mode 100644 index 685934a6c..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/39-parameter-values.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/40-new-parameter-row.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/40-new-parameter-row.png deleted file mode 100644 index 05d2c2eba..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/40-new-parameter-row.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/41-locating-the-parameters.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/41-locating-the-parameters.png deleted file mode 100644 index cd3e5c077..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/41-locating-the-parameters.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/43-entering-substitution-details.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/43-entering-substitution-details.png deleted file mode 100644 index 98b2363f8..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/43-entering-substitution-details.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/44-clicking-copy-for-post.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/44-clicking-copy-for-post.png deleted file mode 100644 index aed2822b5..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/44-clicking-copy-for-post.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/45-entering-curl-command-in-terminal.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/45-entering-curl-command-in-terminal.png deleted file mode 100644 index 6b2e688a8..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/45-entering-curl-command-in-terminal.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/46-reviewing-response.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/46-reviewing-response.png deleted file mode 100644 index cbf5611e4..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/46-reviewing-response.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/5-plsql-definition-in-sql-worksheet.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/5-plsql-definition-in-sql-worksheet.png deleted file mode 100644 index 58333a4e6..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/5-plsql-definition-in-sql-worksheet.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/6-right-click-on-department-table.png b/build-ords-apis-in-adb/2-build-ords-apis/images-new/6-right-click-on-department-table.png deleted file mode 100644 index a1a120bfa..000000000 Binary files a/build-ords-apis-in-adb/2-build-ords-apis/images-new/6-right-click-on-department-table.png and /dev/null differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/1-testing-sql-in-sql-worksheet.png b/build-ords-apis-in-adb/2-build-ords-apis/images/1-testing-sql-in-sql-worksheet.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/1-testing-sql-in-sql-worksheet.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/1-testing-sql-in-sql-worksheet.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/10-reviewing-the-latest-insert.png b/build-ords-apis-in-adb/2-build-ords-apis/images/10-reviewing-the-latest-insert.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/10-reviewing-the-latest-insert.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/10-reviewing-the-latest-insert.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/11-click-hamburger-then-rest.png b/build-ords-apis-in-adb/2-build-ords-apis/images/11-click-hamburger-then-rest.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/11-click-hamburger-then-rest.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/11-click-hamburger-then-rest.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/12-click-the-autorest-card.png b/build-ords-apis-in-adb/2-build-ords-apis/images/12-click-the-autorest-card.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/12-click-the-autorest-card.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/12-click-the-autorest-card.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/13-autorest-table-project-export-open-api.png b/build-ords-apis-in-adb/2-build-ords-apis/images/13-autorest-table-project-export-open-api.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/13-autorest-table-project-export-open-api.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/13-autorest-table-project-export-open-api.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/14-open-api-export-download.png b/build-ords-apis-in-adb/2-build-ords-apis/images/14-open-api-export-download.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/14-open-api-export-download.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/14-open-api-export-download.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/14-reviewing-the-sql-that-was-executed.png b/build-ords-apis-in-adb/2-build-ords-apis/images/14-reviewing-the-sql-that-was-executed.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/14-reviewing-the-sql-that-was-executed.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/14-reviewing-the-sql-that-was-executed.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/15-openapi-view-on-project.png b/build-ords-apis-in-adb/2-build-ords-apis/images/15-openapi-view-on-project.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/15-openapi-view-on-project.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/15-openapi-view-on-project.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/16-open-api-view-dashboard.png b/build-ords-apis-in-adb/2-build-ords-apis/images/16-open-api-view-dashboard.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/16-open-api-view-dashboard.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/16-open-api-view-dashboard.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/17-resource-modules-dashboard.png b/build-ords-apis-in-adb/2-build-ords-apis/images/17-resource-modules-dashboard.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/17-resource-modules-dashboard.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/17-resource-modules-dashboard.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/18-create-new-resource-module.png b/build-ords-apis-in-adb/2-build-ords-apis/images/18-create-new-resource-module.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/18-create-new-resource-module.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/18-create-new-resource-module.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/19-click-create-template.png b/build-ords-apis-in-adb/2-build-ords-apis/images/19-click-create-template.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/19-click-create-template.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/19-click-create-template.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/2-sql-execution-results.png b/build-ords-apis-in-adb/2-build-ords-apis/images/2-sql-execution-results.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/2-sql-execution-results.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/2-sql-execution-results.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/20-enter-template-details.png b/build-ords-apis-in-adb/2-build-ords-apis/images/20-enter-template-details.png new file mode 100644 index 000000000..0b0e5ab7c Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/20-enter-template-details.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/21-new-handlers-screen.png b/build-ords-apis-in-adb/2-build-ords-apis/images/21-new-handlers-screen.png new file mode 100644 index 000000000..5c6b40675 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/21-new-handlers-screen.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/22-adding-sql-to.png b/build-ords-apis-in-adb/2-build-ords-apis/images/22-adding-sql-to.png new file mode 100644 index 000000000..76f9684d6 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/22-adding-sql-to.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/23-finished-handler-code.png b/build-ords-apis-in-adb/2-build-ords-apis/images/23-finished-handler-code.png new file mode 100644 index 000000000..43db39641 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/23-finished-handler-code.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/24-enter-substitution-pressing-enter.png b/build-ords-apis-in-adb/2-build-ords-apis/images/24-enter-substitution-pressing-enter.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/24-enter-substitution-pressing-enter.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/24-enter-substitution-pressing-enter.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/25-new-browser-window-sql-get-results.png b/build-ords-apis-in-adb/2-build-ords-apis/images/25-new-browser-window-sql-get-results.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/25-new-browser-window-sql-get-results.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/25-new-browser-window-sql-get-results.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/26-curl-command-test.png b/build-ords-apis-in-adb/2-build-ords-apis/images/26-curl-command-test.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/26-curl-command-test.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/26-curl-command-test.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/26.png b/build-ords-apis-in-adb/2-build-ords-apis/images/26.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/26.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/26.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/27-press-plus-button-get.png b/build-ords-apis-in-adb/2-build-ords-apis/images/27-press-plus-button-get.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/27-press-plus-button-get.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/27-press-plus-button-get.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/28-new-values-before-press-ok.png b/build-ords-apis-in-adb/2-build-ords-apis/images/28-new-values-before-press-ok.png new file mode 100644 index 000000000..6e21fa174 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/28-new-values-before-press-ok.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/29-copying-the-curl-command-for-get.png b/build-ords-apis-in-adb/2-build-ords-apis/images/29-copying-the-curl-command-for-get.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/29-copying-the-curl-command-for-get.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/29-copying-the-curl-command-for-get.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/3-navigate-to-rest-workshop.png b/build-ords-apis-in-adb/2-build-ords-apis/images/3-navigate-to-rest-workshop.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/3-navigate-to-rest-workshop.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/3-navigate-to-rest-workshop.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/3-selecting-plsql-procedure.png b/build-ords-apis-in-adb/2-build-ords-apis/images/3-selecting-plsql-procedure.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/3-selecting-plsql-procedure.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/3-selecting-plsql-procedure.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/30-1-removing-value-placeholder.png b/build-ords-apis-in-adb/2-build-ords-apis/images/30-1-removing-value-placeholder.png new file mode 100644 index 000000000..105799deb Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/30-1-removing-value-placeholder.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/30-curl-command-in-terminal.png b/build-ords-apis-in-adb/2-build-ords-apis/images/30-curl-command-in-terminal.png new file mode 100644 index 000000000..c43eee085 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/30-curl-command-in-terminal.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/31-get-response-one.png b/build-ords-apis-in-adb/2-build-ords-apis/images/31-get-response-one.png new file mode 100644 index 000000000..364493a0e Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/31-get-response-one.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/31.png b/build-ords-apis-in-adb/2-build-ords-apis/images/31.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/31.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/31.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/32-get-response-two.png b/build-ords-apis-in-adb/2-build-ords-apis/images/32-get-response-two.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/32-get-response-two.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/32-get-response-two.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/32.png b/build-ords-apis-in-adb/2-build-ords-apis/images/32.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/32.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/32.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/33-breadcrumbs.png b/build-ords-apis-in-adb/2-build-ords-apis/images/33-breadcrumbs.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/33-breadcrumbs.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/33-breadcrumbs.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/34-create-second-template-button.png b/build-ords-apis-in-adb/2-build-ords-apis/images/34-create-second-template-button.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/34-create-second-template-button.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/34-create-second-template-button.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/35-entering-values-for-new-template.png b/build-ords-apis-in-adb/2-build-ords-apis/images/35-entering-values-for-new-template.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/35-entering-values-for-new-template.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/35-entering-values-for-new-template.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/36-creating-handler-for-post.png b/build-ords-apis-in-adb/2-build-ords-apis/images/36-creating-handler-for-post.png new file mode 100644 index 000000000..86955ce14 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/36-creating-handler-for-post.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/36.png b/build-ords-apis-in-adb/2-build-ords-apis/images/36.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/36.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/36.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/37-click-parameter-tab.png b/build-ords-apis-in-adb/2-build-ords-apis/images/37-click-parameter-tab.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/37-click-parameter-tab.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/37-click-parameter-tab.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/37.png b/build-ords-apis-in-adb/2-build-ords-apis/images/37.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/37.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/37.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/38-click-create-parameter-button.png b/build-ords-apis-in-adb/2-build-ords-apis/images/38-click-create-parameter-button.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/38-click-create-parameter-button.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/38-click-create-parameter-button.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/39-parameter-values.png b/build-ords-apis-in-adb/2-build-ords-apis/images/39-parameter-values.png new file mode 100644 index 000000000..ea2900f20 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/39-parameter-values.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/4-click-auto-rest-tile copy.png b/build-ords-apis-in-adb/2-build-ords-apis/images/4-click-auto-rest-tile copy.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/4-click-auto-rest-tile copy.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/4-click-auto-rest-tile copy.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/4-right-click-on-plsql-proc.png b/build-ords-apis-in-adb/2-build-ords-apis/images/4-right-click-on-plsql-proc.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/4-right-click-on-plsql-proc.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/4-right-click-on-plsql-proc.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/40-new-parameter-rows.png b/build-ords-apis-in-adb/2-build-ords-apis/images/40-new-parameter-rows.png new file mode 100644 index 000000000..d82dd0abf Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/40-new-parameter-rows.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/41-locating-the-parameters.png b/build-ords-apis-in-adb/2-build-ords-apis/images/41-locating-the-parameters.png new file mode 100644 index 000000000..582532f3b Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/41-locating-the-parameters.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/42-getting-the-post-curl.png b/build-ords-apis-in-adb/2-build-ords-apis/images/42-getting-the-post-curl.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/42-getting-the-post-curl.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/42-getting-the-post-curl.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/43-entering-substitution-details.png b/build-ords-apis-in-adb/2-build-ords-apis/images/43-entering-substitution-details.png new file mode 100644 index 000000000..10a45abf2 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/43-entering-substitution-details.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/44-1-empty-key-value-pairs.png b/build-ords-apis-in-adb/2-build-ords-apis/images/44-1-empty-key-value-pairs.png new file mode 100644 index 000000000..64e90819b Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/44-1-empty-key-value-pairs.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/44-2-key-value-pairs-removed.png b/build-ords-apis-in-adb/2-build-ords-apis/images/44-2-key-value-pairs-removed.png new file mode 100644 index 000000000..83a4be672 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/44-2-key-value-pairs-removed.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/44-clicking-copy-for-post.png b/build-ords-apis-in-adb/2-build-ords-apis/images/44-clicking-copy-for-post.png new file mode 100644 index 000000000..71a5d30e9 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/44-clicking-copy-for-post.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/45-response-in-terminal.png b/build-ords-apis-in-adb/2-build-ords-apis/images/45-response-in-terminal.png new file mode 100644 index 000000000..d2ea2a7e4 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/45-response-in-terminal.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/47-querying-latest-post-in-sql-worksheet.png b/build-ords-apis-in-adb/2-build-ords-apis/images/46-querying-latest-post-in-sql-worksheet.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/47-querying-latest-post-in-sql-worksheet.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/46-querying-latest-post-in-sql-worksheet.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/5-plsql-definition-in-sql-worksheet.png b/build-ords-apis-in-adb/2-build-ords-apis/images/5-plsql-definition-in-sql-worksheet.png new file mode 100644 index 000000000..7510c91b4 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/5-plsql-definition-in-sql-worksheet.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images/6-open-new-sql-worksheet.png b/build-ords-apis-in-adb/2-build-ords-apis/images/6-open-new-sql-worksheet.png new file mode 100644 index 000000000..0fa7ad8f6 Binary files /dev/null and b/build-ords-apis-in-adb/2-build-ords-apis/images/6-open-new-sql-worksheet.png differ diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/7-review-valid-names-for-dept-code.png b/build-ords-apis-in-adb/2-build-ords-apis/images/7-review-valid-names-for-dept-code.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/7-review-valid-names-for-dept-code.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/7-review-valid-names-for-dept-code.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/8-code-snippet-to-add-record.png b/build-ords-apis-in-adb/2-build-ords-apis/images/8-code-snippet-to-add-record.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/8-code-snippet-to-add-record.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/8-code-snippet-to-add-record.png diff --git a/build-ords-apis-in-adb/2-build-ords-apis/images-new/9-executing-the-code-snippet.png b/build-ords-apis-in-adb/2-build-ords-apis/images/9-executing-the-code-snippet.png similarity index 100% rename from build-ords-apis-in-adb/2-build-ords-apis/images-new/9-executing-the-code-snippet.png rename to build-ords-apis-in-adb/2-build-ords-apis/images/9-executing-the-code-snippet.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/1-roles-from-security-menu.png b/build-ords-apis-in-adb/3-secure-endpoints/images/1-roles-from-security-menu.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/1-roles-from-security-menu.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/1-roles-from-security-menu.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/10-create-oauth-client-button.png b/build-ords-apis-in-adb/3-secure-endpoints/images/10-create-oauth-client-button.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/10-create-oauth-client-button.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/10-create-oauth-client-button.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/11-create-oauth-client-definition.png b/build-ords-apis-in-adb/3-secure-endpoints/images/11-create-oauth-client-definition.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/11-create-oauth-client-definition.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/11-create-oauth-client-definition.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/12-create-oauth-client-roles.png b/build-ords-apis-in-adb/3-secure-endpoints/images/12-create-oauth-client-roles.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/12-create-oauth-client-roles.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/12-create-oauth-client-roles.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/13-create-oauth-client-privs.png b/build-ords-apis-in-adb/3-secure-endpoints/images/13-create-oauth-client-privs.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/13-create-oauth-client-privs.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/13-create-oauth-client-privs.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/14-my-oauth-client-secret.png b/build-ords-apis-in-adb/3-secure-endpoints/images/14-my-oauth-client-secret.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/14-my-oauth-client-secret.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/14-my-oauth-client-secret.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/15-mistake-rotate-secret.png b/build-ords-apis-in-adb/3-secure-endpoints/images/15-mistake-rotate-secret.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/15-mistake-rotate-secret.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/15-mistake-rotate-secret.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/16-1-copy-oauth-token-command.png b/build-ords-apis-in-adb/3-secure-endpoints/images/16-1-copy-oauth-token-command.png new file mode 100644 index 000000000..e18ad8871 Binary files /dev/null and b/build-ords-apis-in-adb/3-secure-endpoints/images/16-1-copy-oauth-token-command.png differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/16-copy-client-id-value.png b/build-ords-apis-in-adb/3-secure-endpoints/images/16-copy-client-id-value.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/16-copy-client-id-value.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/16-copy-client-id-value.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/16-select-get-bearer-token.png b/build-ords-apis-in-adb/3-secure-endpoints/images/16-select-get-bearer-token.png new file mode 100644 index 000000000..6fd55ad88 Binary files /dev/null and b/build-ords-apis-in-adb/3-secure-endpoints/images/16-select-get-bearer-token.png differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/17-obtaining-the-bearer-token-part-one.png b/build-ords-apis-in-adb/3-secure-endpoints/images/17-obtaining-the-bearer-token-part-one.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/17-obtaining-the-bearer-token-part-one.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/17-obtaining-the-bearer-token-part-one.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/18-obtaining-the-bearer-token-part-two.png b/build-ords-apis-in-adb/3-secure-endpoints/images/18-obtaining-the-bearer-token-part-two.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/18-obtaining-the-bearer-token-part-two.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/18-obtaining-the-bearer-token-part-two.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/19-unauthorized-request.png b/build-ords-apis-in-adb/3-secure-endpoints/images/19-unauthorized-request.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/19-unauthorized-request.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/19-unauthorized-request.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/2-create-role-button.png b/build-ords-apis-in-adb/3-secure-endpoints/images/2-create-role-button.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/2-create-role-button.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/2-create-role-button.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/20-authorized-request.png b/build-ords-apis-in-adb/3-secure-endpoints/images/20-authorized-request.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/20-authorized-request.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/20-authorized-request.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/3-role-definition-modal.png b/build-ords-apis-in-adb/3-secure-endpoints/images/3-role-definition-modal.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/3-role-definition-modal.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/3-role-definition-modal.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/4-select-privileges-option.png b/build-ords-apis-in-adb/3-secure-endpoints/images/4-select-privileges-option.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/4-select-privileges-option.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/4-select-privileges-option.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/5-create-privilege-button.png b/build-ords-apis-in-adb/3-secure-endpoints/images/5-create-privilege-button.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/5-create-privilege-button.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/5-create-privilege-button.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/6-create-priv-priv-definition.png b/build-ords-apis-in-adb/3-secure-endpoints/images/6-create-priv-priv-definition.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/6-create-priv-priv-definition.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/6-create-priv-priv-definition.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/7-create-priv-roles.png b/build-ords-apis-in-adb/3-secure-endpoints/images/7-create-priv-roles.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/7-create-priv-roles.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/7-create-priv-roles.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/8-create-priv-protected-modules.png b/build-ords-apis-in-adb/3-secure-endpoints/images/8-create-priv-protected-modules.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/8-create-priv-protected-modules.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/8-create-priv-protected-modules.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images-new/9-oauth-clients-menu.png b/build-ords-apis-in-adb/3-secure-endpoints/images/9-oauth-clients-menu.png similarity index 100% rename from build-ords-apis-in-adb/3-secure-endpoints/images-new/9-oauth-clients-menu.png rename to build-ords-apis-in-adb/3-secure-endpoints/images/9-oauth-clients-menu.png diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/click-copy-icon-to-copy-token-text.png b/build-ords-apis-in-adb/3-secure-endpoints/images/click-copy-icon-to-copy-token-text.png deleted file mode 100644 index 80ee44013..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/click-copy-icon-to-copy-token-text.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/click-create-for-privilege.png b/build-ords-apis-in-adb/3-secure-endpoints/images/click-create-for-privilege.png deleted file mode 100644 index 3a87b293a..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/click-create-for-privilege.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/click-ok-when-finished-in-oauth-slider.png b/build-ords-apis-in-adb/3-secure-endpoints/images/click-ok-when-finished-in-oauth-slider.png deleted file mode 100644 index db8b394d6..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/click-ok-when-finished-in-oauth-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/completed-created-privilege-slider.png b/build-ords-apis-in-adb/3-secure-endpoints/images/completed-created-privilege-slider.png deleted file mode 100644 index 70eab6722..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/completed-created-privilege-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/completed-oauth-slider.png b/build-ords-apis-in-adb/3-secure-endpoints/images/completed-oauth-slider.png deleted file mode 100644 index 205fe8eb5..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/completed-oauth-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/copy-copy.png b/build-ords-apis-in-adb/3-secure-endpoints/images/copy-copy.png deleted file mode 100644 index 1de018684..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/copy-copy.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/create-oauth-client-slider.png b/build-ords-apis-in-adb/3-secure-endpoints/images/create-oauth-client-slider.png deleted file mode 100644 index b2224deac..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/create-oauth-client-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/create-privilege-button.png b/build-ords-apis-in-adb/3-secure-endpoints/images/create-privilege-button.png deleted file mode 100644 index 7e5415cc6..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/create-privilege-button.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/create-privilege-roles-tab.png b/build-ords-apis-in-adb/3-secure-endpoints/images/create-privilege-roles-tab.png deleted file mode 100644 index 5196c2645..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/create-privilege-roles-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/create-privilege-slider.png b/build-ords-apis-in-adb/3-secure-endpoints/images/create-privilege-slider.png deleted file mode 100644 index 38b51adcb..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/create-privilege-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/create-role-action.png b/build-ords-apis-in-adb/3-secure-endpoints/images/create-role-action.png deleted file mode 100644 index 0a797a106..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/create-role-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/create-roll-button.png b/build-ords-apis-in-adb/3-secure-endpoints/images/create-roll-button.png deleted file mode 100644 index bdccf9ea5..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/create-roll-button.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/get-bearer-token-for-oauth-client.png b/build-ords-apis-in-adb/3-secure-endpoints/images/get-bearer-token-for-oauth-client.png deleted file mode 100644 index b897d8d67..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/get-bearer-token-for-oauth-client.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-create-button.png b/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-create-button.png deleted file mode 100644 index aef4d7bd1..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-create-button.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-description-field.png b/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-description-field.png deleted file mode 100644 index 1133abb00..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-description-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-name-field.png b/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-name-field.png deleted file mode 100644 index 3be935a5b..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-name-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-security-tab.png b/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-security-tab.png deleted file mode 100644 index 179f32f44..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-security-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-support-uri.png b/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-support-uri.png deleted file mode 100644 index fdbfe401b..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-client-support-uri.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-clients-page.png b/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-clients-page.png deleted file mode 100644 index 9307891b0..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-clients-page.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-create-button-action.png b/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-create-button-action.png deleted file mode 100644 index ab1cecd04..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-create-button-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-shuttle.png b/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-shuttle.png deleted file mode 100644 index 7564a3a31..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/oauth-shuttle.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/privilege-description-input-field.png b/build-ords-apis-in-adb/3-secure-endpoints/images/privilege-description-input-field.png deleted file mode 100644 index ff7b0b9c4..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/privilege-description-input-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/privilege-label-input.png b/build-ords-apis-in-adb/3-secure-endpoints/images/privilege-label-input.png deleted file mode 100644 index 8a71fa6e8..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/privilege-label-input.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/privilege-name-input-field.png b/build-ords-apis-in-adb/3-secure-endpoints/images/privilege-name-input-field.png deleted file mode 100644 index 6afca1a11..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/privilege-name-input-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/protected-modules-shuttle.png b/build-ords-apis-in-adb/3-secure-endpoints/images/protected-modules-shuttle.png deleted file mode 100644 index 13777f21e..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/protected-modules-shuttle.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/protected-modules-tab-option.png b/build-ords-apis-in-adb/3-secure-endpoints/images/protected-modules-tab-option.png deleted file mode 100644 index ca702cf83..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/protected-modules-tab-option.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/role-definition-role-name-field.png b/build-ords-apis-in-adb/3-secure-endpoints/images/role-definition-role-name-field.png deleted file mode 100644 index 14e3ec781..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/role-definition-role-name-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/role-name-field.png b/build-ords-apis-in-adb/3-secure-endpoints/images/role-name-field.png deleted file mode 100644 index bfe1b866d..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/role-name-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/roles-shuttle-window.png b/build-ords-apis-in-adb/3-secure-endpoints/images/roles-shuttle-window.png deleted file mode 100644 index a69c7bd94..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/roles-shuttle-window.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/roles-tab-oauth-slider.png b/build-ords-apis-in-adb/3-secure-endpoints/images/roles-tab-oauth-slider.png deleted file mode 100644 index 7f2b61122..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/roles-tab-oauth-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/select-privilege-security-tab.png b/build-ords-apis-in-adb/3-secure-endpoints/images/select-privilege-security-tab.png deleted file mode 100644 index 7ca2cf954..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/select-privilege-security-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/select-rest-dbactions-menu.png b/build-ords-apis-in-adb/3-secure-endpoints/images/select-rest-dbactions-menu.png deleted file mode 100644 index 78ca17ed6..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/select-rest-dbactions-menu.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/select-roles-security-tab.png b/build-ords-apis-in-adb/3-secure-endpoints/images/select-roles-security-tab.png deleted file mode 100644 index 19e7168d8..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/select-roles-security-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/support-email-field.png b/build-ords-apis-in-adb/3-secure-endpoints/images/support-email-field.png deleted file mode 100644 index e8bd8b455..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/support-email-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/images/three-dot-pop.png b/build-ords-apis-in-adb/3-secure-endpoints/images/three-dot-pop.png deleted file mode 100644 index 330f6257f..000000000 Binary files a/build-ords-apis-in-adb/3-secure-endpoints/images/three-dot-pop.png and /dev/null differ diff --git a/build-ords-apis-in-adb/3-secure-endpoints/secure-endpoints.md b/build-ords-apis-in-adb/3-secure-endpoints/secure-endpoints.md index c4fc961b1..f39e21d14 100644 --- a/build-ords-apis-in-adb/3-secure-endpoints/secure-endpoints.md +++ b/build-ords-apis-in-adb/3-secure-endpoints/secure-endpoints.md @@ -14,35 +14,37 @@ Estimated Lab Time: 10 minutes ### Prerequisites -- The following lab requires an [Oracle Cloud account](https://www.oracle.com/cloud/free/). You may use your own cloud account, a cloud account that you obtained through a trial, or a training account whose details were given to you by an Oracle instructor. + +- The following lab requires an [Oracle Cloud account](https://www.oracle.com/cloud/free/). You may use your own cloud account, a cloud account obtained through a trial, or a training account whose details were given to you by an Oracle instructor. + - This lab uses the command line application cURL for testing APIs; some familiarity is suggested. - This lab assumes you have completed all previous Labs. -## Task 1: Create a Role for an OAuth2.0 client +## Task 1: Create a Role 1. From the REST Workshop, select **Roles** from the **Security** dropdown menu. - ![Roles from the security menu](./images-new/1-roles-from-security-menu.png " ") + ![Roles from the security menu](./images/1-roles-from-security-menu.png " ") 2. Next, click the **+ Create Role** button. - ![click create role button](./images-new/2-create-role-button.png " ") + ![click create role button](./images/2-create-role-button.png " ") 3. In the Role Definition modal, enter in a **Role Name**, such as: `my.test.role`, then click **Create**. - ![The role definition modal](./images-new/3-role-definition-modal.png " ") + ![The role definition modal](./images/3-role-definition-modal.png " ") -## Task 2: Create a Privilege for an OAuth2.0 client +## Task 2: Create a Privilege -1. Next, you'll create a Privilege for the OAuth2.0 client. Select **Privileges** from the **Security** dropdown menu. +1. Next, you'll create a Privilege. Select **Privileges** from the **Security** dropdown menu. - ![Selecting privileges from security menu](./images-new/4-select-privileges-option.png " ") + ![Selecting privileges from security menu](./images/4-select-privileges-option.png " ") 2. Click the **+ Create Privilege** button, and enter in values for this privilege. - ![Create privilege button](./images-new/5-create-privilege-button.png " ") + ![Create privilege button](./images/5-create-privilege-button.png " ") - To better follow along, choose values similar to the examples: + To better follow along, choose values similar to the examples: **Privilege Definition** - **Label:** `my.test.priv` @@ -50,31 +52,33 @@ Estimated Lab Time: 10 minutes - **Description:** `my.test.priv` (You can alter this as needed) - **Comments:** optional - ![create-priv-priv-definition](./images-new/6-create-priv-priv-definition.png " ") + ![create-priv-priv-definition](./images/6-create-priv-priv-definition.png " ") **Roles** - - **Roles:** `my.test.role` (or your unique role, if it differs) + - **Roles:** `my.test.role` (the role you created in Task 1) - ![create-priv-roles](./images-new/7-create-priv-roles.png " ") + ![create-priv-roles](./images/7-create-priv-roles.png " ") **Protected Modules** - **Selected Modules**: `records.module` - ![create-priv-selected-modules](./images-new/8-create-priv-protected-modules.png " ") + ![create-priv-selected-modules](./images/8-create-priv-protected-modules.png " ") > **TIP:** Move a Module into the Selected Modules column by dragging, or using the arrow buttons. -3. Once complete, click the **Create** button. +3. Once complete, click the **Create** button. + +4. Your `records.module` is now protected by the `my.test.priv`. The `my.test.priv` *enumerates* any roles you've attached to it. ## Task 3: Create an ORDS OAuth Client 1. Select **OAuth Clients** from the **Security Tab**. - ![selecting OAuth Clients](./images-new/9-oauth-clients-menu.png " ") + ![selecting OAuth Clients](./images/9-oauth-clients-menu.png " ") 2. Then, click the **+ Create OAuth Client** button. - ![Click the Create OAuth Client button](./images-new/10-create-oauth-client-button.png " ") + ![Click the Create OAuth Client button](./images/10-create-oauth-client-button.png " ") 3. In the Create OAuth Client slider, enter in the following values and click the **Create** button when complete: @@ -85,56 +89,66 @@ Estimated Lab Time: 10 minutes - **Support email:** your choice (mandatory field) - **Support URI:** https://www.my-company.com/support (can be fictitious) - ![Description Field](./images-new/11-create-oauth-client-definition.png " ") + ![Description Field](./images/11-create-oauth-client-definition.png " ") - **Roles** - - **Roles:** `my.test.role` (or your unique role, if it differs) +4. Previously you created a Privilege, which includes (enumerates) a Role. Here, you can optionally assign the OAuth Client either the `my.test.role` role, the `my.test.priv` privilege, or both (although in this case, a bit redundant). - ![choose-roles-tB](./images-new/12-create-oauth-client-roles.png " ") + Selecting *only* the Role is acceptable, since the Privilege you created includes this Role. Since your `records.module` is protected by the same Privilege, this is a valid approach. - **Privileges** - - **Roles:** `my.test.role` (or your unique role, if it differs) + **Roles** + - **Roles:** `my.test.role` (or your unique role, if it differs) - ![choose-ouath-privs](./images-new/13-create-oauth-client-privs.png " ") + ![choose-roles-tB](./images/12-create-oauth-client-roles.png " ") -## Task 4: Testing the OAuth2.0 client + Alternatively, you can simply assign the Privilege directly. And since that Privilege enumerates the Role, this is valid as well. + + **Privileges** + - **Roles:** `my.test.role` (or your unique role, if it differs) -1. After clicking **Create**, a Client Secret modal will appear. Copy the Secrect Client value to your clipboard or a text editor. + ![choose-ouath-privs](./images/13-create-oauth-client-privs.png " ") - > **NOTE:** If you click OK prior to copying, you can also Rotate in a new Client Secret value. +5. Choose an approach, and click the **Create** button when complete. + +## Task 4: Testing the OAuth2.0 client - ![Copy my client secret](./images-new/14-my-oauth-client-secret.png " ") +1. After clicking **Create**, a Client Secret modal will appear. Copy the Secret Client value to your clipboard or a text editor. - ![Rotate in new secret](./images-new/15-mistake-rotate-secret.png " ") + ![Copy my client secret](./images/14-my-oauth-client-secret.png " ") -2. You will also next need to copy your Client ID. + > **NOTE:** If you click OK prior to copying, you can also Rotate in a new Client Secret value. - ![Client ID value](./images-new/16-copy-client-id-value.png " ") + > ![Rotate in new secret](./images/15-mistake-rotate-secret.png " ") -3. You will first request an Access token from the ORDS OAuth2.0 `/token` endpoint. The Token endpoint is located at the following URL, where `server.com` is the location of your database server (this example assumes your schema is also `ords101`): +2. You will first request an Access token from the ORDS OAuth2.0 `/token` endpoint. The Token endpoint is located at the following URL, where `server.com` is the location of your database server: - ```http - https://[MY ADB's OCI]-[My ADB Name].adb.[My-Region].oraclecloudapps.com/ords/ords101/oauth/token + ```html + https://[MY ADB's OCI]-[My ADB Name].adb.[My-Region].oraclecloudapps.com/ords/[Schema name]/oauth/token ``` - Your cURL command for retrieving an Access Token should resemble the following (where the `--user` value is your `Client_ID`:`Client_Secret`): +3. The simpliest way to retrive this endpoint, along with a fully-formed curl command, is by clicking the OAuth client's kebab menu, then selecting the Get Bearer Token menu option. Then, copy the command. - ```shell + ![select-get-bearer-token](./images/16-select-get-bearer-token.png " ") + + ![copy-oauth-token-command](./images/16-1-copy-oauth-token-command.png " ") + + > Your cURL command for retrieving an Access Token should resemble the following (where the `--user` value is your `Client_ID`:`Client_Secret`): + + > ```shell curl \ --user AbcDef3456XYz..:a45AbcdeF8675309abcd.. \ --data 'grant_type=client_credentials' \ 'https://abcdefgh12345-ords101db.adb.us-ashburn-1.oraclecloudapps.com/ords/ords101/oauth/token' ``` - ![Obtaining-the-bearer-token-part-one](./images-new/17-obtaining-the-bearer-token-part-one.png " ") + > ![Obtaining-the-bearer-token-part-one](./images/17-obtaining-the-bearer-token-part-one.png " ") 4. Execute your cURL command; you will recieve a valid Access Token. In this example, you can use the `GET` endpoint that you created in **Lab 2, Task 3: Building an ORDS GET API** as your target endpoint. - ![Obtaining-the-bearer-token-part-two](./images-new/18-obtaining-the-bearer-token-part-two.png " ") + ![Obtaining-the-bearer-token-part-two](./images/18-obtaining-the-bearer-token-part-two.png " ") 5. Before proceeding, attempt a GET request on your GET Handler, it will fail as you have not provided a valid Access Token (Unauthorized). - ![An unauthorized get request](./images-new/19-unauthorized-request.png " ") + ![An unauthorized get request](./images/19-unauthorized-request.png " ") 6. Finally, with a valid Access Token, perform a GET request on your target endpoint, using the following cURL command as an example: @@ -144,7 +158,7 @@ Estimated Lab Time: 10 minutes 'https://abcdefgh12345-ords101db.adb.us-ashburn-1.oraclecloudapps.com/ords/ords101/v1/dept_active/10/true' ``` - ![An authorized get request](./images-new/20-authorized-request.png " ") + ![An authorized get request](./images/20-authorized-request.png " ") 7. What you should see is the successful response from your `/ords101/v1/dept_active/` endpoint. Congratulations, you've just completed the ORDS 101 Workshop! @@ -161,4 +175,4 @@ You may now [proceed to the next lab](#next). ### Last Updated By/Date -- Chris Hoina, September 2025 +- Chris Hoina, September 2026 diff --git a/build-ords-apis-in-adb/4-workshop-scripts/combined_setup.sql b/build-ords-apis-in-adb/4-workshop-scripts/combined_setup.sql new file mode 100644 index 000000000..070161a3e --- /dev/null +++ b/build-ords-apis-in-adb/4-workshop-scripts/combined_setup.sql @@ -0,0 +1,168 @@ +-- ========================================== +-- CREATE DEPARTMENT TABLE +-- Source: create_department_table.sql +-- ========================================== +CREATE TABLE "DEPARTMENT" + ( "DEPT_ID" NUMBER GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE , + "DEPT_CODE" VARCHAR2(5 BYTE) COLLATE "USING_NLS_COMP", + "ESTABLISHED" DATE, + "DETAILS" JSON + ) DEFAULT COLLATION "USING_NLS_COMP" ; + +CREATE UNIQUE INDEX "DEPT_CODE_UK" ON "DEPARTMENT" ("DEPT_CODE") + ; + +CREATE UNIQUE INDEX "DEPT_ID_PK" ON "DEPARTMENT" ("DEPT_ID") + ; + +CREATE UNIQUE INDEX "DEPARTMENT_DEPT_CODE_UQ" ON "DEPARTMENT" (UPPER("DEPT_CODE")) + ; + +ALTER TABLE "DEPARTMENT" MODIFY ("DEPT_ID" NOT NULL ENABLE); + +ALTER TABLE "DEPARTMENT" MODIFY ("DEPT_CODE" CONSTRAINT "DEPT_CODE_NN" NOT NULL ENABLE); + +ALTER TABLE "DEPARTMENT" ADD CONSTRAINT "DEPT_ID_PK" PRIMARY KEY ("DEPT_ID") + USING INDEX ENABLE; + + +-- ========================================== +-- CREATE EMPLOYEE TABLE +-- Source: create_employee_table.sql +-- ========================================== +CREATE TABLE "EMPLOYEE" + ( "EMP_ID" NUMBER GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE , + "EMP_NAME" VARCHAR2(100 BYTE) COLLATE "USING_NLS_COMP", + "DEPT_ID" NUMBER, + "COMMENTS" CLOB COLLATE "USING_NLS_COMP" + ) DEFAULT COLLATION "USING_NLS_COMP" ; + +CREATE UNIQUE INDEX "EMP_ID_PK" ON "EMPLOYEE" ("EMP_ID") + ; + +CREATE INDEX "EMP_DEPARTMENT_IX" ON "EMPLOYEE" ("DEPT_ID") + ; + +ALTER TABLE "EMPLOYEE" MODIFY ("EMP_ID" NOT NULL ENABLE); + +ALTER TABLE "EMPLOYEE" MODIFY ("EMP_NAME" CONSTRAINT "EMP_NAME_NN" NOT NULL ENABLE); + +ALTER TABLE "EMPLOYEE" MODIFY ("DEPT_ID" CONSTRAINT "EMP_DEPT_ID_NN" NOT NULL ENABLE); + +ALTER TABLE "EMPLOYEE" ADD CONSTRAINT "EMP_ID_PK" PRIMARY KEY ("EMP_ID") + USING INDEX ENABLE; + +ALTER TABLE "EMPLOYEE" ADD CONSTRAINT "FK_EMPLOYEE_DEPT" FOREIGN KEY ("DEPT_ID") + REFERENCES "DEPARTMENT" ("DEPT_ID") ENABLE; + + +-- ========================================== +-- CREATE PROJECT TABLE +-- Source: create_project_table.sql +-- ========================================== +CREATE TABLE "PROJECT" + ( "PROJ_ID" NUMBER GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE , + "PROJ_NAME" VARCHAR2(100 BYTE) COLLATE "USING_NLS_COMP", + "DEPT_ID" NUMBER, + "IS_ACTIVE" BOOLEAN + ) DEFAULT COLLATION "USING_NLS_COMP" ; + +CREATE UNIQUE INDEX "PROJ_ID_PK" ON "PROJECT" ("PROJ_ID") + ; + +CREATE INDEX "PROJ_DEPARTMENT_IX" ON "PROJECT" ("DEPT_ID") + ; + +ALTER TABLE "PROJECT" MODIFY ("PROJ_ID" NOT NULL ENABLE); + +ALTER TABLE "PROJECT" MODIFY ("PROJ_NAME" CONSTRAINT "PROJ_NAME_NN" NOT NULL ENABLE); + +ALTER TABLE "PROJECT" MODIFY ("DEPT_ID" CONSTRAINT "PROJ_DEPT_ID_NN" NOT NULL ENABLE); + +ALTER TABLE "PROJECT" ADD CONSTRAINT "PROJ_ID_PK" PRIMARY KEY ("PROJ_ID") + USING INDEX ENABLE; + +ALTER TABLE "PROJECT" ADD CONSTRAINT "FK_PROJECT_DEPT" FOREIGN KEY ("DEPT_ID") + REFERENCES "DEPARTMENT" ("DEPT_ID") ENABLE; + +-- ========================================== +-- INSERT DATA +-- Source: insert_data.sql +-- ========================================== +INSERT INTO DEPARTMENT (DEPT_CODE, ESTABLISHED, DETAILS) VALUES + ('HR001', DATE '2001-04-13', JSON_OBJECT('location' VALUE 'Bldg 1', 'members' VALUE 25)), + ('FN002', DATE '2002-06-20', JSON_OBJECT('location' VALUE 'Bldg 2', 'members' VALUE 20)), + ('EN003', DATE '2000-11-01', JSON_OBJECT('location' VALUE 'Bldg 3', 'members' VALUE 40)), + ('SA004', DATE '2005-01-15', JSON_OBJECT('location' VALUE 'Bldg 4', 'members' VALUE 18)), + ('MK005', DATE '2003-12-07', JSON_OBJECT('location' VALUE 'Bldg 5', 'members' VALUE 15)), + ('LG006', DATE '2010-03-31', JSON_OBJECT('location' VALUE 'Bldg 6', 'members' VALUE 5)), + ('IT007', DATE '2001-09-23', JSON_OBJECT('location' VALUE 'Bldg 7', 'members' VALUE 30)), + ('SP008', DATE '2015-05-05', JSON_OBJECT('location' VALUE 'Bldg 8', 'members' VALUE 12)), + ('LG009', DATE '2012-07-14', JSON_OBJECT('location' VALUE 'Bldg 9', 'members' VALUE 10)), + ('OP010', DATE '2008-08-01', JSON_OBJECT('location' VALUE 'Bldg 10', 'members' VALUE 22)); + COMMIT; + +INSERT INTO PROJECT (PROJ_NAME, DEPT_ID, IS_ACTIVE) VALUES + ('Onboarding', 1, TRUE), + ('Audit2024', 2, FALSE), + ('NewApp', 3, TRUE), + ('SalesCampaign', 4, TRUE), + ('SocialMediaPush', 5, FALSE), + ('Compliance', 6, TRUE), + ('UpgradeInfra', 7, TRUE), + ('HelpdeskRevamp', 8, TRUE), + ('FleetUpdate', 9, TRUE), + ('ProcessReorg', 10, FALSE); + COMMIT; + +INSERT INTO EMPLOYEE (EMP_NAME, DEPT_ID, COMMENTS) VALUES + ('Alice', 1, 'Strong analyst, quick learner.'), + ('Bob', 2, 'CPA certification in progress.'), + ('Carol', 3, 'Dev team lead for NewApp project.'), + ('David', 4, 'Consistent sales over target.'), + ('Eve', 5, 'Leads digital campaigns.'), + ('Frank', 6, 'Subject matter expert in compliance.'), + ('Grace', 7, 'Skilled in infrastructure upgrades.'), + ('Heidi', 8, 'Customer support supervisor.'), + ('Ivan', 9, 'Fleet manager - long tenure.'), + ('Judy', 10, 'Operations management veteran.'); + COMMIT; + + +-- ========================================== +-- CREATE PROCEDURE +-- Source: create_procedure.sql +-- ========================================== +CREATE OR REPLACE EDITIONABLE PROCEDURE "PR_ADD_AND_ASSIGN_EMPLOYEE" ( + p_emp_name IN VARCHAR2, + p_dept_code IN VARCHAR2, + p_comments IN CLOB + ) AS + l_dept_id department.dept_id%TYPE; + BEGIN + SELECT dept_id + INTO l_dept_id + FROM department + WHERE UPPER(dept_code) = UPPER(p_dept_code); + + INSERT INTO employee ( + emp_name, + dept_id, + comments + ) + VALUES ( + p_emp_name, + l_dept_id, + p_comments + ); + + EXCEPTION + WHEN NO_DATA_FOUND THEN + raise_application_error( + -20001, + 'Department code not found. Valid values: ' || + 'EN003, FN002, HR001, IT007, LG006, LG009, ' || + 'MK005, OP010, SA004, SP008' + ); + END; +/ diff --git a/build-ords-apis-in-adb/4-workshop-scripts/create_department_table.sql b/build-ords-apis-in-adb/4-workshop-scripts/create_department_table.sql new file mode 100644 index 000000000..2d28d5d36 --- /dev/null +++ b/build-ords-apis-in-adb/4-workshop-scripts/create_department_table.sql @@ -0,0 +1,23 @@ +CREATE TABLE "DEMO_USER"."DEPARTMENT" + ( "DEPT_ID" NUMBER GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE , + "DEPT_CODE" VARCHAR2(5 BYTE) COLLATE "USING_NLS_COMP", + "ESTABLISHED" DATE, + "DETAILS" JSON + ) DEFAULT COLLATION "USING_NLS_COMP" ; + +CREATE UNIQUE INDEX "DEMO_USER"."DEPT_CODE_UK" ON "DEMO_USER"."DEPARTMENT" ("DEPT_CODE") + ; + +CREATE UNIQUE INDEX "DEMO_USER"."DEPT_ID_PK" ON "DEMO_USER"."DEPARTMENT" ("DEPT_ID") + ; + +CREATE UNIQUE INDEX "DEMO_USER"."DEPARTMENT_DEPT_CODE_UQ" ON "DEMO_USER"."DEPARTMENT" (UPPER("DEPT_CODE")) + ; + +ALTER TABLE "DEMO_USER"."DEPARTMENT" MODIFY ("DEPT_ID" NOT NULL ENABLE); + +ALTER TABLE "DEMO_USER"."DEPARTMENT" MODIFY ("DEPT_CODE" CONSTRAINT "DEPT_CODE_NN" NOT NULL ENABLE); + +ALTER TABLE "DEMO_USER"."DEPARTMENT" ADD CONSTRAINT "DEPT_ID_PK" PRIMARY KEY ("DEPT_ID") + USING INDEX ENABLE; + diff --git a/build-ords-apis-in-adb/4-workshop-scripts/create_employee_table.sql b/build-ords-apis-in-adb/4-workshop-scripts/create_employee_table.sql new file mode 100644 index 000000000..67973646c --- /dev/null +++ b/build-ords-apis-in-adb/4-workshop-scripts/create_employee_table.sql @@ -0,0 +1,25 @@ +CREATE TABLE "DEMO_USER"."EMPLOYEE" + ( "EMP_ID" NUMBER GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE , + "EMP_NAME" VARCHAR2(100 BYTE) COLLATE "USING_NLS_COMP", + "DEPT_ID" NUMBER, + "COMMENTS" CLOB COLLATE "USING_NLS_COMP" + ) DEFAULT COLLATION "USING_NLS_COMP" ; + +CREATE UNIQUE INDEX "DEMO_USER"."EMP_ID_PK" ON "DEMO_USER"."EMPLOYEE" ("EMP_ID") + ; + +CREATE INDEX "DEMO_USER"."EMP_DEPARTMENT_IX" ON "DEMO_USER"."EMPLOYEE" ("DEPT_ID") + ; + +ALTER TABLE "DEMO_USER"."EMPLOYEE" MODIFY ("EMP_ID" NOT NULL ENABLE); + +ALTER TABLE "DEMO_USER"."EMPLOYEE" MODIFY ("EMP_NAME" CONSTRAINT "EMP_NAME_NN" NOT NULL ENABLE); + +ALTER TABLE "DEMO_USER"."EMPLOYEE" MODIFY ("DEPT_ID" CONSTRAINT "EMP_DEPT_ID_NN" NOT NULL ENABLE); + +ALTER TABLE "DEMO_USER"."EMPLOYEE" ADD CONSTRAINT "EMP_ID_PK" PRIMARY KEY ("EMP_ID") + USING INDEX ENABLE; + +ALTER TABLE "DEMO_USER"."EMPLOYEE" ADD CONSTRAINT "FK_EMPLOYEE_DEPT" FOREIGN KEY ("DEPT_ID") + REFERENCES "DEMO_USER"."DEPARTMENT" ("DEPT_ID") ENABLE; + diff --git a/build-ords-apis-in-adb/4-workshop-scripts/create_procedure.sql b/build-ords-apis-in-adb/4-workshop-scripts/create_procedure.sql new file mode 100644 index 000000000..fd7c4ec4a --- /dev/null +++ b/build-ords-apis-in-adb/4-workshop-scripts/create_procedure.sql @@ -0,0 +1,34 @@ +CREATE OR REPLACE EDITIONABLE PROCEDURE "DEMO_USER"."PR_ADD_AND_ASSIGN_EMPLOYEE" ( + p_emp_name IN VARCHAR2, + p_dept_code IN VARCHAR2, + p_comments IN CLOB + ) AS + l_dept_id department.dept_id%TYPE; + BEGIN + SELECT dept_id + INTO l_dept_id + FROM department + WHERE UPPER(dept_code) = UPPER(p_dept_code); + + INSERT INTO employee ( + emp_name, + dept_id, + comments + ) + VALUES ( + p_emp_name, + l_dept_id, + p_comments + ); + + EXCEPTION + WHEN NO_DATA_FOUND THEN + raise_application_error( + -20001, + 'Department code not found. Valid values: ' || + 'EN003, FN002, HR001, IT007, LG006, LG009, ' || + 'MK005, OP010, SA004, SP008' + ); + END; +/ + diff --git a/build-ords-apis-in-adb/4-workshop-scripts/create_project_table.sql b/build-ords-apis-in-adb/4-workshop-scripts/create_project_table.sql new file mode 100644 index 000000000..2d4e7a2d7 --- /dev/null +++ b/build-ords-apis-in-adb/4-workshop-scripts/create_project_table.sql @@ -0,0 +1,25 @@ +CREATE TABLE "DEMO_USER"."PROJECT" + ( "PROJ_ID" NUMBER GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE NOKEEP NOSCALE , + "PROJ_NAME" VARCHAR2(100 BYTE) COLLATE "USING_NLS_COMP", + "DEPT_ID" NUMBER, + "IS_ACTIVE" BOOLEAN + ) DEFAULT COLLATION "USING_NLS_COMP" ; + +CREATE UNIQUE INDEX "DEMO_USER"."PROJ_ID_PK" ON "DEMO_USER"."PROJECT" ("PROJ_ID") + ; + +CREATE INDEX "DEMO_USER"."PROJ_DEPARTMENT_IX" ON "DEMO_USER"."PROJECT" ("DEPT_ID") + ; + +ALTER TABLE "DEMO_USER"."PROJECT" MODIFY ("PROJ_ID" NOT NULL ENABLE); + +ALTER TABLE "DEMO_USER"."PROJECT" MODIFY ("PROJ_NAME" CONSTRAINT "PROJ_NAME_NN" NOT NULL ENABLE); + +ALTER TABLE "DEMO_USER"."PROJECT" MODIFY ("DEPT_ID" CONSTRAINT "PROJ_DEPT_ID_NN" NOT NULL ENABLE); + +ALTER TABLE "DEMO_USER"."PROJECT" ADD CONSTRAINT "PROJ_ID_PK" PRIMARY KEY ("PROJ_ID") + USING INDEX ENABLE; + +ALTER TABLE "DEMO_USER"."PROJECT" ADD CONSTRAINT "FK_PROJECT_DEPT" FOREIGN KEY ("DEPT_ID") + REFERENCES "DEMO_USER"."DEPARTMENT" ("DEPT_ID") ENABLE; + diff --git a/build-ords-apis-in-adb/4-workshop-scripts/insert_data.sql b/build-ords-apis-in-adb/4-workshop-scripts/insert_data.sql new file mode 100644 index 000000000..80ce3dcf3 --- /dev/null +++ b/build-ords-apis-in-adb/4-workshop-scripts/insert_data.sql @@ -0,0 +1,41 @@ +-- ========================================== +-- INSERT DATA +-- ========================================== +INSERT INTO DEPARTMENT (DEPT_CODE, ESTABLISHED, DETAILS) VALUES + ('HR001', DATE '2001-04-13', JSON_OBJECT('location' VALUE 'Bldg 1', 'members' VALUE 25)), + ('FN002', DATE '2002-06-20', JSON_OBJECT('location' VALUE 'Bldg 2', 'members' VALUE 20)), + ('EN003', DATE '2000-11-01', JSON_OBJECT('location' VALUE 'Bldg 3', 'members' VALUE 40)), + ('SA004', DATE '2005-01-15', JSON_OBJECT('location' VALUE 'Bldg 4', 'members' VALUE 18)), + ('MK005', DATE '2003-12-07', JSON_OBJECT('location' VALUE 'Bldg 5', 'members' VALUE 15)), + ('LG006', DATE '2010-03-31', JSON_OBJECT('location' VALUE 'Bldg 6', 'members' VALUE 5)), + ('IT007', DATE '2001-09-23', JSON_OBJECT('location' VALUE 'Bldg 7', 'members' VALUE 30)), + ('SP008', DATE '2015-05-05', JSON_OBJECT('location' VALUE 'Bldg 8', 'members' VALUE 12)), + ('LG009', DATE '2012-07-14', JSON_OBJECT('location' VALUE 'Bldg 9', 'members' VALUE 10)), + ('OP010', DATE '2008-08-01', JSON_OBJECT('location' VALUE 'Bldg 10', 'members' VALUE 22)); + COMMIT; + +INSERT INTO PROJECT (PROJ_NAME, DEPT_ID, IS_ACTIVE) VALUES + ('Onboarding', 1, TRUE), + ('Audit2024', 2, FALSE), + ('NewApp', 3, TRUE), + ('SalesCampaign', 4, TRUE), + ('SocialMediaPush', 5, FALSE), + ('Compliance', 6, TRUE), + ('UpgradeInfra', 7, TRUE), + ('HelpdeskRevamp', 8, TRUE), + ('FleetUpdate', 9, TRUE), + ('ProcessReorg', 10, FALSE); + COMMIT; + +INSERT INTO EMPLOYEE (EMP_NAME, DEPT_ID, COMMENTS) VALUES + ('Alice', 1, 'Strong analyst, quick learner.'), + ('Bob', 2, 'CPA certification in progress.'), + ('Carol', 3, 'Dev team lead for NewApp project.'), + ('David', 4, 'Consistent sales over target.'), + ('Eve', 5, 'Leads digital campaigns.'), + ('Frank', 6, 'Subject matter expert in compliance.'), + ('Grace', 7, 'Skilled in infrastructure upgrades.'), + ('Heidi', 8, 'Customer support supervisor.'), + ('Ivan', 9, 'Fleet manager - long tenure.'), + ('Judy', 10, 'Operations management veteran.'); + COMMIT; \ No newline at end of file diff --git a/build-ords-apis-in-adb/4-workshop-scripts/oauth_client.sql b/build-ords-apis-in-adb/4-workshop-scripts/oauth_client.sql new file mode 100644 index 000000000..af61ed7ab --- /dev/null +++ b/build-ords-apis-in-adb/4-workshop-scripts/oauth_client.sql @@ -0,0 +1,42 @@ +-- Generated by ORDS REST Data Services 26.2.3.r2371104 +-- Schema: DEMO_USER Date: Thu Sep 17 07:11:13 2026 +-- + +DECLARE + + l_roles OWA.VC_ARR; + l_modules OWA.VC_ARR; + l_patterns OWA.VC_ARR; + +BEGIN + -- Warning: privileges do not protect modules during + -- OAuth Client standalone export. + + ORDS.CREATE_ROLE( + p_role_name=> 'my.test.role'); + + ORDS_SECURITY.IMPORT_CLIENT( + p_name => 'my_test_oauth_client', + p_client_id => 'rP9btP7w5Md72r6iEK3Tog..', + p_grant_type => 'client_credentials', + p_owner => 'DEMO_USER', + p_description => 'my_test_oauth_client', + p_origins_allowed => NULL, + p_redirect_uri => NULL, + p_support_email => 'my_email@example.com', + p_support_uri => 'https://www.my-company.com/support', + p_token_duration => NULL, + p_refresh_duration => NULL, + p_code_duration => NULL, + p_privilege_names => NULL); + + ORDS_SECURITY.GRANT_CLIENT_ROLE( + p_client_name => 'my_test_oauth_client', + p_role_name => 'my.test.role'); +COMMIT; +EXCEPTION + WHEN OTHERS THEN + ROLLBACK; + RAISE; + +END; \ No newline at end of file diff --git a/build-ords-apis-in-adb/4-workshop-scripts/rest_modules.sql b/build-ords-apis-in-adb/4-workshop-scripts/rest_modules.sql new file mode 100644 index 000000000..9a9be8564 --- /dev/null +++ b/build-ords-apis-in-adb/4-workshop-scripts/rest_modules.sql @@ -0,0 +1,152 @@ + +-- Generated by ORDS REST Data Services 26.2.3.r2371104 +-- Schema: DEMO_USER Date: Thu Sep 17 07:10:41 2026 +-- + +DECLARE + + l_roles OWA.VC_ARR; + l_modules OWA.VC_ARR; + l_patterns OWA.VC_ARR; + +BEGIN + ORDS.ENABLE_SCHEMA( + p_enabled => TRUE, + p_url_mapping_type => 'BASE_PATH', + p_url_mapping_pattern => 'demo_user', + p_auto_rest_auth => TRUE); + + ORDS.DEFINE_MODULE( + p_module_name => 'records.module', + p_base_path => '/v1/', + p_items_per_page => 25, + p_status => 'PUBLISHED', + p_comments => 'An employee records management module consisting of various templates and handlers for performing operations on the following target tables: Department, Project, Employee.'); + + ORDS.DEFINE_TEMPLATE( + p_module_name => 'records.module', + p_pattern => ':dept_id/:is_active?', + p_priority => 0, + p_etag_type => 'HASH', + p_etag_query => NULL, + p_comments => 'An example template that will accept the query parameters dept_id and is_active. Relies on ORDS Automatic Binding to take the path parameters and use them in the provided handler code.'); + + ORDS.DEFINE_HANDLER( + p_module_name => 'records.module', + p_pattern => ':dept_id/:is_active?', + p_method => 'GET', + p_source_type => 'json/collection', + p_items_per_page => 25, + p_mimes_allowed => NULL, + p_comments => NULL, + p_source => +'SELECT + PROJ_ID, + PROJ_NAME, + DEPT_ID, + IS_ACTIVE +FROM + PROJECT +WHERE + DEPT_ID = :dept_id + AND ( :is_active IS NULL + OR IS_ACTIVE = :is_active )'); + + ORDS.DEFINE_TEMPLATE( + p_module_name => 'records.module', + p_pattern => 'emp_recs', + p_priority => 0, + p_etag_type => 'HASH', + p_etag_query => NULL, + p_comments => NULL); + + ORDS.DEFINE_HANDLER( + p_module_name => 'records.module', + p_pattern => 'emp_recs', + p_method => 'POST', + p_source_type => 'plsql/block', + p_items_per_page => 25, + p_mimes_allowed => NULL, + p_comments => NULL, + p_source => +'DECLARE + L_SQLCODE PLS_INTEGER; +BEGIN + DEMO_USER.PR_ADD_AND_ASSIGN_EMPLOYEE( + P_EMP_NAME => :EMP_NAME, + P_DEPT_CODE => :DEPT_CODE, + P_COMMENTS => :COMMENTS + ); + + COMMIT; + :STATUS_CODE := 201; + :RESPONSE_STATUS := ''success''; + :RESPONSE_MESSAGE := ''Employee added.''; +EXCEPTION + WHEN OTHERS THEN + L_SQLCODE := SQLCODE; + ROLLBACK; + :STATUS_CODE := + CASE + WHEN L_SQLCODE = - 20001 THEN + 400 + ELSE + 500 + END; + :RESPONSE_STATUS := ''error''; + :RESPONSE_MESSAGE := + CASE + WHEN L_SQLCODE = - 20001 THEN + ''Department code not found.'' + ELSE + SQLERRM + END; +END;'); + + ORDS.DEFINE_PARAMETER( + p_module_name => 'records.module', + p_pattern => 'emp_recs', + p_method => 'POST', + p_name => 'response_message', + p_bind_variable_name => 'response_message', + p_source_type => 'RESPONSE', + p_param_type => 'STRING', + p_access_method => 'OUT', + p_comments => NULL); + + ORDS.DEFINE_PARAMETER( + p_module_name => 'records.module', + p_pattern => 'emp_recs', + p_method => 'POST', + p_name => 'response_status', + p_bind_variable_name => 'response_status', + p_source_type => 'RESPONSE', + p_param_type => 'STRING', + p_access_method => 'OUT', + p_comments => NULL); + + ORDS.CREATE_ROLE( + p_role_name=> 'my.test.role'); + l_roles(1) := 'my.test.role'; + l_modules(1) := 'records.module'; + + ORDS.DEFINE_PRIVILEGE( + p_privilege_name => 'my.test.privilege', + p_roles => l_roles, + p_patterns => l_patterns, + p_modules => l_modules, + p_label => 'my.test.privilege', + p_description => 'my.test.priv', + p_comments => NULL); + + l_roles.DELETE; + l_modules.DELETE; + l_patterns.DELETE; + +COMMIT; +EXCEPTION + WHEN OTHERS THEN + ROLLBACK; + RAISE; + +END; \ No newline at end of file diff --git a/build-ords-apis-in-adb/intro/intro.md b/build-ords-apis-in-adb/intro/intro.md index 02207dfe1..405554074 100644 --- a/build-ords-apis-in-adb/intro/intro.md +++ b/build-ords-apis-in-adb/intro/intro.md @@ -71,4 +71,4 @@ You may now [proceed to the next lab](#next). ## Last Updated By/Date -- Chris Hoina, September 2025 +- Chris Hoina, August 2026 diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/click-execute-button-batchload-openapi-view.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/click-execute-button-batchload-openapi-view.png deleted file mode 100644 index 1b7a4195b..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/click-execute-button-batchload-openapi-view.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/click-try-it-out-in-batchload-openapi-block.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/click-try-it-out-in-batchload-openapi-block.png deleted file mode 100644 index 19aca8f43..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/click-try-it-out-in-batchload-openapi-block.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/cloud-shell-icon-action.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/cloud-shell-icon-action.png deleted file mode 100644 index 0129f27b8..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/cloud-shell-icon-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/copy-curl-command-action.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/copy-curl-command-action.png deleted file mode 100644 index 07a388d39..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/copy-curl-command-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/copy-icon.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/copy-icon.png deleted file mode 100644 index 1de018684..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/copy-icon.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/curl-command-batchload.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/curl-command-batchload.png deleted file mode 100644 index 53de81503..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/curl-command-batchload.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/curl-command-slider.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/curl-command-slider.png deleted file mode 100644 index bb18b1503..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/curl-command-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/example-curl-command-in-terminal-for-batchload-of-csv.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/example-curl-command-in-terminal-for-batchload-of-csv.png deleted file mode 100644 index 45e0d484a..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/example-curl-command-in-terminal-for-batchload-of-csv.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/execute-curl-command-cloud-shell.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/execute-curl-command-cloud-shell.png deleted file mode 100644 index 806ce4ea5..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/execute-curl-command-cloud-shell.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/expand-the-post-batch-load-open-api-block.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/expand-the-post-batch-load-open-api-block.png deleted file mode 100644 index 74174f964..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/expand-the-post-batch-load-open-api-block.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/lower-cloud-shell-welcome.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/lower-cloud-shell-welcome.png deleted file mode 100644 index c68a311ad..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/lower-cloud-shell-welcome.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/lower-review-query-result.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/lower-review-query-result.png deleted file mode 100644 index 5204e9556..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/lower-review-query-result.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/obtaining-batchload-curl-command-from-openapi-view-block.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/obtaining-batchload-curl-command-from-openapi-view-block.png deleted file mode 100644 index 53b1cddbc..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/obtaining-batchload-curl-command-from-openapi-view-block.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/opening-open-api-view-for-ords-batchload-endpoint.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/opening-open-api-view-for-ords-batchload-endpoint.png deleted file mode 100644 index 7e80aa3d6..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/opening-open-api-view-for-ords-batchload-endpoint.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/output-from-curl-command-in-terminal-for-batchload-of-csv.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/output-from-curl-command-in-terminal-for-batchload-of-csv.png deleted file mode 100644 index 074b40d38..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/output-from-curl-command-in-terminal-for-batchload-of-csv.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/right-click-for-rest.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/right-click-for-rest.png deleted file mode 100644 index 42aba90d8..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/right-click-for-rest.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/run-script-action-compile-function.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/run-script-action-compile-function.png deleted file mode 100644 index d2db373d3..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/run-script-action-compile-function.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/run-statement-sql-worksheet.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/run-statement-sql-worksheet.png deleted file mode 100644 index ea8b05aff..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/run-statement-sql-worksheet.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/test-procedure-with-sql.png b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/test-procedure-with-sql.png deleted file mode 100644 index 49c619978..000000000 Binary files a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/images/test-procedure-with-sql.png and /dev/null differ diff --git a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/load-data-and-biz-objs-ocw23.md b/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/load-data-and-biz-objs-ocw23.md deleted file mode 100644 index 8ede22baf..000000000 --- a/build-ords-apis-in-adb/load-data-and-biz-objs-ocw23/load-data-and-biz-objs-ocw23.md +++ /dev/null @@ -1,193 +0,0 @@ -# Load data and create business logic - -## Introduction - -In this lab you will use the batch load API to load large amounts of data into a table. - -Estimated Lab Time: 20 minutes - -Watch the video below for a quick walk-through of the lab. -[Load data and create business logic](videohub:1_rgksftgt) - -### Objectives - -- Load a CSV of over 2 million rows into the CSV_DATA table -- Create PL/SQL business objects in the database - -### Prerequisites - -- The following lab requires an [Oracle Cloud account](https://www.oracle.com/cloud/free/). You may use your own cloud account, a cloud account that you obtained through a trial, or a training account whose details were given to you by an Oracle instructor. - -- This lab assumes you have completed all previous Labs. - -## Task 1: Download a CSV from an OCI Cloud Storage Bucket - -1. Next we will use the `BATCHLOAD` `HTTP` method to insert data, from a CSV file, into your table. We'll accomplish this with a `curl` command. - -2. Before executing this `curl` command, you'll need to retrieve a large CSV file from an OCI Cloud Storage Bucket. You can perform these next steps using a local computer with `cURL` installed or with the **Oracle Cloud Infrastructure Cloud Shell**. - - ![Cloud Shell on Oracle Cloud Infrastructure Banner](./images/cloud-shell-icon-action.png " ") - -
- 💡***CLICK to learn more*** **about the OCI Cloud Shell.** -
Every Oracle Cloud Infrastructure account has Cloud Shell--a web browser-based terminal accessible from the Oracle Cloud Console.

- It provides access to a Linux shell, with a pre-authenticated Oracle Cloud Infrastructure CLI, pre-authenticated Ansible installation, and other useful tools. Available to all OCI users, the Cloud Shell will appear in the Oracle Cloud Console as a persistent frame of the Console, and will stay active as you navigate to different pages of the Console. -

- To use the Cloud Shell, after logging into your Oracle Cloud Infrastructure account, click the Cloud Shell icon in the upper right of the Oracle Cloud Infrastructure banner. -
- -3. Using the below `curl` command, download the CSV file to a directory in your OCI Cloud Shell, or your local computer. - - ````curl - curl -o 2M.csv https://c4u04.objectstorage.us-ashburn-1.oci.customer-oci.com/p/EcTjWk2IuZPZeNnD_fYMcgUhdNDIDA6rt9gaFj_WZMiL7VvxPBNMY60837hu5hga/n/c4u04/b/livelabsfiles/o/developer-library/2M.csv - ```` - -4. Now that you have the file locally, you can batch load it to your `CSV_DATA` table. To do this you will need to retrieve the `BATCHLOAD` ORDS endpoint, from your `REST`-enabled table. - -## Task 2: Retrieve your Batchload REST-endpoint - -
-

Oracle CloudWorld 2023 Exclusive

-
- -1. Navigate to the OpenAPI view for the `CSV_DATA` table, as shown in the previous lab. - - ![opening-open-api-view-for-ords-batchload-endpoint](./images/opening-open-api-view-for-ords-batchload-endpoint.png " ") - -2. Expand the `POST/batchload` block. - - ![expand-the-post-batch-load-open-api-block](./images/expand-the-post-batch-load-open-api-block.png " ") - - Click the `Try it out` button, followed by the `Execute` button. - - ![expand-the-post-batch-load-open-api-block](./images/click-try-it-out-in-batchload-openapi-block.png " ") - - ![click-execute-button-batchload-openapi-view](./images/click-execute-button-batchload-openapi-view.png " ") - - Under the `Responses` section, you will see a sample `curl` command. Copy this command, save it to a clipboard; we'll use this as the basis for your own `curl` command. - - ![obtaining-batchload-curl-command-from-openapi-view-block](./images/obtaining-batchload-curl-command-from-openapi-view-block.png " ") - -3. You can retain the headers (indicated by `-H`), but change the `-d` (aka `--data`) to `--data-binary` followed by the filename or filepath [of where you saved the `2M.csv` file]. - -
- 💡***CLICK to learn*** **why we use `--data-binary`.** -
This will perform a POST much like when using the --data option, only exactly as specified with no extra processing. -

- Newlines and carriage returns are preserved and conversions are never performed. To pass in a filename, use the @ character, followed by the filename or filepath. -
-
- -4. Your `curl` command should resemble what you see below. In this example, you'll notice an additional, *optional* `--write-out` option; which will provide you with a summary of the `POST` request's operation. You'll also notice a `--user` header for your user's credentials. - - ```sh - - curl --write-out '%{time_total}' -X 'POST' \ - 'http://localhost:8080/ords/ordstest/csv_data/batchload?batchRows=5000' \ - -H 'accept: application/json' \ - -H 'Content-Type: text/csv' \ - --user 'ordstest:password1234' \ - --data-binary '@/Users/choina/Desktop/2M.csv' - - ``` - -
- ⚠️***CLICK if on Windows/PC*** **your cURL command may look different!** - - - ```sh - - curl --write-out '%{time_total}' ^ - -X POST --data-binary "@/Users/choina/Desktop/2M.csv" ^ - -H "Content-Type: text/csv" ^ - "http://localhost:8080/ords/ordstest/csv_data/batchload?batchRows=5000" - - ``` -
- -## Task 3: Batchload data into your CSV_DATA table - -1. You may execute the `curl` command in the shell or your choice (locally or within the OCI Cloud Shell). Below is a sample output: - - ![example-curl-command-in-terminal-for-batchload-of-csv](./images/example-curl-command-in-terminal-for-batchload-of-csv.png " ") - - ![output-from-curl-command-in-terminal-for-batchload-of-csv](./images/output-from-curl-command-in-terminal-for-batchload-of-csv.png " ") - -2. Next, return to the **SQL worksheet**. You can verify the batch load is running (or has completed) by executing the following SQL: - - ```sql - - select count(*) from csv_data; - - ``` - - Execute the statement by highlighting the command with your mouse, then point and click the green arrow (**Run Statement**) button in the tool bar. Alternatively you may press `Ctrl-Enter / Return` (on Windows) or `Command + Enter / Return` (MacOS) while on the same line as the SQL statement. - - ![running a SQL command in the sql worksheet](./images/run-statement-sql-worksheet.png) - - Either method will yield the following result: - - ![SQL results](./images/lower-review-query-result.png) - -## Task 4: Add a function to simulate business logic - -1. Next you'll **add a function** to your database schema to simulate the execution of business logic. - - The following procedure returns a count of all the rows that match an input provided to *col2 of the table*: - - ````plsql - - create or replace procedure return_count (p_input in varchar2, - p_output out number) - is - begin - - select count(*) - into p_output - from csv_data - where col2 = p_input; - - end return_count; - / - - ```` - - Copy and paste this code into the SQL Worksheet and left click the **Run Script** button on the toolbar: - - ![compile the function in the sql worksheet](./images/run-script-action-compile-function.png) - -2. We can test this function with the following PL/SQL block. Copy and paste the following into the SQL Worksheet and execute the block with the **Run Script** button: - - ````pl/sql - - declare - l_output number; - begin - - return_count(p_input => 'a1', - p_output => l_output); - - dbms_output.put_line(l_output); - - end; - / - - ```` - - ![SQL to try out the procedure](./images/test-procedure-with-sql.png) - -3. In this lab, you loaded over two million rows into a table with `cURL` and an ORDS `REST` endpoint as well as added business logic to the database. - -You may now [proceed to the next lab](#next). - -## Acknowledgements - -### Author - -- Jeff Smith, Distinguished Product Manager -- Chris Hoina, Senior Product Manager - -### Last Updated By/Date - -- Chris Hoina, September 2023 - diff --git a/build-ords-apis-in-adb/provision-and-connect-to-adb/provision-and-connect-to-new-adb.md b/build-ords-apis-in-adb/provision-and-connect-to-adb/provision-and-connect-to-new-adb.md index b67bab044..679e6b86c 100644 --- a/build-ords-apis-in-adb/provision-and-connect-to-adb/provision-and-connect-to-new-adb.md +++ b/build-ords-apis-in-adb/provision-and-connect-to-adb/provision-and-connect-to-new-adb.md @@ -18,11 +18,11 @@ Estimated lab time: 10 minutes 1. Log in to the Oracle Cloud, as shown in the previous lab. Once you are logged in, click the navigation menu in the upper left of the Cloud Console. - ![Navigate to OCI menu](./images/1-oci-dashboard.png " ") + ![Navigate to OCI menu](./images/1-oci-dashboard.png " ") 2. Select Oracle AI Database, then Autonomous AI Database. - ![Choose Oracle Database](./images/2-navigate-oracle-database.png " ") + ![Choose Oracle Database](./images/2-navigate-oracle-database.png " ") 3. Ensure you are in your Root compartment; select the **Create Autonomous AI Database** button. @@ -32,25 +32,25 @@ Estimated lab time: 10 minutes 1. Begin by entering in a unique Display name and Database name. Ensure you are in your Root compartment, choose Lakehouse or Transaction Processing as the Workload type. - ![Entering in db details, above the fold](./images/5-create-ai-db-root-compartment.png " ") + ![Entering in db details, above the fold](./images/5-create-ai-db-root-compartment.png " ") 2. Toggle the Always Free radio button to the on position. Choose 26ai as the database version. - ![Entering in db details, below the fold](./images/6-select-type-and-version.png " ") + ![Entering in db details, below the fold](./images/6-select-type-and-version.png " ") 3. Enter in a password for your ADB's Administrator. - ![Admin password and network settings](./images/7-admin-password.png " ") + ![Admin password and network settings](./images/7-admin-password.png " ") -> NOTE: For security purposes, this password should differ from your Tenany Administrator password.

-> NOTE: The password must meet the following requirements: -> - The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character. -> - The password cannot contain the username. -> - The password cannot contain the double quote (") character. + > NOTE: For security purposes, this password should differ from your Tenany Administrator password.

+ > NOTE: The password must meet the following requirements: + > - The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character. + > - The password cannot contain the username. + > - The password cannot contain the double quote (") character. 4. Keep the default Network access settings: Secure access from everywhere. Finally, enter in your valid email address, and click **Create**. - ![Admin password and network settings](./images/8-secure-access-email-create.png " ") + ![Admin password and network settings](./images/8-secure-access-email-create.png " ") 5. You will automatically be redirected to your new Autonomous AI Database shboard. In a few moments the Autonomous AI Database will transition from a **Provisioning** state to an **Available** state. @@ -60,7 +60,7 @@ Estimated lab time: 10 minutes 1. Once the Autonomous AI DB reaches an Available state, click the **Database actions** button, and selecet **View all database actions** from the dropdown menu. - ![New ADB in provisioning status](./images/10-available-status-to-database-actions.png " ") + ![New ADB in provisioning status](./images/10-available-status-to-database-actions.png " ") 2. A new browser tab or window will appear, revealing the Database Actions LaunchPad. If you are not automatically logged in, sign in with username Admin, and the password you created when you created your ADB (see step 7 above). diff --git "a/build-ords-apis-in-adb/rest-enable-objects-ocw23/Screenshot 2025-09-25 at 10.36.16\342\200\257AM.png" "b/build-ords-apis-in-adb/rest-enable-objects-ocw23/Screenshot 2025-09-25 at 10.36.16\342\200\257AM.png" deleted file mode 100644 index 2abcc2687..000000000 Binary files "a/build-ords-apis-in-adb/rest-enable-objects-ocw23/Screenshot 2025-09-25 at 10.36.16\342\200\257AM.png" and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/adding-source-field-code-toggle.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/adding-source-field-code-toggle.png deleted file mode 100644 index 935d66742..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/adding-source-field-code-toggle.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/adding-source-field.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/adding-source-field.png deleted file mode 100644 index d2b63b200..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/adding-source-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/adding-substitution-value-null-output.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/adding-substitution-value-null-output.png deleted file mode 100644 index 1dd393420..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/adding-substitution-value-null-output.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/base-path-field.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/base-path-field.png deleted file mode 100644 index aa9073c41..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/base-path-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bind-variable-modal.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bind-variable-modal.png deleted file mode 100644 index 076729ecf..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bind-variable-modal.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bizlogic-block-in-openapi-viewer.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bizlogic-block-in-openapi-viewer.png deleted file mode 100644 index fcb185e7c..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bizlogic-block-in-openapi-viewer.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bizlogic-breadcrum-action.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bizlogic-breadcrum-action.png deleted file mode 100644 index c12ab6a22..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bizlogic-breadcrum-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bizlogic-breadcrumbs-to-openapi-viewer.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bizlogic-breadcrumbs-to-openapi-viewer.png deleted file mode 100644 index 9fb405800..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/bizlogic-breadcrumbs-to-openapi-viewer.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/choose-modules-actions-menu.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/choose-modules-actions-menu.png deleted file mode 100644 index 9c786c8dd..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/choose-modules-actions-menu.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/choose-rest-db-actions-menu.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/choose-rest-db-actions-menu.png deleted file mode 100644 index 78ca17ed6..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/choose-rest-db-actions-menu.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/click-try-it-out-button-in-post-block.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/click-try-it-out-button-in-post-block.png deleted file mode 100644 index ca5362c62..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/click-try-it-out-button-in-post-block.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/copied-curl-command-bizlogic.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/copied-curl-command-bizlogic.png deleted file mode 100644 index e892ff33d..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/copied-curl-command-bizlogic.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/creat-template-finish.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/creat-template-finish.png deleted file mode 100644 index 8b63e5536..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/creat-template-finish.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-final-handler-slider.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-final-handler-slider.png deleted file mode 100644 index faf1833d6..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-final-handler-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-action.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-action.png deleted file mode 100644 index af8a3ccf5..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-bizlogic.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-bizlogic.png deleted file mode 100644 index 7d151e71e..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-bizlogic.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-final-action.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-final-action.png deleted file mode 100644 index 9221cc2dd..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-final-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-slider.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-slider.png deleted file mode 100644 index 690921453..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-handler-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-module-action.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-module-action.png deleted file mode 100644 index 1ce5d2de4..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-module-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-module-submit.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-module-submit.png deleted file mode 100644 index f5b48e106..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-module-submit.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-new-module-slider.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-new-module-slider.png deleted file mode 100644 index a5af06470..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-new-module-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-parameter-button.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-parameter-button.png deleted file mode 100644 index cafc1e6a5..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-parameter-button.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-parameter-input-fields.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-parameter-input-fields.png deleted file mode 100644 index b225ce3bc..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-parameter-input-fields.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-parameter-slider.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-parameter-slider.png deleted file mode 100644 index 9b61e5541..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-parameter-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-template-action.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-template-action.png deleted file mode 100644 index 8741e8d33..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-template-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-template-finish.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-template-finish.png deleted file mode 100644 index 073bfd131..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-template-finish.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-template-slider.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-template-slider.png deleted file mode 100644 index 68f290c42..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/create-template-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/curl-command-in-cloud-shell.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/curl-command-in-cloud-shell.png deleted file mode 100644 index 1ffdb6315..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/curl-command-in-cloud-shell.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/curl-command-modal-bizlogic.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/curl-command-modal-bizlogic.png deleted file mode 100644 index 7b0276f4c..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/curl-command-modal-bizlogic.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/curl-command-reminder.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/curl-command-reminder.png deleted file mode 100644 index d44c2b9bd..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/curl-command-reminder.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/db-actions-breadcrumbs.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/db-actions-breadcrumbs.png deleted file mode 100644 index d86eddcdf..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/db-actions-breadcrumbs.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/enter-uri-template-field.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/enter-uri-template-field.png deleted file mode 100644 index 7a636bdb9..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/enter-uri-template-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/example-bizlogic-curl-command-pre-execution.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/example-bizlogic-curl-command-pre-execution.png deleted file mode 100644 index 0e753b22d..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/example-bizlogic-curl-command-pre-execution.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/execute-button-in-source.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/execute-button-in-source.png deleted file mode 100644 index a2c3de4dc..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/execute-button-in-source.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/execute-button.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/execute-button.png deleted file mode 100644 index 019d521df..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/execute-button.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/explore-apis-in-open-api-view.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/explore-apis-in-open-api-view.png deleted file mode 100644 index 123f3937e..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/explore-apis-in-open-api-view.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/export-open-apis-action.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/export-open-apis-action.png deleted file mode 100644 index 09a98e7db..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/export-open-apis-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/final-create-parameter-action.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/final-create-parameter-action.png deleted file mode 100644 index 28c240f1c..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/final-create-parameter-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/handler-slider-for-bizlogic.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/handler-slider-for-bizlogic.png deleted file mode 100644 index f0e9f0393..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/handler-slider-for-bizlogic.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/module-name-field.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/module-name-field.png deleted file mode 100644 index 1cd9ab2ca..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/module-name-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/module-overview-page.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/module-overview-page.png deleted file mode 100644 index 3c39a52b1..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/module-overview-page.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/navigating-to-bizlogic-openapi-viewer.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/navigating-to-bizlogic-openapi-viewer.png deleted file mode 100644 index 7add776d8..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/navigating-to-bizlogic-openapi-viewer.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/open-api-as-swagger-view.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/open-api-as-swagger-view.png deleted file mode 100644 index ed6ab4aa9..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/open-api-as-swagger-view.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/open-api-example-export.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/open-api-example-export.png deleted file mode 100644 index 4aea355b9..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/open-api-example-export.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/open-api-select-module.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/open-api-select-module.png deleted file mode 100644 index 03a6065bc..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/open-api-select-module.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/output-from-openapi-view-post-test-with-curl-command-included.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/output-from-openapi-view-post-test-with-curl-command-included.png deleted file mode 100644 index 82b1f301f..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/output-from-openapi-view-post-test-with-curl-command-included.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-access-method-field.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-access-method-field.png deleted file mode 100644 index 98b6dd0e6..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-access-method-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-in-report-table.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-in-report-table.png deleted file mode 100644 index d6a0c3b6e..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-in-report-table.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-parameter-type-field.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-parameter-type-field.png deleted file mode 100644 index 2f59fdf95..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-parameter-type-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-source-type.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-source-type.png deleted file mode 100644 index 738b9c587..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/parameter-source-type.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/pop-menu.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/pop-menu.png deleted file mode 100644 index f1c69b2b0..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/pop-menu.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/pop-out-icon-template-region.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/pop-out-icon-template-region.png deleted file mode 100644 index b77861c31..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/pop-out-icon-template-region.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/replacing-response-body-string-with-a1-in-post-request.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/replacing-response-body-string-with-a1-in-post-request.png deleted file mode 100644 index 3ce04368f..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/replacing-response-body-string-with-a1-in-post-request.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/response-block-with-generic-string-in-post-body.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/response-block-with-generic-string-in-post-body.png deleted file mode 100644 index 034809510..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/response-block-with-generic-string-in-post-body.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/results-from-bizlogic-curl-command-in-terminal.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/results-from-bizlogic-curl-command-in-terminal.png deleted file mode 100644 index 49d5d9258..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/results-from-bizlogic-curl-command-in-terminal.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/return-to-main-with-breadcrumb.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/return-to-main-with-breadcrumb.png deleted file mode 100644 index 818bbf049..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/return-to-main-with-breadcrumb.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/select-bizlogic-handler-curl-command.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/select-bizlogic-handler-curl-command.png deleted file mode 100644 index d7e17b3e8..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/select-bizlogic-handler-curl-command.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/select-post-for-handler.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/select-post-for-handler.png deleted file mode 100644 index 065419163..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/select-post-for-handler.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/setting-privileges-field.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/setting-privileges-field.png deleted file mode 100644 index ee1754bbf..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/setting-privileges-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/show-template-code-toggle.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/show-template-code-toggle.png deleted file mode 100644 index 0d133cf1c..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/show-template-code-toggle.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/source-entered-in-handler-slider.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/source-entered-in-handler-slider.png deleted file mode 100644 index 44a6abd4e..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/source-entered-in-handler-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/source-query-results.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/source-query-results.png deleted file mode 100644 index 13104b52e..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/source-query-results.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/substitutions-icon-for-bizlogic.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/substitutions-icon-for-bizlogic.png deleted file mode 100644 index 9582d48db..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/substitutions-icon-for-bizlogic.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/template-page-overview.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/template-page-overview.png deleted file mode 100644 index 897828f61..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/template-page-overview.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/toggle-show-code-option.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/toggle-show-code-option.png deleted file mode 100644 index 1b67462f4..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/toggle-show-code-option.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/updated-url-with-bind-variable.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/updated-url-with-bind-variable.png deleted file mode 100644 index 3c4c29b08..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/updated-url-with-bind-variable.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/uri-template-field.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/uri-template-field.png deleted file mode 100644 index 7b6a78daf..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/uri-template-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/url-with-bind-variable.png b/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/url-with-bind-variable.png deleted file mode 100644 index 72a2090f7..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects-ocw23/images/url-with-bind-variable.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects-ocw23/rest-enable-objects-ocw23.md b/build-ords-apis-in-adb/rest-enable-objects-ocw23/rest-enable-objects-ocw23.md deleted file mode 100644 index f9244081a..000000000 --- a/build-ords-apis-in-adb/rest-enable-objects-ocw23/rest-enable-objects-ocw23.md +++ /dev/null @@ -1,306 +0,0 @@ -# REST-enable tables and add business logic - -## Introduction - -In this lab, you will use Database Actions and the REST console to build a REST API using a parameterized PL/SQL procedure and SQL statement. - -Estimated Lab Time: 20 minutes - -Watch the video below for a quick walk-through of the lab. -[REST-enable tables and add business logic](videohub:1_y8l03s43) - -### Objectives - -- Publish REST API using Custom SQL -- Publish REST API using stored PL/SQL procedure -- Explore the OpenAPI View created by ORDS - -### Prerequisites - -- The following lab requires an [Oracle Cloud account](https://www.oracle.com/cloud/free/). You may use your own cloud account, a cloud account that you obtained through a trial, or a training account whose details were given to you by an Oracle instructor. - -- This lab assumes you have completed all previous Labs. - -## Task 1: REST Enable a custom SQL Statement - -💡 *If this is your first time accessing the REST Workshop, you will be presented with a guided tour. Complete the tour or click the `X` in any tour popup window to quit the tour.* - -1. Start by navigating to the **Database Actions Menu** in the upper left of the page and select **REST**. - - ![DB Actions Menus, choose REST](./images/choose-rest-db-actions-menu.png) - -2. Once on the **REST page**, use the upper tab bar to select **Modules**. - - ![REST Tab Menu, choose Modules](./images/choose-modules-actions-menu.png) - -3. On the Modules page, left click the **+ Create Module** button in the upper right. - - ![Left click the + Create Modules button](./images/create-module-action.png) - -4. The **Create Module** slider appears from the right of the page. - - ![Create Modules slider](./images/create-new-module-slider.png) - -5. Using the **Create Module** slider, begin by adding a Module name. Use the following: **com.oracle.livelab.api** - - ````sql - com.oracle.livelab.api - ```` - - 💡 *A module is an organizational unit used to group related resource templates. Templates will have handlers, which are responsible for providing the logic required to service a specific HTTP method (e.g., GET, POST, PUT, DELETE, UPDATE, etc.).* - - ![Create Modules slider](./images/module-name-field.png) - -6. For the **Base Path** field, use the default of **/api/**. Enter **/api/** in the **base path field**: - - ````sql - /api/ - ```` - - ![Create Modules slider](./images/base-path-field.png) - - Next, select **Not Protected** from the **Protected By Privilege** dropdown list. - - ![Protected By Privilege** select list](./images/setting-privileges-field.png) - -7. When the **Create Module** slider resembles the below image, left click the **Create** button. - - ![Create Modules slider](./images/create-module-submit.png) - - 💡 *Here you can toggle **`Show code`** to review what module creation might look like if it was performed manually.* - - ![Toggle Show Code to review what is happening under the covers](./images/toggle-show-code-option.png) - -8. Our module has now been created. - - ![The Modules page](./images/module-overview-page.png) - - Next we'll create a **Template** for our newly created module. Start by left clicking the **+ Create Template** button on the right side of the page, located directly under the module we just created. - - ![Left click the + Create Template button](./images/create-template-action.png) - -9. The **Create Template** slider emerges from the right of the page. - - ![Create Template slider](./images/create-template-slider.png) - - Here we will create the endpoint, or URL location, for our REST enabled SQL Statement. This statement will expect a value. - -10. In the **URI Template** template field, enter **sqlreport/:id** - - ````sql - sqlreport/:id - ```` - - ![URI Template field](./images/enter-uri-template-field.png) - -11. When the **URI Template** slider resembles the below image, left click the **Create** button. - - ![Create Modules slider with all info, left click create](./images/create-template-finish.png) - - 💡 *Toggle **`Show code`** to review what template creation might look like if it was performed manually.* - - ![Toggle Show Code to review what is happening under the covers](./images/show-template-code-toggle.png) - -12. Now that the template has been created, we need to create the **Handler** that will contain the SQL Statement. - - ![Templates Page](./images/template-page-overview.png) - - Click the **+ Create Handler** button on the right of the page, just below our newly created template. - - ![Left click the + Create Handler button](./images/create-handler-action.png) - -13. The **Create Handler** slider comes out of the right of the page. - - ![Create Handler slider](./images/create-handler-slider.png) - - Here we will enter the SQL used by our REST endpoint. - -14. Enter **select * from csv_data where col2 = :id** in the **Source** section of the **Create Handler** slider: - - ````sql - select * from csv_data where col2 = :id - ```` - - ![Source Field](./images/adding-source-field.png) - - 💡 *Toggle **`Show code`** to review the code for fields in the GUI.* - - ![Source Field Toggle](images/adding-source-field-code-toggle.png) - -15. When the **Create Handler** slider resembles the below image, left click the **Create** button. - - ![Create Handler slider with all info, left click create](./images/create-handler-final-action.png) - -16. We can test our Handler on the Template page. Click the **execute** button ![execute query button](./images/execute-button.png) in the **Source** section of the page. - - ![Execute button in source section of the page](./images/execute-button-in-source.png) - -17. After clicking the **execute** button ![execute query button](./images/execute-button.png), a **Bind Variables** modal will appear. Enter **a1** for the value in **id field** and then left click **OK** on the modal. - - ![Bind Variables modal](./images/bind-variable-modal.png) - -18. You can see the results of the query just below the **Source** section. (You may need to scroll the page down): - - ![Source query results](./images/source-query-results.png) - -19. We can try test the REST endpoint by clicking the pop out icon in the Template region on the top of the page. - - ![pop out icon in the Template region on the top of the page](./images/pop-out-icon-template-region.png) - -20. In the new browser tab/window with the REST endpoint URL... - - ![URL with bind variable](./images/url-with-bind-variable.png) - - ...replace the :id with a1 and submit the URL. - - ![submitted URL and working REST service](./images/updated-url-with-bind-variable.png) - -## Task 2: REST Enable Business Logic (PL/SQL procedure) - -1. Next, we'll REST enable our Business Logic, or PL/SQL procedure, created in the previous lab. Begin by left clicking the `com.oracle.livelab.api` Module in the Database Actions breadcrumbs in the upper left of the page. - - ![Database Actions breadcrumbs](./images/db-actions-breadcrumbs.png) - -2. We'll again create a new **Template**. Left click the **+ Create Template** button on the right side of the page (located under our Module). - - ![Left click the + Create Template button](./images/create-template-action.png) - -3. The **Create Template** appears from the right of the page. - - ![Create Template slider](./images/create-template-slider.png) - -4. In the **URI Template** template field, enter `bizlogic` - - ````sql - bizlogic - ```` - - ![URI Template field](./images/uri-template-field.png) - -5. When the **URI Template** slider resembles the below image, left click the **Create** button. - - ![Create Template slider with all info, left click create](./images/creat-template-finish.png) - -6. Click the **+ Create Handler** button on the right of the page, located below our newly created Template. - - ![Left click the + Create Handler button](./images/create-handler-bizlogic.png) - -7. The **Create Handler** slider appears from the right of the page. - - ![Create Handler slider](./images/handler-slider-for-bizlogic.png) - -8. We need to change the **Method** from `GET` to `POST` since we are submitting a value to the REST Service. Use the dropdown in the **Method** field to select **POST**. - - ![Selecting POST using the dropdown in the Method field](./images/select-post-for-handler.png) - - Upon changing the **Method** to post, we see the **Source Type** change to PL/SQL. - -9. Now, in the **Source** field, enter the following PL/SQL: - - ````plsql - - BEGIN - return_count(p_input => :id, p_output => :output); - end; - - ```` - - ![Create Handler slider](./images/source-entered-in-handler-slider.png) - -10. When the **Create Handler** slider resembles the below image, left click the **Create** button. - - ![Create Handler slider with all info, left click create](./images/create-final-handler-slider.png) - -11. Next we'll create an output parameter so we can return a result. - - On the bottom on the bizlogic details page, under the **Source** area, locate the **+ Create Parameter** button. Left click the **+ Create Parameter** button. - - ![Left click the + Create Parameter button](./images/create-parameter-button.png) - -12. The **Create Parameter** slider appears from the right of the page: - - ![Create Parameter slider](./images/create-parameter-slider.png) - -13. For the **Parameter Name** field and the **Bind Variable Name** field, enter **output** - - ````sql - output - ```` - - ![Create Parameter name field](./images/create-parameter-input-fields.png) - -14. For the **Source Type** field, use the dropdown and select **Response** - - ![Source Type field](./images/parameter-source-type.png) - -15. For the **Parameter Type** field, use the dropdown and select **INT**. (Remember, we are returning a number) - - ![Parameter Type field](./images/parameter-parameter-type-field.png) - -16. Lastly, for the **Access Method**, use the dropdown and select **Output** - - ![Access Method field](./images/parameter-access-method-field.png) - -17. When the **Create Parameter** slider resembles the below image, left click the **Create** button. - - ![Create Parameter slider with all info, left click create](./images/final-create-parameter-action.png) - -18. You will see the newly created parameter in the **Parameters** table on the bottom of the page. - - ![Parameter created in report](./images/parameter-in-report-table.png) - - We are now ready to test this REST API. - -## Task 3: Test the REST API - -
-

Oracle CloudWorld 2023 Exclusive

-
- - -1. Use the REST Workshop breadcrumbs to navigate to the `com.oracle.livelab.api` Resource Module. - - ![bizlogic-breadcrum-action.png](./images/bizlogic-breadcrum-action.png " ") - -2. Navigate to the OpenAPI View of the `com.oracle.livelab.api` Resource Module. - - ![navigating-to-bizlogic-openapi-viewer](./images/navigating-to-bizlogic-openapi-viewer.png " ") - -3. Locate the `POST /bizlogic` block. and expand it. - - ![bizlogic-block-in-openapi-viewer](./images/bizlogic-block-in-openapi-viewer.png " ") - -4. Click the `Try it out` button. - - ![click-try-it-out-button-in-post-block.png](./images/click-try-it-out-button-in-post-block.png " ") - -5. In the Request Body, replace `"string"` with `"a1"`. - - ![response-block-with-generic-string-in-post-body](./images/response-block-with-generic-string-in-post-body.png " ") - - ![replacing-response-body-string-with-a1-in-post-request](./images/replacing-response-body-string-with-a1-in-post-request.png " ") - -6. Click the `Execute` button, and then review the results of the request in the Server response section. You should see `"output"` followed by a count value. - - ![output-from-openapi-view-post-test-with-curl-command-included](./images/output-from-openapi-view-post-test-with-curl-command-included.png " ") - -7. Alternatively, you can simulate an application's POST request with a `curl` command. Using the `curl` command from the OpenAPI View's Responses section, issue a `POST` request in your local Terminal or the OCI Cloud Shell. Your results should look similar. - - ![example-bizlogic-curl-command-pre-execution](./images/example-bizlogic-curl-command-pre-execution.png " ") - - ![results-from-bizlogic-curl-command-in-terminal](./images/results-from-bizlogic-curl-command-in-terminal.png " ") - -8. In this lab, you published a REST API using custom SQL to accept an input as well as published a REST API using a stored PL/SQL procedure. - -You may now [proceed to the next lab](#next). - -## Acknowledgements - -### Author - -- Jeff Smith, Distinguished Product Manager -- Chris Hoina, Senior Product Manager - -### Last Updated By/Date - -- Chris Hoina, September 2023 \ No newline at end of file diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/adding-source-field-code-toggle.png b/build-ords-apis-in-adb/rest-enable-objects/images/adding-source-field-code-toggle.png deleted file mode 100644 index 935d66742..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/adding-source-field-code-toggle.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/adding-source-field.png b/build-ords-apis-in-adb/rest-enable-objects/images/adding-source-field.png deleted file mode 100644 index d2b63b200..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/adding-source-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/adding-substitution-value-null-output.png b/build-ords-apis-in-adb/rest-enable-objects/images/adding-substitution-value-null-output.png deleted file mode 100644 index 1dd393420..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/adding-substitution-value-null-output.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/base-path-field.png b/build-ords-apis-in-adb/rest-enable-objects/images/base-path-field.png deleted file mode 100644 index aa9073c41..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/base-path-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/bind-variable-modal.png b/build-ords-apis-in-adb/rest-enable-objects/images/bind-variable-modal.png deleted file mode 100644 index 076729ecf..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/bind-variable-modal.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/bizlogic-breadcrum-action.png b/build-ords-apis-in-adb/rest-enable-objects/images/bizlogic-breadcrum-action.png deleted file mode 100644 index c12ab6a22..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/bizlogic-breadcrum-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/choose-modules-actions-menu.png b/build-ords-apis-in-adb/rest-enable-objects/images/choose-modules-actions-menu.png deleted file mode 100644 index 9c786c8dd..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/choose-modules-actions-menu.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/choose-rest-db-actions-menu.png b/build-ords-apis-in-adb/rest-enable-objects/images/choose-rest-db-actions-menu.png deleted file mode 100644 index 78ca17ed6..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/choose-rest-db-actions-menu.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/copied-curl-command-bizlogic.png b/build-ords-apis-in-adb/rest-enable-objects/images/copied-curl-command-bizlogic.png deleted file mode 100644 index e892ff33d..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/copied-curl-command-bizlogic.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/creat-template-finish.png b/build-ords-apis-in-adb/rest-enable-objects/images/creat-template-finish.png deleted file mode 100644 index 8b63e5536..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/creat-template-finish.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-final-handler-slider.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-final-handler-slider.png deleted file mode 100644 index faf1833d6..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-final-handler-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-action.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-action.png deleted file mode 100644 index af8a3ccf5..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-bizlogic.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-bizlogic.png deleted file mode 100644 index 7d151e71e..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-bizlogic.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-final-action.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-final-action.png deleted file mode 100644 index 9221cc2dd..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-final-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-slider.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-slider.png deleted file mode 100644 index 690921453..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-handler-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-module-action.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-module-action.png deleted file mode 100644 index 1ce5d2de4..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-module-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-module-submit.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-module-submit.png deleted file mode 100644 index f5b48e106..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-module-submit.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-new-module-slider.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-new-module-slider.png deleted file mode 100644 index a5af06470..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-new-module-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-parameter-button.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-parameter-button.png deleted file mode 100644 index cafc1e6a5..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-parameter-button.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-parameter-input-fields.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-parameter-input-fields.png deleted file mode 100644 index b225ce3bc..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-parameter-input-fields.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-parameter-slider.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-parameter-slider.png deleted file mode 100644 index 9b61e5541..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-parameter-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-template-action.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-template-action.png deleted file mode 100644 index 8741e8d33..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-template-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-template-finish.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-template-finish.png deleted file mode 100644 index 073bfd131..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-template-finish.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/create-template-slider.png b/build-ords-apis-in-adb/rest-enable-objects/images/create-template-slider.png deleted file mode 100644 index 68f290c42..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/create-template-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/curl-command-in-cloud-shell.png b/build-ords-apis-in-adb/rest-enable-objects/images/curl-command-in-cloud-shell.png deleted file mode 100644 index 1ffdb6315..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/curl-command-in-cloud-shell.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/curl-command-modal-bizlogic.png b/build-ords-apis-in-adb/rest-enable-objects/images/curl-command-modal-bizlogic.png deleted file mode 100644 index 7b0276f4c..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/curl-command-modal-bizlogic.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/curl-command-reminder.png b/build-ords-apis-in-adb/rest-enable-objects/images/curl-command-reminder.png deleted file mode 100644 index d44c2b9bd..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/curl-command-reminder.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/db-actions-breadcrumbs.png b/build-ords-apis-in-adb/rest-enable-objects/images/db-actions-breadcrumbs.png deleted file mode 100644 index d86eddcdf..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/db-actions-breadcrumbs.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/enter-uri-template-field.png b/build-ords-apis-in-adb/rest-enable-objects/images/enter-uri-template-field.png deleted file mode 100644 index 7a636bdb9..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/enter-uri-template-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/execute-button-in-source.png b/build-ords-apis-in-adb/rest-enable-objects/images/execute-button-in-source.png deleted file mode 100644 index a2c3de4dc..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/execute-button-in-source.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/execute-button.png b/build-ords-apis-in-adb/rest-enable-objects/images/execute-button.png deleted file mode 100644 index 019d521df..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/execute-button.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/explore-apis-in-open-api-view.png b/build-ords-apis-in-adb/rest-enable-objects/images/explore-apis-in-open-api-view.png deleted file mode 100644 index 123f3937e..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/explore-apis-in-open-api-view.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/export-open-apis-action.png b/build-ords-apis-in-adb/rest-enable-objects/images/export-open-apis-action.png deleted file mode 100644 index 09a98e7db..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/export-open-apis-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/final-create-parameter-action.png b/build-ords-apis-in-adb/rest-enable-objects/images/final-create-parameter-action.png deleted file mode 100644 index 28c240f1c..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/final-create-parameter-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/handler-slider-for-bizlogic.png b/build-ords-apis-in-adb/rest-enable-objects/images/handler-slider-for-bizlogic.png deleted file mode 100644 index f0e9f0393..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/handler-slider-for-bizlogic.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/module-name-field.png b/build-ords-apis-in-adb/rest-enable-objects/images/module-name-field.png deleted file mode 100644 index 1cd9ab2ca..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/module-name-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/module-overview-page.png b/build-ords-apis-in-adb/rest-enable-objects/images/module-overview-page.png deleted file mode 100644 index 3c39a52b1..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/module-overview-page.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/open-api-as-swagger-view.png b/build-ords-apis-in-adb/rest-enable-objects/images/open-api-as-swagger-view.png deleted file mode 100644 index ed6ab4aa9..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/open-api-as-swagger-view.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/open-api-example-export.png b/build-ords-apis-in-adb/rest-enable-objects/images/open-api-example-export.png deleted file mode 100644 index 4aea355b9..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/open-api-example-export.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/open-api-select-module.png b/build-ords-apis-in-adb/rest-enable-objects/images/open-api-select-module.png deleted file mode 100644 index 03a6065bc..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/open-api-select-module.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/parameter-access-method-field.png b/build-ords-apis-in-adb/rest-enable-objects/images/parameter-access-method-field.png deleted file mode 100644 index 98b6dd0e6..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/parameter-access-method-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/parameter-in-report-table.png b/build-ords-apis-in-adb/rest-enable-objects/images/parameter-in-report-table.png deleted file mode 100644 index d6a0c3b6e..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/parameter-in-report-table.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/parameter-parameter-type-field.png b/build-ords-apis-in-adb/rest-enable-objects/images/parameter-parameter-type-field.png deleted file mode 100644 index 2f59fdf95..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/parameter-parameter-type-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/parameter-source-type.png b/build-ords-apis-in-adb/rest-enable-objects/images/parameter-source-type.png deleted file mode 100644 index 738b9c587..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/parameter-source-type.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/pop-menu.png b/build-ords-apis-in-adb/rest-enable-objects/images/pop-menu.png deleted file mode 100644 index f1c69b2b0..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/pop-menu.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/pop-out-icon-template-region.png b/build-ords-apis-in-adb/rest-enable-objects/images/pop-out-icon-template-region.png deleted file mode 100644 index b77861c31..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/pop-out-icon-template-region.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/return-to-main-with-breadcrumb.png b/build-ords-apis-in-adb/rest-enable-objects/images/return-to-main-with-breadcrumb.png deleted file mode 100644 index 818bbf049..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/return-to-main-with-breadcrumb.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/select-bizlogic-handler-curl-command.png b/build-ords-apis-in-adb/rest-enable-objects/images/select-bizlogic-handler-curl-command.png deleted file mode 100644 index d7e17b3e8..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/select-bizlogic-handler-curl-command.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/select-post-for-handler.png b/build-ords-apis-in-adb/rest-enable-objects/images/select-post-for-handler.png deleted file mode 100644 index 065419163..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/select-post-for-handler.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/setting-privileges-field.png b/build-ords-apis-in-adb/rest-enable-objects/images/setting-privileges-field.png deleted file mode 100644 index ee1754bbf..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/setting-privileges-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/show-template-code-toggle.png b/build-ords-apis-in-adb/rest-enable-objects/images/show-template-code-toggle.png deleted file mode 100644 index 0d133cf1c..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/show-template-code-toggle.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/source-entered-in-handler-slider.png b/build-ords-apis-in-adb/rest-enable-objects/images/source-entered-in-handler-slider.png deleted file mode 100644 index 44a6abd4e..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/source-entered-in-handler-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/source-query-results.png b/build-ords-apis-in-adb/rest-enable-objects/images/source-query-results.png deleted file mode 100644 index 13104b52e..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/source-query-results.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/substitutions-icon-for-bizlogic.png b/build-ords-apis-in-adb/rest-enable-objects/images/substitutions-icon-for-bizlogic.png deleted file mode 100644 index 9582d48db..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/substitutions-icon-for-bizlogic.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/template-page-overview.png b/build-ords-apis-in-adb/rest-enable-objects/images/template-page-overview.png deleted file mode 100644 index 897828f61..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/template-page-overview.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/toggle-show-code-option.png b/build-ords-apis-in-adb/rest-enable-objects/images/toggle-show-code-option.png deleted file mode 100644 index 1b67462f4..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/toggle-show-code-option.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/updated-url-with-bind-variable.png b/build-ords-apis-in-adb/rest-enable-objects/images/updated-url-with-bind-variable.png deleted file mode 100644 index 3c4c29b08..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/updated-url-with-bind-variable.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/uri-template-field.png b/build-ords-apis-in-adb/rest-enable-objects/images/uri-template-field.png deleted file mode 100644 index 7b6a78daf..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/uri-template-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/images/url-with-bind-variable.png b/build-ords-apis-in-adb/rest-enable-objects/images/url-with-bind-variable.png deleted file mode 100644 index 72a2090f7..000000000 Binary files a/build-ords-apis-in-adb/rest-enable-objects/images/url-with-bind-variable.png and /dev/null differ diff --git a/build-ords-apis-in-adb/rest-enable-objects/rest-enable-objects.md b/build-ords-apis-in-adb/rest-enable-objects/rest-enable-objects.md deleted file mode 100644 index 5848eb50c..000000000 --- a/build-ords-apis-in-adb/rest-enable-objects/rest-enable-objects.md +++ /dev/null @@ -1,327 +0,0 @@ -# REST-enable tables and add business logic - -## Introduction - -In this lab, you will use Database Actions and the REST Workshop to turn a PL/SQL procedure and an SQL statement into REST APIs. - -Estimated Lab Time: 20 minutes - -Watch the video below for a quick walk-through of the lab. -[REST-enable tables and add business logic](videohub:1_y8l03s43) - -### Objectives - -- Publish REST API using Custom SQL -- Publish REST API using stored PL/SQL procedure -- Explore the OpenAPI View - -### Prerequisites - -- The following lab requires an [Oracle Cloud account](https://www.oracle.com/cloud/free/). You may use your own cloud account, a cloud account obtained through a trial, or a training account whose details were given to you by an Oracle instructor. - -- This lab assumes you have completed all previous Labs. - -## Task 1: REST Enable a SQL Statement - -1. Navigate to the **Database Actions Menu** in the upper left of the page and select **REST**. - - ![DB Actions Menus, choose REST](./images/choose-rest-db-actions-menu.png " ") - -2. Once on the **REST page**, use the upper tab bar to select **Modules**. - - ![REST Tab Menu, choose Modules](./images/choose-modules-actions-menu.png " ") - -3. On the Modules page, left-click the **+Create Module** button in the upper right. - - ![Left click the + Create Modules button](./images/create-module-action.png " ") - -4. The **Create Module** slider appears from the right of the page. - - ![Create Modules slider](./images/create-new-module-slider.png " ") - -5. Using the **Create Module** slider, enter the following Module name: `com.oracle.livelab.api` - - ```sh - com.oracle.livelab.api - ``` - -
- *About Resource Modules* - - A module is an organizational unit used to group related resource templates. Templates will have handlers, which are responsible for providing the logic required to service a specific HTTP method (e.g., GET, POST, PUT, DELETE, UPDATE, etc.). - -
- - ![Create Modules slider](./images/module-name-field.png " ") - -6. Enter **/api/** in the **base path field**: - - ```sh - /api/ - ``` - - ![Create Modules slider](./images/base-path-field.png " ") - -7. Select **Not Protected** from the **Protected By Privilege** dropdown list. - - ![Protected By Privilege** select list](./images/setting-privileges-field.png " ") - -8. Once complete (**your URL hostname will be different than the below image**), click the **Create** button. - - ![Create Modules slider](./images/create-module-submit.png " ") - - > **INFO:** Here you can toggle "Show Code" to review what module creation might look like if it were performed manually. - > - > ![Toggle Show Code to review what is happening under the covers](./images/toggle-show-code-option.png " ") - -9. Next, we'll create a **Template** for our newly created module. To do so, click the **+ Create Template** button on the right side of the page. - - ![Left click the + Create Template button](./images/create-template-action.png " ") - -10. The **Create Template** slider will appear. Here, we will create the endpoint, or URL location, for our REST-enabled SQL statement. This statement will expect a value. In the **URI Template** template field, enter: - - ```sh - sqlreport/:id - - ``` - -
- *What does the **`/:id`** in **`sqlreport/:id`** mean?* - - This is called a "Route Pattern." You can use route patterns for required parameters in the URI to specify parameters for REST requests such as the GET method (which does not have a body) and in other special cases. - - **Want to learn more?** Read the full specification for ORDS Route Pattern syntax [here](https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.2/ordjv/doc-files/route-patterns.html). -
- - ![URI Template field](./images/enter-uri-template-field.png " ") - -11. When complete (**your URL hostname will be different than the below image**), click the **Create** button. - - ![Create Modules slider with all info, left click create](./images/create-template-finish.png " ") - -12. Next we will create the **Handler**; which contains the actual SQL statement. Click the **+ Create Handler** button. - - ![Left click the Create Handler button](./images/create-handler-action.png " ") - -13. The **Create Handler** appears from the right of the page. - - ![Create Handler slider](./images/create-handler-slider.png " ") - -14. Enter `Select * from csv_data where col2 = :id` in the **Source** section of the **Create Handler** slider: - - ```sh - select * from csv_data where col2 = :id - ``` - - ![Source Field](./images/adding-source-field.png " ") - -15. When complete (**your URL hostname will be different than the below image**), click the **Create** button. - - ![Create Handler slider with all info, left click create](./images/create-handler-final-action.png " ") - -16. We can test our Handler on the Template page. Click the **Execute** button in the **Source** section of the page. - - ![Execute button in source section of the page](./images/execute-button-in-source.png " ") - -17. After clicking the **execute** button a **Bind Variables** modal will appear. Enter **a1** for the value in the **id** field and then click **OK**. - - ![Bind Variables modal](./images/bind-variable-modal.png " ") - -18. You can see the results of the query just below the **Source** section. (You may need to scroll the page down): - - ![Source query results](./images/source-query-results.png " ") - -19. We can also test this endpoint in a browser. Click the **Open in New Browser Tab** button. - - ![pop out icon in the Template region on the top of the page](./images/pop-out-icon-template-region.png " ") - -20. In the new browser tab/window with the REST endpoint URL, replace the `:id` with a1 and submit the URL. - - ![URL with bind variable](./images/url-with-bind-variable.png " ") - - ![submitted URL and working REST service](./images/updated-url-with-bind-variable.png " ") - -## Task 2: REST Enable Business Logic (PL/SQL procedure) - -1. Next, we'll REST enable our business logic or PL/SQL procedure. To do so, click `com.oracle.livelab.api` in the Database Actions breadcrumbs. - - ![Database Actions breadcrumbs](./images/db-actions-breadcrumbs.png " ") - -2. Next click the **+ Create Template** button on the right side of the page. - - ![Left click the + Create Template button](./images/create-template-action.png " ") - -3. The **Create Template** appears from the right of the page. - - ![Create Template slider](./images/create-template-slider.png " ") - -4. In the **URI Template** template field, enter `bizlogic` - - ```sh - bizlogic - ``` - - ![URI Template field](./images/uri-template-field.png " ") - -5. When complete (**your URL hostname will be different than the below image**), click the **Create** button. - - ![Create Template slider with all info, left click create](./images/creat-template-finish.png " ") - -6. Click the **+ Create Handler** button. - - ![Left click the + Create Handler button](./images/create-handler-bizlogic.png " ") - -7. Change the **Method** from `GET` to `POST` since we are *submitting* a value to the REST Service. Use the dropdown in the **Method** field to select **POST**. - - ![Selecting POST using the dropdown in the Method field](./images/select-post-for-handler.png " ") - - > Upon changing the **Method** to post, we see the **Source Type** change to PL/SQL. - -8. Enter the following PL/SQL into the **Source** field: - - ```sql - - BEGIN - return_count(p_input => :id, p_output => :output); - end; - - ``` - - ![Create Handler slider](./images/source-entered-in-handler-slider.png " ") - -9. When complete (**your URL hostname will be different than the below image**), click the **Create** button. - - ![Create Handler slider with all info, left click create](./images/create-final-handler-slider.png " ") - -10. Next we'll create an output parameter so we can return a result. - - > **NOTE:** We should expect the count or rows where the passed-in value is equal to the values in col2 in our table. - -11. Under the **Source** area, locate the **+ Create Parameter** button. Click the **+ Create Parameter** button. - - ![Left click the + Create Parameter button](./images/create-parameter-button.png " ") - -12. The **Create Parameter** slider will appear. - - ![Create Parameter slider](./images/create-parameter-slider.png " ") - -13. For the **Parameter Name** field and the **Bind Variable Name** field, enter **output** - - ```sh - output - ``` - - ![Create Parameter name field](./images/create-parameter-input-fields.png " ") - -14. Select `Response` from the **Source Type** dropdown field. - - ![Source Type field](./images/parameter-source-type.png) - -15. Select `INT` for the **Parameter Type** field (recall, we are returning a number or integer). - - ![Parameter Type field](./images/parameter-parameter-type-field.png " ") - -16. Choose `Output` as the **Access Method**. - - ![Access Method field](./images/parameter-access-method-field.png " ") - -17. When complete (**your URL hostname will be different than the below image**), click the **Create** button. - - ![Create Parameter slider with all info, left click create](./images/final-create-parameter-action.png " ") - -18. You will see the newly created parameter in the parameters table at the bottom of the page. - - ![Parameter created in report](./images/parameter-in-report-table.png " ") - -## Task 3: Test an ORDS APIs - -1. Next we will test our API. Click **bizlogic** from the Database Actions breadcrumbs. - - ![bizlogic breadcrumb](./images/bizlogic-breadcrum-action.png " ") - -2. Click the kebab menu icon ![popout menu icon](./images/pop-menu.png " ") on the **bizlogic POST tile**. Then select **Get cURL command**. - - ![selecting Get cURL command](./images/select-bizlogic-handler-curl-command.png " ") - -3. The cURL Command modal appears: - - ![cURL Command modal](./images/curl-command-modal-bizlogic.png " ") - - > 💡 Choose the appropriate cURL command for your environment! - > ![cURL Command reminder](./images/curl-command-reminder.png " ") - -4. Click the `Substitutions` icon, and a modal will appear. - - ![Substitutions icon](images/substitutions-icon-for-bizlogic.png " ") - -5. Enter `a1` into the **id** field, and place a ✔️ in the `Null` option for the `Output` field. Then click `OK`. - - ![Substitutions modal](images/adding-substitution-value-null-output.png " ") - -6. Copy the cURL command with the added Substitution value. - - ![Copied cURL command](./images/copied-curl-command-bizlogic.png " ") - -7. Then, using the Oracle Cloud Infrastructure Cloud Shell, paste the cURL command and run it. The shell will display the output variable response. - - ```sh - curl -X POST \ - 'https://livelab.adb.eu-frankfurt-1.oraclecloudapps.com/ords/admin/api/bizlogic' \ - --header 'Content-Type: application/json' \ - --data-binary '{ - "id": "a1", - "output": "" - }' - ``` - - ![Cloud shell and cURL](./images/curl-command-in-cloud-shell.png " ") - - > You can test other values by changing the id variable. Valid combinations are: - > - >| Variable position | Valid characters | Case | - >| ----------------- | ---------------- | --------- | - >| First character | `a` through `f` | lower-case| - >| Second character | `1` through `9` | n/a | - > - > *Some valid examples are: a1, e9, d3, b6* - -## Task 4: Explore the OpenAPI View created by ORDS - -1. Return to the Module's main page by clicking its name in the breadcrumbs at the top left of the page. - - ![breadcrumbs in the upper left of the page](./images/return-to-main-with-breadcrumb.png " ") - -2. Click the the kebab icon ![pop out icon](./images/pop-menu.png " ") in the Module region and select **OpenAPI View**. - - ![The pop out icon and select OpenAPI View](./images/open-api-select-module.png " ") - -3. The OpenAPI View page displays your REST services as a Swagger UI implementation. - - ![OpenAPI View](./images/open-api-as-swagger-view.png " ") - - You can explore your created APIs and try them out *directly* in the browser window. - - ![OpenAPI explore](./images/explore-apis-in-open-api-view.png " ") - - Using the pop-out icon, you can also export this page as an OpenAPI doc for use in other tools and services. ![pop out icon](./images/pop-menu.png) Select **Export Module** then **OpenAPI**. - - ![OpenAPI doc export](./images/export-open-apis-action.png " ") - - **An example of what the OpenAPI export will look like.** - - ![OpenAPI example export](./images/open-api-example-export.png " ") - -4. In this lab, you published a REST API that accepts input using custom SQL and a REST API that uses a stored PL/SQL procedure. - -You may now [proceed to the next lab](#next). - -## Acknowledgements - -### Author - -- Jeff Smith, Distinguished Product Manager -- Chris Hoina, Senior Product Manager - -### Last Updated By/Date - -- Chris Hoina, August 2024 diff --git a/build-ords-apis-in-adb/secure-endpoints/images/about-grant-types.png b/build-ords-apis-in-adb/secure-endpoints/images/about-grant-types.png deleted file mode 100644 index c000571d1..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/about-grant-types.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/attempting-to-run-curl-command-in-cloud-shell-unauthorized.png b/build-ords-apis-in-adb/secure-endpoints/images/attempting-to-run-curl-command-in-cloud-shell-unauthorized.png deleted file mode 100644 index 2c7eeae4a..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/attempting-to-run-curl-command-in-cloud-shell-unauthorized.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/click-copy-icon-for-get-curl-command-no-token.png b/build-ords-apis-in-adb/secure-endpoints/images/click-copy-icon-for-get-curl-command-no-token.png deleted file mode 100644 index 4c39a6135..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/click-copy-icon-for-get-curl-command-no-token.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/click-copy-icon-to-copy-access-token-curl-command.png b/build-ords-apis-in-adb/secure-endpoints/images/click-copy-icon-to-copy-access-token-curl-command.png deleted file mode 100644 index 857a0ced4..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/click-copy-icon-to-copy-access-token-curl-command.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/click-create-for-privilege.png b/build-ords-apis-in-adb/secure-endpoints/images/click-create-for-privilege.png deleted file mode 100644 index 3a87b293a..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/click-create-for-privilege.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/click-kebab-then-edit-to-see-changes-to-api-from-oauth-client.png b/build-ords-apis-in-adb/secure-endpoints/images/click-kebab-then-edit-to-see-changes-to-api-from-oauth-client.png deleted file mode 100644 index 7549e9f8d..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/click-kebab-then-edit-to-see-changes-to-api-from-oauth-client.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/click-ok-when-finished-in-oauth-slider.png b/build-ords-apis-in-adb/secure-endpoints/images/click-ok-when-finished-in-oauth-slider.png deleted file mode 100644 index db8b394d6..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/click-ok-when-finished-in-oauth-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/clicking-kebab-to-access-option-for-bearer-token-curl.png b/build-ords-apis-in-adb/secure-endpoints/images/clicking-kebab-to-access-option-for-bearer-token-curl.png deleted file mode 100644 index 1f09ca16c..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/clicking-kebab-to-access-option-for-bearer-token-curl.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/clipboard-bizlogic-curl-no-token.png b/build-ords-apis-in-adb/secure-endpoints/images/clipboard-bizlogic-curl-no-token.png deleted file mode 100644 index 26f3af854..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/clipboard-bizlogic-curl-no-token.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/completed-created-privilege-slider.png b/build-ords-apis-in-adb/secure-endpoints/images/completed-created-privilege-slider.png deleted file mode 100644 index 70eab6722..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/completed-created-privilege-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/completed-oauth-slider.png b/build-ords-apis-in-adb/secure-endpoints/images/completed-oauth-slider.png deleted file mode 100644 index 205fe8eb5..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/completed-oauth-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/copy-copy.png b/build-ords-apis-in-adb/secure-endpoints/images/copy-copy.png deleted file mode 100644 index 1de018684..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/copy-copy.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/create-oauth-client-slider.png b/build-ords-apis-in-adb/secure-endpoints/images/create-oauth-client-slider.png deleted file mode 100644 index b2224deac..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/create-oauth-client-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/create-privilege-button.png b/build-ords-apis-in-adb/secure-endpoints/images/create-privilege-button.png deleted file mode 100644 index 7e5415cc6..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/create-privilege-button.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/create-privilege-roles-tab.png b/build-ords-apis-in-adb/secure-endpoints/images/create-privilege-roles-tab.png deleted file mode 100644 index 5196c2645..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/create-privilege-roles-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/create-privilege-slider.png b/build-ords-apis-in-adb/secure-endpoints/images/create-privilege-slider.png deleted file mode 100644 index 38b51adcb..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/create-privilege-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/create-role-action.png b/build-ords-apis-in-adb/secure-endpoints/images/create-role-action.png deleted file mode 100644 index 0a797a106..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/create-role-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/create-roll-button.png b/build-ords-apis-in-adb/secure-endpoints/images/create-roll-button.png deleted file mode 100644 index bdccf9ea5..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/create-roll-button.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/creating-curl-command-with-access-token.png b/build-ords-apis-in-adb/secure-endpoints/images/creating-curl-command-with-access-token.png deleted file mode 100644 index 2f6292b42..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/creating-curl-command-with-access-token.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/get-bearer-token-for-oauth-client.png b/build-ords-apis-in-adb/secure-endpoints/images/get-bearer-token-for-oauth-client.png deleted file mode 100644 index 5e5c63b7e..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/get-bearer-token-for-oauth-client.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/kebab-menu-in-oauth-client.png b/build-ords-apis-in-adb/secure-endpoints/images/kebab-menu-in-oauth-client.png deleted file mode 100644 index 8b7193e17..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/kebab-menu-in-oauth-client.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/module-from-available-to-selected.png b/build-ords-apis-in-adb/secure-endpoints/images/module-from-available-to-selected.png deleted file mode 100644 index 000834236..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/module-from-available-to-selected.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/move-to-selected-roles-column.png b/build-ords-apis-in-adb/secure-endpoints/images/move-to-selected-roles-column.png deleted file mode 100644 index d34cea891..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/move-to-selected-roles-column.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-create-button.png b/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-create-button.png deleted file mode 100644 index aef4d7bd1..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-create-button.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-description-field.png b/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-description-field.png deleted file mode 100644 index 1133abb00..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-description-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-name-field.png b/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-name-field.png deleted file mode 100644 index 3be935a5b..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-name-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-security-tab.png b/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-security-tab.png deleted file mode 100644 index 179f32f44..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-security-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-support-uri.png b/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-support-uri.png deleted file mode 100644 index fdbfe401b..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/oauth-client-support-uri.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/oauth-clients-page.png b/build-ords-apis-in-adb/secure-endpoints/images/oauth-clients-page.png deleted file mode 100644 index 9307891b0..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/oauth-clients-page.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/oauth-create-button-action.png b/build-ords-apis-in-adb/secure-endpoints/images/oauth-create-button-action.png deleted file mode 100644 index ab1cecd04..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/oauth-create-button-action.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/oauth-shuttle.png b/build-ords-apis-in-adb/secure-endpoints/images/oauth-shuttle.png deleted file mode 100644 index 7564a3a31..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/oauth-shuttle.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/privilege-description-input-field.png b/build-ords-apis-in-adb/secure-endpoints/images/privilege-description-input-field.png deleted file mode 100644 index ff7b0b9c4..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/privilege-description-input-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/privilege-label-input.png b/build-ords-apis-in-adb/secure-endpoints/images/privilege-label-input.png deleted file mode 100644 index 8a71fa6e8..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/privilege-label-input.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/privilege-name-input-field.png b/build-ords-apis-in-adb/secure-endpoints/images/privilege-name-input-field.png deleted file mode 100644 index 6afca1a11..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/privilege-name-input-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/protected-modules-shuttle.png b/build-ords-apis-in-adb/secure-endpoints/images/protected-modules-shuttle.png deleted file mode 100644 index 13777f21e..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/protected-modules-shuttle.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/protected-modules-tab-option.png b/build-ords-apis-in-adb/secure-endpoints/images/protected-modules-tab-option.png deleted file mode 100644 index ca702cf83..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/protected-modules-tab-option.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/reviewing-the-new-privilege-from-oauth-changes-in-module-slider.png b/build-ords-apis-in-adb/secure-endpoints/images/reviewing-the-new-privilege-from-oauth-changes-in-module-slider.png deleted file mode 100644 index 5870f3893..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/reviewing-the-new-privilege-from-oauth-changes-in-module-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/role-definition-role-name-field.png b/build-ords-apis-in-adb/secure-endpoints/images/role-definition-role-name-field.png deleted file mode 100644 index 14e3ec781..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/role-definition-role-name-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/role-name-field.png b/build-ords-apis-in-adb/secure-endpoints/images/role-name-field.png deleted file mode 100644 index bfe1b866d..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/role-name-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/roles-shuttle-window.png b/build-ords-apis-in-adb/secure-endpoints/images/roles-shuttle-window.png deleted file mode 100644 index a69c7bd94..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/roles-shuttle-window.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/roles-tab-oauth-slider.png b/build-ords-apis-in-adb/secure-endpoints/images/roles-tab-oauth-slider.png deleted file mode 100644 index 7f2b61122..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/roles-tab-oauth-slider.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/select-privilege-security-tab.png b/build-ords-apis-in-adb/secure-endpoints/images/select-privilege-security-tab.png deleted file mode 100644 index 7ca2cf954..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/select-privilege-security-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/select-rest-dbactions-menu.png b/build-ords-apis-in-adb/secure-endpoints/images/select-rest-dbactions-menu.png deleted file mode 100644 index 78ca17ed6..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/select-rest-dbactions-menu.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/select-roles-security-tab.png b/build-ords-apis-in-adb/secure-endpoints/images/select-roles-security-tab.png deleted file mode 100644 index 19e7168d8..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/select-roles-security-tab.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/success-output-shown-in-cloud-shell.png b/build-ords-apis-in-adb/secure-endpoints/images/success-output-shown-in-cloud-shell.png deleted file mode 100644 index 4d2c5040c..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/success-output-shown-in-cloud-shell.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/success-you-have-acquired-the-access-token.png b/build-ords-apis-in-adb/secure-endpoints/images/success-you-have-acquired-the-access-token.png deleted file mode 100644 index 61989a71c..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/success-you-have-acquired-the-access-token.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/support-email-field.png b/build-ords-apis-in-adb/secure-endpoints/images/support-email-field.png deleted file mode 100644 index e8bd8b455..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/support-email-field.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/the-complete-curl-command-with-access-token-in-cloud-shell.png b/build-ords-apis-in-adb/secure-endpoints/images/the-complete-curl-command-with-access-token-in-cloud-shell.png deleted file mode 100644 index 54da58f83..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/the-complete-curl-command-with-access-token-in-cloud-shell.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/images/three-dot-pop.png b/build-ords-apis-in-adb/secure-endpoints/images/three-dot-pop.png deleted file mode 100644 index 330f6257f..000000000 Binary files a/build-ords-apis-in-adb/secure-endpoints/images/three-dot-pop.png and /dev/null differ diff --git a/build-ords-apis-in-adb/secure-endpoints/secure-endpoints.md b/build-ords-apis-in-adb/secure-endpoints/secure-endpoints.md deleted file mode 100644 index 5b73c9d41..000000000 --- a/build-ords-apis-in-adb/secure-endpoints/secure-endpoints.md +++ /dev/null @@ -1,260 +0,0 @@ -# Secure REST-enabled endpoints - -## Introduction - -In this lab, you secure the REST endpoints created in the previous lab. - -Estimated Lab Time: 10 minutes - -Watch the video below for a quick walk-through of the lab. -[Secure REST-enabled endpoints](videohub:1_6ox6rq26) - -### Objectives - -- Create an OAuth2 token -- Secure REST endpoints -- Test the secure end-to-end flow - -### Prerequisites - -- The following lab requires an [Oracle Cloud account](https://www.oracle.com/cloud/free/). You may use your own cloud account, a cloud account obtained through a trial, or a training account whose details were given to you by an Oracle instructor. - -- This lab assumes you have completed all previous Labs. - -## Task 1: Create a Role to secure a REST Endpoint - -1. Navigate to the **REST Database Actions** page. You may do this by navigating to the **Database Actions menu** in the upper left of the page. Choose **REST** in the Development list. - - ![Database Actions Menu, Development then REST](./images/select-rest-dbactions-menu.png " ") - -2. Next, select the **Security Tab**, then **Roles**. - - ![On the Top Menu Bar, click Security Tab then select Roles](./images/select-roles-security-tab.png " ") - -3. From the **Roles** page, click the **+ Create Role** button. - - ![Click the Create Role button](./images/create-roll-button.png " ") - -4. A **Role Definition** modal will appear. Use **oracle.livelabs.role.admin** for the Role Name. - - ![Role Definition Modal](./images/role-definition-role-name-field.png " ") - - ```sh - oracle.livelabs.role.admin - ``` - - ![Role Name Field](./images/role-name-field.png " ") - -5. When complete, click the **Create** button. - - ![Click the Create button](./images/create-role-action.png " ") - -## Task 2: Create a Privilege to secure a REST Endpoint - -1. Next, we'll assign **Privileges** to this role. From the **Security** menu, select **Privileges**. - - ![On the Top Menu Bar, click Security Tab then select privileges](./images/select-privilege-security-tab.png " ") - -2. Click the **+ Create Privilege** button. - - ![Click the Create Privilege button](./images/create-privilege-button.png " ") - -3. Enter `Livelabs REST Privilege` in the **Create Privilege** Label field. - - ![Create Privilege slider](./images/create-privilege-slider.png " ") - - ```sh - Livelabs REST Privilege - ``` - - ![Label Field](./images/privilege-label-input.png " ") - -4. Use `oracle.livelabs.privilege.admin` for the Name field. - - ```sh - oracle.livelabs.privilege.admin - ``` - - ![Name Field](./images/privilege-name-input-field.png " ") - -5. In the Description field enter `Livelabs Privilege for Business Logic REST Services`. - - ```sh - Livelabs Privilege for Business Logic REST Services - ``` - - ![Description Field](./images/privilege-description-input-field.png " ") - -6. When complete, click the **Roles** tab near the top of the slider. - - ![Completed Create Privilege** slider](./images/completed-created-privilege-slider.png " ") - - ![Roles tab on the top of the slider](./images/create-privilege-roles-tab.png " ") - -7. On the **Roles** tab, use the shuttle to move the `oracle.livelabs.role.admin` role to the right column. Either double click the role or highlight it then click the single arrow (that points to the right column). - - ![Roles shuttle](./images/roles-shuttle-window.png " ") - - > **NOTE:** Privileges and roles were automatically created (oracle.dbtools.role.autorest.ADMIN.CSV_DATA) when the table is auto-REST enabled. - -8. Once the role has been moved, click the **Protected Modules** tab near the top of the **Create Privilege** slider. - - ![Protected Modules tab](./images/protected-modules-tab-option.png " ") - -9. Move the `com.oracle.livelab.api` privilege from the left column to the right. When complete, click the **Create** button on the **Create Privilege** slider. - - ![Protected Modules shuttle](./images/protected-modules-shuttle.png " ") - - ![click the Create button on the Create Privilege slider](./images/click-create-for-privilege.png " ") - -## Task 3: Create an OAuth Client for a secure REST Endpoint - -1. Select **OAuth Clients** from the **Security Tab**. - - ![On the Top Menu Bar, click Security Tab then select OAuth Clients](./images/oauth-client-security-tab.png " ") - -2. Next, click the **+ Create OAuth Client** button. - - ![Click the Create OAuth Client button](./images/oauth-client-create-button.png " ") - -3. The **Create OAuth Client** slider will appear. - - ![Create OAuth Client slider](./images/create-oauth-client-slider.png " ") - -
*About the Grant types* - - ORDS Supports many Grant Types. - - ![Various ORDS grant types.](images/about-grant-types.png) - - You can refer to Two-legged and Three-legged OAuth code flows (Grant types) [here](https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.2/orddg/developing-REST-applications.html#GUID-5B39A5A6-C55D-452D-AE53-F49431A4DE97). - - ORDS also supports JSON Web Tokens (JWTs) for Authentication and Authorization. Details can be found [here](https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/24.2/orddg/developing-REST-applications.html#GUID-02B6DC5B-347A-417A-855F-C4A3F4B77538). -
- -4. Enter `oauthclient` into the **Name** field. - - ```sh - oauthclient - ``` - - ![Name Field](./images/oauth-client-name-field.png " ") - -5. Enter `Security on my REST Service` in the **Description Field**. - - ```sh - Security on my REST Service - ``` - - ![Description Field](./images/oauth-client-description-field.png " ") - -6. The **Support URI** is a required field. This is where a client will be redirected to should an authorization error or failure occur. For this lab, use `https://www.oracle.com/rest/` - - ```sh - https://www.oracle.com/rest/ - ``` - - ![Support URI Field](./images/oauth-client-support-uri.png " ") - -7. You may enter your email address or use `support@support.com` in the **Support Email** field. - - ```sh - support@support.com - ``` - - ![Support Email Field](./images/support-email-field.png " ") - -8. Once completed, left-click the **Roles Tab** at the top of the Create OAuth Client slider. - - ![Completed OAuth Slider](./images/completed-oauth-slider.png " ") - - ![Roles Tab on the OAuth Client Slide Out Panel](./images/roles-tab-oauth-slider.png " ") - -9. Move the `oracle.livelabs.role.admin` role to the right column. - - ![Moving role to the Selected Column.](./images/move-to-selected-roles-column.png " ") - -10. Next, navigate to the Protected Modules tab. Move the `com.oracle.livelab.api` module from the Available Modules column to the Selected Modules column. - - ![module-from-available-to-selected](images/module-from-available-to-selected.png) - -11. Once complete, click the **Create** button. - - ![left click the create button](./images/oauth-create-button-action.png " ") - -12. The newly created **OAuth Client** tile will appear on the OAuth Clients page. - - ![OAuth Client tile on the OAuth Clients page](./images/oauth-clients-page.png " ") - -13. You may navigate to your `com.oracle.livelab.api` Resource Module to review the effect of your changes. - - ![see-changes-to-api-from-oauth-client](images/click-kebab-then-edit-to-see-changes-to-api-from-oauth-client.png) - - ![reviewing-the-new-privilege-from-oauth-changes](images/reviewing-the-new-privilege-from-oauth-changes-in-module-slider.png) - -## Task 4: Obtain a Bearer Token for accessing a secure REST Endpoint - -1. Before accessing an OAuth-protected REST endpoint, you must obtain a token to pass to the secured REST service for authentication. We can click the kebab menu icon on our OAuth tile to obtain this token and select **Get Bearer Token**. - - ![pop out menu icon](images/clicking-kebab-to-access-option-for-bearer-token-curl.png " ") - - ![click the pop out menu icon on our OAuth tile and select Get Bearer Token](./images/get-bearer-token-for-oauth-client.png " ") - -2. The OAuth Token modal will provide the token text in the **Current Token** field. You can use the copy icon to copy this token text, save it to a text document, or use a notes application. The modal will also provide us with a cURL command to obtain a token should we need to include it in our applications. - - ![Click the copy icon to save the Token Text](./images/click-copy-icon-to-copy-access-token-curl-command.png " ") - - Click **OK** when you have copied the cURL command. - - ![Left click the OK button](./images/click-ok-when-finished-in-oauth-slider.png " ") - -3. Next, we'll test the secure REST service. Recall in the previous Lab lab, where we created a REST API for our `bizlogic`? Attempt to access this REST endpoint with the following cURL command (**your URL hostname will be different than the below command**): - - ![Return to bizlogic to copy curl command.](images/click-copy-icon-for-get-curl-command-no-token.png) - - ![Bizlogic curl command, no Access Token.](images/clipboard-bizlogic-curl-no-token.png) - - ```sh - curl --location --request POST \ - 'https://livelab.adb.eu-frankfurt-1.oraclecloudapps.com/ords/admin/api/bizlogic' \ - --header 'Content-Type: application/json' \ - --data-binary '{ - "id": "a1", - "output": "" - }' - ``` - -4. Attempt to run this `cURL` command in the Cloud Shell. Since the endpoint is now secure, you should see the following response: - - ![attempting-to-run-curl-command-in-cloud-shell-unauthorized](images/attempting-to-run-curl-command-in-cloud-shell-unauthorized.png) - -5. To access this REST API, you must include a `--header 'Authorization: Bearer [The Access Token value]'` header to the cURL command. The `Access Token value` is the same as the Access Token you saved in Step 2 (**your URL hostname will be different than the command below**). Your updated cURL command should resemble the following: - - ![creating-curl-command-with-access-token](images/creating-curl-command-with-access-token.png) - -6. Using the Cloud Shell or local environment, execute *your* version of the cURL command (**your URL hostname and Bearer Token will differ from the one below**) - - ![complete-curl-command-with-access-token-in-cloud-shell](images/the-complete-curl-command-with-access-token-in-cloud-shell.png) - - You should see a similar value returned from the REST API. - - ![success-output-shown-in-cloud-shell](images/success-output-shown-in-cloud-shell.png) - -7. You have just simulated what an application might do when requesting access to a secure Resource. You've requested an Access Token using your Client ID and Client Secret. Your credentials were verified, and you were then issued an Access Token. - - Finally, you used the Access Token to perform a POST request on a target resource (i.e., the `bizlogic` resource). - -8. Congratulations. You've completed this Workshop. In this lab, you secured your custom REST APIs with OAuth2.0 authentication. - -You may now [proceed to the next lab](#next). - -## Acknowledgements - -### Author - -- Jeff Smith, Distinguished Product Manager -- Chris Hoina, Senior Product Manager - -## Last Updated By/Date - -- Chris Hoina, August 2024 diff --git a/build-ords-apis-in-adb/workshops/desktop/index.html b/build-ords-apis-in-adb/workshops/desktop/index.html new file mode 100644 index 000000000..471847eb9 --- /dev/null +++ b/build-ords-apis-in-adb/workshops/desktop/index.html @@ -0,0 +1,63 @@ + + + + + + + + + Oracle LiveLabs + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+ + + + + diff --git a/build-ords-apis-in-adb/workshops/desktop/manifest.json b/build-ords-apis-in-adb/workshops/desktop/manifest.json new file mode 100644 index 000000000..e1ac19697 --- /dev/null +++ b/build-ords-apis-in-adb/workshops/desktop/manifest.json @@ -0,0 +1,31 @@ +{ + "workshoptitle": "ORDS: Build Powerful, Secure RESTful ORDS APIs for your Oracle Autonomous Database", + "help": "livelabs-help-db_us@oracle.com", + "tutorials": [ + { + "title": "Introduction", + "description": "ORDS: Build Powerful, Secure RESTful ORDS APIs for your Oracle Autonomous Database Introduction", + "filename": "../../intro/intro.md" + }, + { + "title": "Lab 1: Create a user, AutoREST-enable a table, test with cURL", + "description": "Modern App Dev with Oracle REST Data Services", + "filename": "../../1-create-user-and-database-objects/create-user-and-database-objects.md" + }, + { + "title": "Lab 2: Build ORDS APIs", + "description": "Modern App Dev with Oracle REST Data Services", + "filename": "../../2-build-ords-apis/build-ords-apis.md" + }, + { + "title": "Lab 3: Secure REST-enabled endpoints", + "description": "Modern App Dev with Oracle REST Data Services", + "filename": "../../3-secure-endpoints/secure-endpoints.md" + }, + { + "title": "Need Help?", + "description": "Solutions to Common Problems and Directions for Receiving Live Help", + "filename":"https://livelabs.oracle.com/cdn/common/labs/need-help/need-help-livelabs.md" + } + ] +} diff --git a/build-ords-apis-in-adb/workshops/tenancy/index.html b/build-ords-apis-in-adb/workshops/tenancy/index.html index 471847eb9..7644876bb 100644 --- a/build-ords-apis-in-adb/workshops/tenancy/index.html +++ b/build-ords-apis-in-adb/workshops/tenancy/index.html @@ -4,7 +4,7 @@ - + Oracle LiveLabs diff --git a/build-ords-apis-in-adb/workshops/tenancy/manifest.json b/build-ords-apis-in-adb/workshops/tenancy/manifest.json index 6988b2ebb..64cb6a6db 100644 --- a/build-ords-apis-in-adb/workshops/tenancy/manifest.json +++ b/build-ords-apis-in-adb/workshops/tenancy/manifest.json @@ -19,8 +19,10 @@ }, { "title": "Lab 1: Create a user, AutoREST-enable a table, test with cURL", + "type": "tenancy", "description": "Modern App Dev with Oracle REST Data Services", - "filename": "../../1-create-user-and-database-objects/create-user-and-database-objects.md" + "filename": "../../1-create-user-and-database-objects/create-user-and-database-objects.md", + "include": {"shortname": "../../4-workshop-scripts/combined_setup.md"} }, { "title": "Lab 2: Build ORDS APIs", diff --git a/sqlcl-mcp-server-intro/1-introduction.md b/sqlcl-mcp-server-intro/1-introduction.md index ecc0df5c3..e86815a08 100644 --- a/sqlcl-mcp-server-intro/1-introduction.md +++ b/sqlcl-mcp-server-intro/1-introduction.md @@ -107,4 +107,9 @@ You may now [proceed to the next lab](#next). - Contributors: Jeff Smith, Linda Foindling - Last updated: Chris Hoina, February 2026 - \ No newline at end of file + + +## Acknowledgements + +* **Author** - TODO: Your Name, Your Title, Your Organization +* **Last Updated By/Date** - TODO: Your Name, Month Year diff --git a/sqlcl-mcp-server-intro/2-environment-set-up.md b/sqlcl-mcp-server-intro/2-environment-set-up.md index 0ebfefeaa..336874d32 100644 --- a/sqlcl-mcp-server-intro/2-environment-set-up.md +++ b/sqlcl-mcp-server-intro/2-environment-set-up.md @@ -2,6 +2,9 @@ ## Introduction +Estimated Time: TODO - x minutes + + In this Lab, you will setup your working environment to use the SQLcl MCP Server along with the Cline for VS code extension. ### Objectives @@ -20,13 +23,13 @@ This lab assumes you have: * A personal computer or access to a workshop-provided workstation * Reviewed the prerequisites of the Introduction lab - - ## Task 1: Create a FreeSQL account +[](include:freesql-create-freesql-account-with-vscode.md) + 1. Navigate to FreeSQL.com and sign in or create a new account - ![click-sign-in-for-freesql](./images/lab-2/click-sign-in-for-freesql.png " ") + ![click-sign-in-for-freesql](./images/lab-2/click-sign-in-for-freesql.png " ") ![click-create-new-account-button](./images/lab-2/click-create-new-account-button.png " ") @@ -38,17 +41,17 @@ This lab assumes you have: 2. Once logged in, click the Connect with [rotating language option] button. - ![click-connect-with-button](./images/lab-2/click-connect-with-button.png " ") + ![click-connect-with-button](./images/lab-2/click-connect-with-button.png " ") 3. Your new FreeSQL connection details will appear. Your password will appear only once. Copy the SQLcl connect string for future use. If you need a new password, click ↺ Regenerate. - ![schema-connection-details-for-freesql](./images/lab-2/schema-connection-details-for-freesql.png " ") + ![schema-connection-details-for-freesql](./images/lab-2/schema-connection-details-for-freesql.png " ") ![regenerating-new-password](./images/lab-2/regenerating-new-password.png " ") 4. SQL Developer for VS Code Extension already installed? Take note of your password, click the ⇱ Create a SQL Developer for VSCode connection button, and continue to the next task. Visual Studio Code should open automatically. - ![create-a-sql-connection-in-vs-code-button](./images/lab-2/create-a-sql-connection-in-vs-code-button.png " ") + ![create-a-sql-connection-in-vs-code-button](./images/lab-2/create-a-sql-connection-in-vs-code-button.png " ") 5. If you do not yet have the SQL Developer for VS Code Extension installed, note your FreeSQL credentials for later use: - Username @@ -57,24 +60,20 @@ This lab assumes you have: - Port - Service Name - ![sqlcl-connection-details-for-later-use](./images/lab-2/sqlcl-connection-details-for-later-use.png " ") + ![sqlcl-connection-details-for-later-use](./images/lab-2/sqlcl-connection-details-for-later-use.png " ") 6. You will use this FreeSQL user for the remainder of this LiveLab. Next, you'll create a database connection in SQL Developer for VS Code Extension. - - - - ## Task 1: Download the Instance Wallet 1. In this Lab, you will use a Cloud Wallet to configure your connection in SQL Developer for VS Code. Return to your Autonomous AI database dashboard. 2. Click on Database Connection. - ![click-on-database-connection](./images/lab-2/click-on-database-connection.png " ") + ![click-on-database-connection](./images/lab-2/click-on-database-connection.png " ") 3. Ensure Instance wallet is selected, then click Download wallet. - ![instance-wallet-type-download-wallet](./images/lab-2/instance-wallet-type-download-wallet.png " ") + ![instance-wallet-type-download-wallet](./images/lab-2/instance-wallet-type-download-wallet.png " ") 4. Enter and reconfirm a wallet password, then click Download. @@ -94,23 +93,23 @@ This lab assumes you have: 2. From the LaunchPad, go to **Administration** > **Database Users**. - ![admin-category-then-db-users](./images/lab-2/admin-category-then-db-users.png " ") + ![admin-category-then-db-users](./images/lab-2/admin-category-then-db-users.png " ") 3. From the User Management dashboard, select + Create User. - ![select-create-user](./images/lab-2/select-create-user.png " ") + ![select-create-user](./images/lab-2/select-create-user.png " ") 4. In the create dialog, choose a username and password, enable **REST, GraphQL, MongoDB API, and Web access**. - ![create-user-main-settings](./images/lab-2/create-user-main-settings.png " ") + ![create-user-main-settings](./images/lab-2/create-user-main-settings.png " ") 5. You can enable the `DB_DEVELOPER_ROLE` role to grant developer permissions. Click **Create User** to finish. - ![choose-db-developer-role](./images/lab-2/choose-db-developer-role.png " ") + ![choose-db-developer-role](./images/lab-2/choose-db-developer-role.png " ") 6. Optionally, retain your user's unique SQL Developer Web login URL. - ![dev-user-new-uri-for-db-actions](./images/lab-2/dev-user-new-uri-for-db-actions.png " ") + ![dev-user-new-uri-for-db-actions](./images/lab-2/dev-user-new-uri-for-db-actions.png " ") 7. You will use this DB user for the rest of this Lab. @@ -139,25 +138,25 @@ This lab assumes you have: 3. Click Create Connection and enter your FreeSQL connection details. - ![click-sql-developer-extension-icon-then-create-connection-icon](./images/lab-2/click-sql-developer-extension-icon-then-create-connection-icon.png " ") - ![complete-connection-details-in-sql-dev-connection-dialog](./images/lab-2/complete-connection-details-in-sql-dev-connection-dialog.png " ") - ![save-password-check](./images/lab-2/save-password-check.png " ") + ![click-sql-developer-extension-icon-then-create-connection-icon](./images/lab-2/click-sql-developer-extension-icon-then-create-connection-icon.png " ") + ![complete-connection-details-in-sql-dev-connection-dialog](./images/lab-2/complete-connection-details-in-sql-dev-connection-dialog.png " ") + ![save-password-check](./images/lab-2/save-password-check.png " ") -> ⚠ **Important:** Check Save Password. The SQLcl MCP Server needs this to connect. + > ⚠ **Important:** Check Save Password. The SQLcl MCP Server needs this to connect.
( ☜ click to expand) Redirected from FreeSQL.com? - 1. You may be prompted to allow the application to proceed. + 1. You may be prompted to allow the application to proceed. - ![freesql-connection-details-pre-populated](./images/lab-2/from-freesql-allow-vs-code-to-open.png " ") + ![freesql-connection-details-pre-populated](./images/lab-2/from-freesql-allow-vs-code-to-open.png " ") - 2. Once VS Code has opened, you may need to grant additional permissions to the application. + 2. Once VS Code has opened, you may need to grant additional permissions to the application. ![freesql-connection-details-pre-populated](./images/lab-2/allow-vs-code-to-redirect-to-sql-dev-download-link.png " ") ![freesql-connection-details-pre-populated](./images/lab-2/allowing-vs-code-extension-to-install.png " ") - 4. Your FreeSQL credentails are pre-populated for you. Enter in your password, and save your password before saving the connection. + 4. Your FreeSQL credentails are pre-populated for you. Enter in your password, and save your password before saving the connection. ![freesql-connection-details-pre-populated](./images/lab-2/freesql-connection-details-pre-populated.png " ") @@ -171,21 +170,21 @@ This lab assumes you have: 3. Click Create Connection, enter your DB details, and select **Cloud Wallet** as Connection Type. - ![click-create-connection-button](./images/lab-2/click-create-connection-button.png " ") - ![entering-in-connection-details](./images/lab-2/entering-in-connection-details.png " ") + ![click-create-connection-button](./images/lab-2/click-create-connection-button.png " ") + ![entering-in-connection-details](./images/lab-2/entering-in-connection-details.png " ") 4. Click **Test** to check the connection. When successful, click **Save**. - ![testing-new-freesql-connection-and-success-message](./images/lab-2/testing-new-freesql-connection-and-success-message.png " ") - ![saving-new-freesql-db-connection](./images/lab-2/saving-new-freesql-db-connection.png " ") + ![testing-new-freesql-connection-and-success-message](./images/lab-2/testing-new-freesql-connection-and-success-message.png " ") + ![saving-new-freesql-db-connection](./images/lab-2/saving-new-freesql-db-connection.png " ") 6. Your new connection will appear in the sidebar. Click the connection name. - ![expanding-newly-created-freesql-connection-in-sql-dev-vscode](./images/lab-2/expanding-newly-created-freesql-connection-in-sql-dev-vscode.png " ") + ![expanding-newly-created-freesql-connection-in-sql-dev-vscode](./images/lab-2/expanding-newly-created-freesql-connection-in-sql-dev-vscode.png " ") -> ☎ **Info:** Clicking a connection establishes a connection and reveals schema objects, links, directories, and other categories. + > ☎ **Info:** Clicking a connection establishes a connection and reveals schema objects, links, directories, and other categories. 7. Next, you'll install the Cline for VS Code Extension.install SQLcl. @@ -194,13 +193,13 @@ This lab assumes you have: ## Task 4: Installing SQLcl 1. Download and install SQLcl: - - With Homebrew (Mac): + - With Homebrew (Mac): ```shell brew install --cask sqlcl ``` - - Or [download directly](https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/download/) + - Or [download directly](https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/download/) -> ⚐ **Note:** Use SQLcl version 25.2 or later to use the MCP Server. + > ⚐ **Note:** Use SQLcl version 25.2 or later to use the MCP Server. 2. Note the path to the SQLcl /bin directory. Examples: @@ -225,24 +224,24 @@ This lab assumes you have: 1. In the VS Code Extensions tab, search for the Cline extension. - ![13-searching-for-cline-vs-code-extension](./images/lab-2/13-searching-for-cline-vs-code-extension.png " ") + ![13-searching-for-cline-vs-code-extension](./images/lab-2/13-searching-for-cline-vs-code-extension.png " ") 2. Install and open the extension from the Activity bar. 3. Choose how you will use Cline (this LiveLab assumes you are providing your own LLM Provider API key). - ![bring-my-own-api-key-cline](./images/lab-2/bring-my-own-api-key-cline-on-pc.jpg " ") + ![bring-my-own-api-key-cline](./images/lab-2/bring-my-own-api-key-cline-on-pc.jpg " ") 4. Choose from the list of available API Providers. Enter your API Key, and pick your LLM model (if bringing your own API Key). - ![selecting-api-provider-and-model](./images/lab-2/selecting-api-provider-and-model.jpg " ") + ![selecting-api-provider-and-model](./images/lab-2/selecting-api-provider-and-model.jpg " ") 5. Click Continue to complete registration. - ![select-continue-after-selecting-api-provider](./images/lab-2/select-continue-after-selecting-api-provider-on-pc.jpg " ") + ![select-continue-after-selecting-api-provider](./images/lab-2/select-continue-after-selecting-api-provider-on-pc.jpg " ") - + 6. With your provider settings complete, you’re ready to configure the SQLcl MCP Server. @@ -250,48 +249,48 @@ This lab assumes you have: 1. In VS Code, open the Command Palette and search for: Configure Cline SQLcl MCP. - **On Mac** + **On Mac** - ![command-palette-on-mac](./images/lab-2/command-palette-on-mac.png "Command Palette on Mac") + ![command-palette-on-mac](./images/lab-2/command-palette-on-mac.png "Command Palette on Mac") - **On Windows** + **On Windows** - ![view-command-palette-on-windows](./images/lab-2/view-command-palette-on-windows.jpg "Command Pallette on PC") + ![view-command-palette-on-windows](./images/lab-2/view-command-palette-on-windows.jpg "Command Pallette on PC") 2. Once located, select the **Configure Cline SQLcl MCP** option. A preconfigured Cline configuration settings JSON file will appear. The details of your SQLcl installation will be preopulated; to include all required MCP Server settings and parameters - ![configure-cline-sqlcl-mcp-server-option](./images/lab-2/search-for-sqlcl-mcp-by-keyword-on-pc.jpg " ") + ![configure-cline-sqlcl-mcp-server-option](./images/lab-2/search-for-sqlcl-mcp-by-keyword-on-pc.jpg " ") -> ⚐ **Note:** Update to the latest version of SQL Developer for VS Code to use the embedded SQLcl that ships with Oracle SQL Developer for VS Code. + > ⚐ **Note:** Update to the latest version of SQL Developer for VS Code to use the embedded SQLcl that ships with Oracle SQL Developer for VS Code. 3. Preview the `cline_mcp_settings.json` configuration file. No updates are needed. - ![preview-cline-mcp-settings-json-file](./images/lab-2/preview-cline-mcp-settings-json-file.png " ") + ![preview-cline-mcp-settings-json-file](./images/lab-2/preview-cline-mcp-settings-json-file.png " ") 4. Save and close the file. You might see an "Updating MCP Servers..." notification followed by "MCP Servers updated..." notification. This is expected. - ![21-updating-the-installed-cline-mcp-servers](./images/lab-2/21-updating-the-installed-cline-mcp-servers.png " ") + ![21-updating-the-installed-cline-mcp-servers](./images/lab-2/21-updating-the-installed-cline-mcp-servers.png " ") 5. You should now see `SQLcl - SQL Developer` (the default name) under the Installed MCP Servers tab of the MCP Servers view. - ![sqlcl-now-in-installed-servers-tab](./images/lab-2/sqlcl-now-in-installed-servers-tab.png " ") + ![sqlcl-now-in-installed-servers-tab](./images/lab-2/sqlcl-now-in-installed-servers-tab.png " ") 6. Click the SQLcl MCP server frame to expand. You’ll see a list of SQLcl MCP Server tools, parameters, and definitions. - ![23-expanding-the-installed-mcp-server-to-reveal-tools](./images/lab-2/23-expanding-the-installed-mcp-server-to-reveal-tools.png " ") + ![23-expanding-the-installed-mcp-server-to-reveal-tools](./images/lab-2/23-expanding-the-installed-mcp-server-to-reveal-tools.png " ")

-| Tool | Purpose | Parameters | Parameter Definitions | -|---|---|---|---| -| `list-connections` | Lists saved Oracle DB connection names. |
  • name
  • username
  • model
  • definition\_type
  • show\_details
|
  • Filter by connection name
  • Filter by username
  • LLM model used
  • Filter by connection types
  • Returns connection details in result
| -| `connect` | Interface to connect to, confirm, and list schemas. |
  • connection\_name
  • model
|
  • The saved connection name
  • LLM model used
| -| `disconnect` | Disconnects current session and logs out. |
  • model
|
  • LLM model used
| -| `run-sqlcl` | Run SQLcl CLI commands in SQLcl, returns command results. |
  • sqlcl
  • model
|
  • SQLcl command used
  • LLM model used
| -| `run-sql` | Run SQL queries and return CSV-formatted results. |
  • sql
  • model
|
  • SQL query used
  • LLM model used
| -| `schema-information`| Provides insights on the connected schema (metadata analysis). |
  • model
|
  • LLM model used
| -| `run-sql-async`| Executes SQL queries as background asynchronous tasks. |
  • task
  • command
  • model
|
  • The Job Id returned
  • The command to execute
  • LLM model used
| -{: title="SQLcl MCP Server Tools"} + | Tool | Purpose | Parameters | Parameter Definitions | + |---|---|---|---| + | `list-connections` | Lists saved Oracle DB connection names. |
  • name
  • username
  • model
  • definition\_type
  • show\_details
|
  • Filter by connection name
  • Filter by username
  • LLM model used
  • Filter by connection types
  • Returns connection details in result
| + | `connect` | Interface to connect to, confirm, and list schemas. |
  • connection\_name
  • model
|
  • The saved connection name
  • LLM model used
| + | `disconnect` | Disconnects current session and logs out. |
  • model
|
  • LLM model used
| + | `run-sqlcl` | Run SQLcl CLI commands in SQLcl, returns command results. |
  • sqlcl
  • model
|
  • SQLcl command used
  • LLM model used
| + | `run-sql` | Run SQL queries and return CSV-formatted results. |
  • sql
  • model
|
  • SQL query used
  • LLM model used
| + | `schema-information`| Provides insights on the connected schema (metadata analysis). |
  • model
|
  • LLM model used
| + | `run-sql-async`| Executes SQL queries as background asynchronous tasks. |
  • task
  • command
  • model
|
  • The Job Id returned
  • The command to execute
  • LLM model used
| + {: title="SQLcl MCP Server Tools"} 7. Your SQLcl MCP Server is configured. You may now [proceed to the next lab](#next). @@ -326,4 +325,4 @@ Click the Configure tab to review your currently configured MCP Servers and to e * **Contributors:** Jeff Smith, Distinguished Product Manager, Database Tools * **Last Updated:** Chris Hoina, February 2026 - \ No newline at end of file + diff --git a/sqlcl-mcp-server-intro/3-using-the-mcp-server.md b/sqlcl-mcp-server-intro/3-using-the-mcp-server.md index a5c5673fb..f2d0db411 100644 --- a/sqlcl-mcp-server-intro/3-using-the-mcp-server.md +++ b/sqlcl-mcp-server-intro/3-using-the-mcp-server.md @@ -36,27 +36,27 @@ This lab assumes you have: 1. Is the MCP Server working? - You will need to confirm that the SQLcl MCP Server is working *before* you can begin interacting with it. + You will need to confirm that the SQLcl MCP Server is working *before* you can begin interacting with it. 2. Locate the Cline extension. Ensure you see the Agent prompt. Notice the **Plan** and **Act** modes. You will toggle between these two modes depending on your intent or the prompts used. - ![cline-1](./images/lab-3/cline-1.png " " ) + ![cline-1](./images/lab-3/cline-1.png " " )

-> ⚠ **IMPORTANT:** For adhering to security best practices, ensure the "Auto-Approve" option is disabled. + > ⚠ **IMPORTANT:** For adhering to security best practices, ensure the "Auto-Approve" option is disabled.

- + When you are done, you will inspect the MCP logging table in your schema to see what has happened in the database, via our MCP Server. --> 3. Enable **Plan** mode. Then, in the Task input area of Cline, enter the following prompt: @@ -68,13 +68,13 @@ When you are done, you will inspect the MCP logging table in your schema to see 4. Cline will create a plan and respond by asking permission to use your SQLcl MCP Server via the `list-connections` tool. You should see something like this: - ![cline-2](./images/lab-3/cline-2.png " ") + ![cline-2](./images/lab-3/cline-2.png " ") -> ⚐ **Note:** Note the tool name, followed by the arguments. In this case, Cline wants to "see" what database connections are available. + > ⚐ **Note:** Note the tool name, followed by the arguments. In this case, Cline wants to "see" what database connections are available. 5. Select the **Approve** button to allow the Agent to continue its plan. - The Agent will use your Oracle Database connection, and ask to connect to it, via the `connect` tool. + The Agent will use your Oracle Database connection, and ask to connect to it, via the `connect` tool. 6. You will again be prompted to approve a request. The message will look something like this: @@ -90,10 +90,10 @@ When you are done, you will inspect the MCP logging table in your schema to see 8. If the connection is successful, you will see two things: - - the raw feedback from the `connect` tool - - an LLM-generated summary + - the raw feedback from the `connect` tool + - an LLM-generated summary - *Example:* + *Example:* ```txt Excellent! The connection to your database was successful. I can see we're connected to Oracle Database 23.0.0.0.0 in READ WRITE mode with AL32UTF8 character set. @@ -101,17 +101,17 @@ When you are done, you will inspect the MCP logging table in your schema to see Now let me run a test query to verify everything is working properly. I'll start with a simple query to check the current database time: ``` -> ⚐ **Note:** LLM training data can vary widely among versions and vendors. Thus, an LLM may generate one of several different types of queries to satisfy our request to 'test' the connection and system. + > ⚐ **Note:** LLM training data can vary widely among versions and vendors. Thus, an LLM may generate one of several different types of queries to satisfy our request to 'test' the connection and system. -⚠ **Warning:** It is very important that you review the SQL, or update your prompt to include the exact SQL you want the Agent to use. + ⚠ **Warning:** It is very important that you review the SQL, or update your prompt to include the exact SQL you want the Agent to use.

9. Scroll through the "sql" attribute to review the SQL statement. - ![cline-3](./images/lab-3/cline-3.png " ") + ![cline-3](./images/lab-3/cline-3.png " ") - In the example the complete SQL statement will resemble the following: + In the example the complete SQL statement will resemble the following: ```sql SELECT /* LLM in use is claude-3-5-sonnet-20241022 */ @@ -140,15 +140,15 @@ When you are done, you will inspect the MCP logging table in your schema to see connect as the FREESQL_[your unique ID] user and use the sqlcl schema-information tool ``` - ![prep-command-for-schema-information-tool](./images/lab-2/prep-command-for-schema-information-tool.png " ") + ![prep-command-for-schema-information-tool](./images/lab-2/prep-command-for-schema-information-tool.png " ") 3. If in Plan mode, toggle to Act mode so the AI Agent can proceed. - ![requests-to-toggle-to-act-mode-for-schema-information-task](./images/lab-2/requests-to-toggle-to-act-mode-for-schema-information-task.png " ") + ![requests-to-toggle-to-act-mode-for-schema-information-task](./images/lab-2/requests-to-toggle-to-act-mode-for-schema-information-task.png " ") 4. Approve the connection, and await the results. You should observe the SQLcl MCP Server use the `connect`, `list-connections`, and `schema-information` tools. - ![list-connections-and-schema-information-tools-in-us](./images/lab-2/list-connections-and-schema-information-tools-in-use.png " ") + ![list-connections-and-schema-information-tools-in-us](./images/lab-2/list-connections-and-schema-information-tools-in-use.png " ") 5. Once the task completes, a summary of results will be displayed. Congratulations, you've just used three of the SQLcl MCP Server Tools. @@ -170,7 +170,7 @@ When you are done, you will inspect the MCP logging table in your schema to see 4. Click the Data tab to review the interactions from your previous Cline tasks. These logs will capture the SQL, PLSQL, and SQL scripts that were executed on your behalf (via Cline), by the SQLcl MCP Server. - ![cline-log-table-data-tab](./images/lab-3/cline-log-table-data-tab.png " ") + ![cline-log-table-data-tab](./images/lab-3/cline-log-table-data-tab.png " ") 7. That's it! You are now ready to start exploring the power of your AI Agent, it's LLMs, and your Oracle Database via the SQLcl MCP Server! @@ -188,4 +188,4 @@ When you are done, you will inspect the MCP logging table in your schema to see * **Contributors**
  • Jeff Smith, Distinguished Product Manager, Database Tools
* **Last Updated By/Date**
  • Chris Hoina, February 2026
- \ No newline at end of file + diff --git a/sqlcl-mcp-server-intro/4-build-database-objects.md b/sqlcl-mcp-server-intro/4-build-database-objects.md index 710c387ed..9a8d7321a 100644 --- a/sqlcl-mcp-server-intro/4-build-database-objects.md +++ b/sqlcl-mcp-server-intro/4-build-database-objects.md @@ -33,14 +33,9 @@ This lab assumes you have: 1. A sample prompt has been provided for you (see below). This prompt can be used as-is with your Agent while in "Plan" mode. Alternatively you may use it as a reference, while creating your own scenario. - - +[Download prompt](./files/create_data_and_views_prompt.md?download=1) -> ⚐ **Note:** This Lab is designed to be open-ended, accordingly, your individual results will vary. Feel free to "go off-script" ☺! + > **Note:** This Lab is designed to be open-ended, accordingly, your individual results will vary. Feel free to "go off-script"! 2. Review the provided prompt in your IDE or browser. You will notice a single heading and several sub-headings. Each sub-heading will serve as a phase or step for this scenario: @@ -56,11 +51,11 @@ This lab assumes you have: 5. Make sure you are in **Plan** mode. As a best practice, remaining in **Plan** mode will allow you to "step through" Cline's execution. Should an AI Agent deviate from your agreed upon plan, you can periodically "nudge" it back on course. - ![plan-mode-example](./images/lab-4/plan-mode-example.png " ") + ![plan-mode-example](./images/lab-4/plan-mode-example.png " ") 6. If you decide to use the prepared `.md` file, click the `+` icon (i.e., Add Files & Images icon) and select the file. - ![adding-prompt-file-to-cline-task](./images/lab-4/adding-prompt-file-to-cline-task.png " ") + ![adding-prompt-file-to-cline-task](./images/lab-4/adding-prompt-file-to-cline-task.png " ") 7. Before continuing, consider adding in some prepatory text to help guide the Agent. An example: @@ -70,7 +65,7 @@ This lab assumes you have: ``` - ![including-prepatory-command-context-to-cline-task](./images/lab-4/including-prepatory-command-context-to-cline-task.png " ") + ![including-prepatory-command-context-to-cline-task](./images/lab-4/including-prepatory-command-context-to-cline-task.png " ") 8. Once satisfied, press Enter or the arrow icon. @@ -86,7 +81,7 @@ This lab assumes you have: 2. You will then probably notice Agent using the `run-sql` tool to create four new tables in your schema: - ![4-creating-new-schemas](./images/lab-4/4-creating-new-schemas.png " ") + ![4-creating-new-schemas](./images/lab-4/4-creating-new-schemas.png " ") 3. If prompted, select `Approve` to allow the creation of these objects. @@ -94,11 +89,11 @@ This lab assumes you have: 5. At times, your Agent may exhibit unexpected behavior. Take this example, where a user is asked to enable **Act** mode to complete a task. Review requests carefully and respond appropriately. - ![8-approving-the-insert-of-multiple-values](./images/lab-4/8-approving-the-insert-of-multiple-values.png " ") + ![8-approving-the-insert-of-multiple-values](./images/lab-4/8-approving-the-insert-of-multiple-values.png " ")
-> ⚐ **Note:** The LLM model used, network latency, the workstation processor, other ongoing processes might impact your Agent's behavior. You will need to review the request and proceed cautiously. In this example, the request is relatively simple: + > ⚐ **Note:** The LLM model used, network latency, the workstation processor, other ongoing processes might impact your Agent's behavior. You will need to review the request and proceed cautiously. In this example, the request is relatively simple: 6. You may even notice odd behavior such as is illustrated when executing these `INSERT` statements (e.g., only a few rows inserted at a time). Review the Agent's summaries and requests, and if you agree, proceed with any proposed actions/plans. @@ -108,7 +103,7 @@ This lab assumes you have: 1. When your new objects have been created and populated, refer again to the included prompt. You'll find there is a task to fetch the first five rows of each of your tables. Your tables might return information similar to those in the images below. - ![13-fetch-first-five-moto](./images/lab-4/13-fetch-first-five-moto.png " ") + ![13-fetch-first-five-moto](./images/lab-4/13-fetch-first-five-moto.png " ") 2. If your objects are created and populated as expected (everything checks the "reasonableness test"), allow the Agent to continue. @@ -132,7 +127,7 @@ This lab assumes you have: 4. Your prompt includes a request to propose two additional, unique views. Yours may be the same, they may even differ. A possible example: - ![20-vehicle-dist-by-country-view](./images/lab-4/20-vehicle-dist-by-country-view.png " ") + ![20-vehicle-dist-by-country-view](./images/lab-4/20-vehicle-dist-by-country-view.png " ") 5. Compare your results. What did you come up with? @@ -142,7 +137,7 @@ This lab assumes you have: 2. You might see a summary of the actions performed once you disconnect. Compare your results. What did you end up with? - ![22-summary-of-actions-performed](./images/lab-4/22-summary-of-actions-performed.png " ") + ![22-summary-of-actions-performed](./images/lab-4/22-summary-of-actions-performed.png " ") 3. And that's it, you're done! @@ -173,4 +168,4 @@ This lab assumes you have: * **Contributors**
  • Jeff Smith, Distinguished Product Manager, Database Tools
* **Last Updated By/Date**
  • Chris Hoina, January 2026
- \ No newline at end of file + diff --git a/sqlcl-mcp-server-intro/5-build-a-react-app.md b/sqlcl-mcp-server-intro/5-build-a-react-app.md index 5c1f3c8a1..adc029aa6 100644 --- a/sqlcl-mcp-server-intro/5-build-a-react-app.md +++ b/sqlcl-mcp-server-intro/5-build-a-react-app.md @@ -40,14 +40,9 @@ This lab assumes you have: 1. A sample prompt has been provided for you. You may review it here, open the `.md` file in a new tab, or download the file locally. - - +[Download prompt](./files/create_a_react_app_prompt.md?download=1) -> ⚐ **Note:** This Lab is designed to be open-ended, accordingly, your individual results will vary. Feel free to improvise ☺ ! +> **Note:** This Lab is designed to be open-ended, accordingly, your individual results will vary. Feel free to improvise! 2. After reviewing the prompt, you may wish to save it locally. But, before you begin, review the various sections of the prompt: @@ -64,15 +59,15 @@ This lab assumes you have: 1. The prompt that you have been provided is the result of iterative testing. The prompt is provided to teach you how to guide your LLM to best utilize the SQLcl MCP Server. Following along with the prompt should result in a repeatable and predictable outcome. -> ⚐ **Note:** You should expect to complete this lab with a version of the application that is unique to you; but that still closesly resembles any examples and images in this Lab. + > ⚐ **Note:** You should expect to complete this lab with a version of the application that is unique to you; but that still closesly resembles any examples and images in this Lab. 2. When ready, navigate to your Cline extension. Toggle the Agent to **Plan** mode. - ![plan-mode-example](./images/lab-5/plan-mode-example.png " ") + ![plan-mode-example](./images/lab-5/plan-mode-example.png " ") 3. Click the `+` icon to add files and images to the task. Select the file name you chose for the prompt. - ![adding-prompt-file-to-cline-task](./images/lab-5/adding-prompt-file-to-cline-task.png " ") + ![adding-prompt-file-to-cline-task](./images/lab-5/adding-prompt-file-to-cline-task.png " ") 4. If you decide to use the prompt in its entirety, include some prepatory instructions in additon to the prompt file; something like this: @@ -80,7 +75,7 @@ This lab assumes you have: Review the steps in the included markdown file. Detail the steps you intend to take to achieve the desired outcome. And await for my approval before proceeding. ``` - ![including-prepatory-command-context-to-cline-task](./images/lab-5/including-prepatory-command-context-to-cline-task.png " ") + ![including-prepatory-command-context-to-cline-task](./images/lab-5/including-prepatory-command-context-to-cline-task.png " ") 5. Carefully follow along with the Agent's actions, providing feedback and coaching as needed. @@ -96,9 +91,9 @@ This lab assumes you have: 1. Compare the sample application to your own: - ![8-reviewing-the-sample-ui-with-hard-coded-values-above-fold](./images/lab-5/8-reviewing-the-sample-ui-with-hard-coded-values-above-fold.png " ") + ![8-reviewing-the-sample-ui-with-hard-coded-values-above-fold](./images/lab-5/8-reviewing-the-sample-ui-with-hard-coded-values-above-fold.png " ") - ![9-reviewing-the-sample-ui-with-hard-coded-values-below-fold](./images/lab-5/9-reviewing-the-sample-ui-with-hard-coded-values-below-fold.png " ") + ![9-reviewing-the-sample-ui-with-hard-coded-values-below-fold](./images/lab-5/9-reviewing-the-sample-ui-with-hard-coded-values-below-fold.png " ") 2. By now you should have a sample React application. While your values are hard-coded, you might ask the Agent to build the app out further. @@ -108,11 +103,11 @@ This lab assumes you have: 2. Merge conflict markers (e.g. `>>>>>>> REPLACE`)? LLMs can sometimes have issues with advanced file creation, preparation, and updating. One common issue is their inability to remove merge conflict markers, you may need to manually remove and save a file every now and again. - ![12-troubleshooting-merge-conflict-marker-errors](./images/lab-5/12-troubleshooting-merge-conflict-marker-errors.png " ") + ![12-troubleshooting-merge-conflict-marker-errors](./images/lab-5/12-troubleshooting-merge-conflict-marker-errors.png " ") 3. The Agent may forget, or narrow its focus too much. The Agent may require periodic prompting. For instance, in this example, we reiterated the request to connect as a specific user: - ![13-possible-intervention-of-prompting-to-connect-as-user.](./images/lab-5/13-possible-intervention-of-prompting-to-connect-as-user.png " ") + ![13-possible-intervention-of-prompting-to-connect-as-user.](./images/lab-5/13-possible-intervention-of-prompting-to-connect-as-user.png " ") 4. An Agent might *convincingly* tell you a task has been accomlished, when in fact it has not. In cases such as these, you may need to provide the Agent with quality feedback markers, or actual errors from your application's console log. @@ -140,4 +135,4 @@ This lab assumes you have: * **Contributors**
  • Jeff Smith, Distinguished Product Manager, Database Tools
* **Last Updated By/Date**
  • Chris Hoina, January 2026
- \ No newline at end of file + diff --git a/sqlcl-mcp-server-intro/6-build-a-html-dashboard.md b/sqlcl-mcp-server-intro/6-build-a-html-dashboard.md index 0eafd60e0..3d85158c4 100644 --- a/sqlcl-mcp-server-intro/6-build-a-html-dashboard.md +++ b/sqlcl-mcp-server-intro/6-build-a-html-dashboard.md @@ -40,22 +40,17 @@ This lab assumes you have: 1. A sample prompt has been provided for you. It can be used as-is in **Plan** mode with your Agent. Or, can use the prompt as a reference while you create your own dashboard. - - +[Download prompt](./files/create_a_react_app_prompt.md?download=1) -> ⚐ **Note:** This Lab is designed to be open-ended, accordingly, your individual results will vary. Feel free to "go off-script" ☺ ! +> **Note:** This Lab is designed to be open-ended, accordingly, your individual results will vary. Feel free to "go off-script"! 2. Whether you use the prompt as-is or use it as a reference; you decide. Make sure to begin your workflow in **Plan** mode in order to have better control and oversight over the entire process. - ![plan-mode-example](./images/lab-5/plan-mode-example.png " ") + ![plan-mode-example](./images/lab-5/plan-mode-example.png " ") 3. Click the `+` icon to add files and images to the task. Select the file name you chose for the prompt. - ![adding-prompt-file-to-cline-task](./images/lab-5/adding-prompt-file-to-cline-task.png " ") + ![adding-prompt-file-to-cline-task](./images/lab-5/adding-prompt-file-to-cline-task.png " ") 4. If you decide to use the prompt in its entirety, include some prepatory instructions in additon to the prompt file; something like this: @@ -63,11 +58,11 @@ This lab assumes you have: Review the steps in the included markdown file. Detail the steps you intend to take to achieve the desired outcome. And await for my approval before proceeding. ``` - ![including-prepatory-command-context-to-cline-task](./images/lab-5/including-prepatory-command-context-to-cline-task.png " ") + ![including-prepatory-command-context-to-cline-task](./images/lab-5/including-prepatory-command-context-to-cline-task.png " ") 3. Let the Agent summarize its intent. - ![1-entering-a-prompt-in-one-go](./images/lab-6/1-entering-a-prompt-in-one-go.png " ") + ![1-entering-a-prompt-in-one-go](./images/lab-6/1-entering-a-prompt-in-one-go.png " ") 4. In other labs, you might approve actions in stages. But if you decide to share with the Agent the *entire* prompt, the Agent will review the tasks all at once and execute its plan with minimal intervention. You can of course add suggestions or changes to the proposed plan. And when you are satisfied, allow the Agent to continue. @@ -87,7 +82,7 @@ This lab assumes you have: 3. Even now, LLMs find merge conflict markers difficult to troubleshoot. So, if manual intervention is required, assist the Agent with removing any of these markers (e.g. `>>>>>>> REPLACE`). - ![11-troubleshooting-replace-markers](./images/lab-6/11-troubleshooting-replace-markers.png " ") + ![11-troubleshooting-replace-markers](./images/lab-6/11-troubleshooting-replace-markers.png " ") 4. If you are able, review your project files before proceeding. Does everything look correct? @@ -97,7 +92,7 @@ This lab assumes you have: 2. You may have chosen different charts or visualizations. You may have chosen a different schema too. But if you've monitored the Agent, and ensured that its using the correct SQLcl MCP server tools, your end result probably looks very close to what you see here: - ![14-hr-dashboard-even-further-below-fold](./images/lab-6/14-hr-dashboard-even-further-below-fold.png " ") + ![14-hr-dashboard-even-further-below-fold](./images/lab-6/14-hr-dashboard-even-further-below-fold.png " ") 3. Congratulations, you've finished! Feel free to use the provided prompts as reference; you are encouraged to improve and refine them as needed. And if you like, try the labs again with varied prompting. @@ -113,4 +108,4 @@ This lab assumes you have: * **Contributors**
  • Jeff Smith, Distinguished Product Manager, Database Tools
* **Last Updated By/Date**
  • Chris Hoina, January 2026
- \ No newline at end of file + diff --git a/sqlcl-mcp-server-intro/do-not-use-7-build-a-sql-notebook.md b/sqlcl-mcp-server-intro/do-not-use-7-build-a-sql-notebook.md index 3025dfed9..2686d9af9 100644 --- a/sqlcl-mcp-server-intro/do-not-use-7-build-a-sql-notebook.md +++ b/sqlcl-mcp-server-intro/do-not-use-7-build-a-sql-notebook.md @@ -29,7 +29,7 @@ This lab assumes you have: 1. You again have been provided with a sample prompt. In other scenarios the prompts were relatively straightforward. And depending on the LLM used, the results in the other Lab scenarios probably matched the expected output. - Your results are largely due to the fact that your LLMs have quite a bit of training on the various topics we've covered. However, there may not be a lot of publically-accessible training data related to new or novel technologies and features: in this case asking our Agent to use the SQLcl MCP server to help design a SQL Notebook file (`.sqlnb`)! + Your results are largely due to the fact that your LLMs have quite a bit of training on the various topics we've covered. However, there may not be a lot of publically-accessible training data related to new or novel technologies and features: in this case asking our Agent to use the SQLcl MCP server to help design a SQL Notebook file (`.sqlnb`)! 2. Let's begin by reviewing prompt. @@ -245,11 +245,11 @@ This lab assumes you have: 1. If you've made it this far, then head back to over to your SQL Developer for VS Code connections, and click on your connection to restablish a database connection. - ![7-navigate-to-sql-connections](./images/lab-7/7-navigate-to-sql-connections.png " ") + ![7-navigate-to-sql-connections](./images/lab-7/7-navigate-to-sql-connections.png " ") 2. Locate your saved SQL Notebook, click it. SQL Developer will recognize it, and open the notebook. - ![8-click-on-new-sql-notebook-file](./images/lab-7/8-click-on-new-sql-notebook-file.png " ") + ![8-click-on-new-sql-notebook-file](./images/lab-7/8-click-on-new-sql-notebook-file.png " ") 3. Congrats, you've just discovered a new use case: Using an AI agent to create a SQL notebook using the available **Tools** in the SQLcl MCP Server. diff --git a/sqlcl-mcp-server-intro/files/create_a_react_app_prompt.md b/sqlcl-mcp-server-intro/files/create_a_react_app_prompt.md index 13b3a3c6b..063bc0dec 100644 --- a/sqlcl-mcp-server-intro/files/create_a_react_app_prompt.md +++ b/sqlcl-mcp-server-intro/files/create_a_react_app_prompt.md @@ -1,5 +1,14 @@ # Single Web Page Application example +### Objectives + +In this lab, you will: +* TODO: Add objectives + + +Estimated Time: TODO - x minutes + + ## Overview 1. You will create a sample single page React application using available information in the chosen connection. If I do not explicitly tell you which connection to use, prompt me with the available connections and have me choose one before proceeding. @@ -200,3 +209,8 @@ 1. Launch the web application and review it for accuracy and expected outcome 2. If the data and visualization are not visible on screen, please debug as needed. + +## Acknowledgements + +* **Author** - TODO: Your Name, Your Title, Your Organization +* **Last Updated By/Date** - TODO: Your Name, Month Year diff --git a/sqlcl-mcp-server-intro/files/create_an_html_dashboard_prompt.md b/sqlcl-mcp-server-intro/files/create_an_html_dashboard_prompt.md index 5308afb3c..fbd647496 100644 --- a/sqlcl-mcp-server-intro/files/create_an_html_dashboard_prompt.md +++ b/sqlcl-mcp-server-intro/files/create_an_html_dashboard_prompt.md @@ -1,18 +1,31 @@ # Build a dashboard +### Objectives + +In this lab, you will: +* TODO: Add objectives + + +Estimated Time: TODO - x minutes + + ## Overview 1. You will be creating a dynamic and visually stunning html-based dashboard for me. I want to be able to view this dashboard quickly and close it when I'm finished. It doesn't need to "run" all the time. 2. This dashboard should not be amended to or included in an existing projects or project folders. Endeavor to rely on as few web frameworks as possible. HTML and standard JavaScript is preferred. +## Introduction + +TODO: Add introduction text here. + ## Task 1: Connect, familiarize 1. Provide me a list of available database connections, connect as the chosen connection (user) and describe the HR schema tables and views. DO NOT use SQLcl's MCP Server "schema-information" tool for this exploration. If I do not explicitly tell you which connection to use, prompt me with the available connections and have me choose one before proceeding. 2. You should be able to find the HR schema under the schema directory named "Other Users"; if you have trouble you can use the following SQL to familarize yourself with the HR schema: -`SELECT table_name FROM all_tables WHERE owner='HR' ORDER BY table_name;` + `SELECT table_name FROM all_tables WHERE owner='HR' ORDER BY table_name;` 3. Familiarize yourself with the HR schema's tables and views and their relationships. DO NOT use SQLcl's MCP Sever "schema-information" tool for this exploration. @@ -25,4 +38,9 @@ 3. I want a bubble chart to display the count of countries employees reside in. The bubble size should be relative to the number of employees in that country. I want you to create something like in this example: https://www.chartjs.org/docs/latest/samples/other-charts/bubble.html 4. I want you to show me a breakdown of the employees by their Job ID, on a doughnut chart like this: https://www.chartjs.org/docs/latest/samples/other-charts/doughnut.html -5. Everything should fit in a single viewport (nothing "below the fold"). \ No newline at end of file +5. Everything should fit in a single viewport (nothing "below the fold"). + +## Acknowledgements + +* **Author** - TODO: Your Name, Your Title, Your Organization +* **Last Updated By/Date** - TODO: Your Name, Month Year diff --git a/sqlcl-mcp-server-intro/files/create_data_and_views_prompt.md b/sqlcl-mcp-server-intro/files/create_data_and_views_prompt.md index 241888d48..e48ac81b7 100644 --- a/sqlcl-mcp-server-intro/files/create_data_and_views_prompt.md +++ b/sqlcl-mcp-server-intro/files/create_data_and_views_prompt.md @@ -1,5 +1,14 @@ # Creating mock Schema data, and relevant views +### Objectives + +In this lab, you will: +* TODO: Add objectives + + +Estimated Time: TODO - x minutes + + ## Connecting and creating database objects 1. Connect as the user. If no user is provided, please prompt me with the available connections, and ask me to choose one of the connections before proceeding to the next step. @@ -95,4 +104,9 @@ The tables to be created: ## Disconnect -1. Once we are complete, you will disconnect from the Oracle database. \ No newline at end of file +1. Once we are complete, you will disconnect from the Oracle database. + +## Acknowledgements + +* **Author** - TODO: Your Name, Your Title, Your Organization +* **Last Updated By/Date** - TODO: Your Name, Month Year diff --git a/sqlcl-mcp-server-intro/files/do_not_use_create-a-sql-notebook_prompt.md b/sqlcl-mcp-server-intro/files/do_not_use_create-a-sql-notebook_prompt.md index c9e82d776..2e6af549e 100644 --- a/sqlcl-mcp-server-intro/files/do_not_use_create-a-sql-notebook_prompt.md +++ b/sqlcl-mcp-server-intro/files/do_not_use_create-a-sql-notebook_prompt.md @@ -1,5 +1,14 @@ # Create a SQL Notebook +### Objectives + +In this lab, you will: +* TODO: Add objectives + + +Estimated Time: TODO - x minutes + + ## Create an empty .sqlnb file Create a file named "consumer_profile.sqlnb" and set it aside for appending. You will use this file periodically to summarize your findings, obeservations, and SQL and any PL/SQL used to gather results. The tasks list (known as "Your task list") in the following steps will provide you with the content for this .sqlnb file. @@ -182,3 +191,8 @@ cells: + +## Acknowledgements + +* **Author** - TODO: Your Name, Your Title, Your Organization +* **Last Updated By/Date** - TODO: Your Name, Month Year diff --git a/sqlcl-mcp-server-intro/files/do_not_use_create_schema_objects_prompt.md b/sqlcl-mcp-server-intro/files/do_not_use_create_schema_objects_prompt.md index d273d6c75..3cd042b7c 100644 --- a/sqlcl-mcp-server-intro/files/do_not_use_create_schema_objects_prompt.md +++ b/sqlcl-mcp-server-intro/files/do_not_use_create_schema_objects_prompt.md @@ -1,5 +1,14 @@ # Creating schemas and granting privileges to the SQL_FREESQL_01 user +### Objectives + +In this lab, you will: +* TODO: Add objectives + + +Estimated Time: TODO - x minutes + + ## Download and extract files 1. The latest version of the Oracle database 23ai sample schemas and installation scripts are located here: https://github.com/oracle-samples/db-sample-schemas/archive/refs/tags/v23.3.zip @@ -122,3 +131,8 @@ USERNAME = + +## Acknowledgements + +* **Author** - TODO: Your Name, Your Title, Your Organization +* **Last Updated By/Date** - TODO: Your Name, Month Year diff --git a/sqlcl-mcp-server-intro/files/do_not_use_explain_prompt.md b/sqlcl-mcp-server-intro/files/do_not_use_explain_prompt.md index ce6b0f17b..e18cd0b98 100644 --- a/sqlcl-mcp-server-intro/files/do_not_use_explain_prompt.md +++ b/sqlcl-mcp-server-intro/files/do_not_use_explain_prompt.md @@ -1,5 +1,14 @@ # Optimize my PL/SQL +### Objectives + +In this lab, you will: +* TODO: Add objectives + + +Estimated Time: TODO - x minutes + + 1. Connect as the SQL_FREESQL_01 user 2. Create three tables for me; please recommend the names, attributes, constraints, and indexes to me. 3. Once I approve, populate these tables with 100 rows each of sample data @@ -30,3 +39,8 @@ 1. Use the pre-optimzation and post-optimization results of the PLSQL procedure to create an html-based visualization of the performance difference among the two 2. The html visualization should have a detailed list of the changes that were made to improve the performance + +## Acknowledgements + +* **Author** - TODO: Your Name, Your Title, Your Organization +* **Last Updated By/Date** - TODO: Your Name, Month Year diff --git a/sqlcl-mcp-server-intro/files/test.md b/sqlcl-mcp-server-intro/files/test.md index 0768ebb86..4a5c30ed5 100644 --- a/sqlcl-mcp-server-intro/files/test.md +++ b/sqlcl-mcp-server-intro/files/test.md @@ -1 +1,16 @@ -A test md file for testing the include functionality of livelabs. \ No newline at end of file +# TODO: Title + +### Objectives + +In this lab, you will: +* TODO: Add objectives + +A test md file for testing the include functionality of livelabs. + +Estimated Time: TODO - x minutes + + +## Acknowledgements + +* **Author** - TODO: Your Name, Your Title, Your Organization +* **Last Updated By/Date** - TODO: Your Name, Month Year diff --git a/sqlcl-mcp-server-intro/livelabs-template.md b/sqlcl-mcp-server-intro/livelabs-template.md deleted file mode 100644 index 0d4bfd042..000000000 --- a/sqlcl-mcp-server-intro/livelabs-template.md +++ /dev/null @@ -1,290 +0,0 @@ -# LiveLabs Test Template - -*About this template: This file is used to demonstrate all of the features built into the LiveLabs conversion engine. Many of the features described here are optional and are so marked. - -## Introduction - -*Describe the lab in one or two sentences, for example:* This lab walks you through the Steps to ... - -*You may add an option video, using this format: [](youtube:YouTube video id)* - - [](youtube:zNKxJjkq0Pw) - -Estimated Time: -- minutes - -### About (Optional) -Enter background information here about the technology/feature or product used in this lab - no need to repeat what you covered in the introduction. Keep this section fairly concise. If you find yourself needing more than to sections/paragraphs, please utilize the "Learn More" section. - -### Objectives - -*List objectives for the lab - if this is the intro lab, list objectives for the workshop* - -In this lab, you will: -* Objective 1 -* Objective 2 -* Objective 3 -* [relative lab url test](?lab=need-help) - -### Prerequisites (Optional) - -*List the prerequisites for this lab using the format below. Fill in whatever knowledge, accounts, etc. is needed to complete the lab. **Do NOT list** each previous lab as a prerequisite.* - -This lab assumes you have: - -* An Oracle account -* All previous labs successfully completed - - > **Note:** If you have a **Free Trial** account, when your Free Trial expires your account will be converted to an **Always Free** account. You will not be able to conduct Free Tier workshops unless the Always Free environment is available. **[Click here for the Free Tier FAQ page.](https://www.oracle.com/cloud/free/faq.html)** - -*This is the "fold" - below items are collapsed by default* - -## Task 1: Standard LiveLabs Images and Text - - - -1. Standard method to include an image. - - ![](images/sample1.png) - - The image alt text is optional. - - ![image alt text](images/sample1.png) - -2. Image with a link to the text description below it. This provides screen readers with an accessible way to "see" the image. The `sample1.txt` file must be added to the `files` folder. - - ![Image alt text](images/sample1.png "Image title") - -3. Inline image icon ![Image alt text](images/sample2.png) click **Navigation**. - - - -4. One example with bold **text**. - - If you add another paragraph, add 3 spaces before the beginning of the line to keep it in line with the numbered step. - -5. Use tables sparingly: - - | Column 1 | Column 2 | Column 3 | - | --- | --- | --- | - | 1 | Some text or a link | More text | - | 2 |Some text or a link | More text | - | 3 | Some text or a link | More text | - -6. You can also include bulleted lists - make sure to indent 4 spaces: - - - List item 1 - - List item 2 - -7. Inline monospaced font is done with a single back ticks, for example `this is code`. - -8. Code blocks are identified by three back ticks, indented to align with the step: - - ``` - This is a code block. - ``` - -9. Long code block with line breaks - - ``` - /* Specify the base URL that you copied from your files in OCI Object Storage in the define base_URL line below*/ - /* change idthydc0kinr to your real namespace. The name is case-sensitive. */ - /* change ADWCLab to your real bucket name. The name is case-sensitive. */ - /* change us-phoenix-1 to your real region name. The name is case-sensitive. */ - /* you can find these values on the OCI Console .. Storage .. Object Storage screen */ - set define on - define base_URL='https://objectstorage.us-phoenix-1.oraclecloud.com/n/idthydc0kinr/b/ADWCLab/o' - - /* copy Channels table */ - begin - dbms_cloud.copy_data( - table_name =>'CHANNELS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/chan_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); - end; - / - - /* copy Countries table */ - begin - dbms_cloud.copy_data( - table_name =>'COUNTRIES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/coun_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); - end; - / - - /* Copy customers */ - begin - dbms_cloud.copy_data( - table_name =>'CUSTOMERS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/cust1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS') - ); - end; - / - begin - dbms_cloud.copy_data( - table_name =>'SUPPLEMENTARY_DEMOGRAPHICS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/dem1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); - end; - / - begin - dbms_cloud.copy_data( - table_name =>'SALES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/dmsal_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD') - ); - end; - / - begin - dbms_cloud.copy_data( - table_name =>'PRODUCTS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/prod1v3.dat', - format => json_object('delimiter' value '|', 'quote' value '^', 'ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); - end; - / - begin - dbms_cloud.copy_data( - table_name =>'PROMOTIONS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/prom1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); - end; - / - begin - dbms_cloud.copy_data( - table_name =>'SALES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/sale1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true') - ); - end; - / - begin - dbms_cloud.copy_data( - table_name =>'TIMES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/time_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); - end; - / - begin - dbms_cloud.copy_data( - table_name =>'COSTS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/costs.dat', - format => json_object('ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true') - ); - end; - / - ``` - -9. Use the copy function to allow your users to copy code snippets from LiveLabs into the clipboard. - - ``` - Enclose the text you want to copy using the element. - ``` - -10. Code snippets that include variables - - ``` - ssh -i - ``` - -11. Syntax highlighting examples - - ``` - select * from employees; - ``` - Sample with line breaks: - - ``` - class Simple{ - - public static void main(String args[]){ - - System.out.println("Hello Java"); - - } - - } - ``` - - ``` - { - "employee": { - "name": "sonoo", - "salary": 56000, - "married": true - } - } - ``` - - ``` - # This program prints Hello, world! - - print('Hello, world!') - ``` - -12. You may want to turn highlighting off, to do so, use `nohighlight`: - - ```nohighlight - class Simple{ - public static void main(String args[]){ - System.out.println("Hello Java"); - } - } - ``` - -## Task 2: Optional Advanced Features - - - -1. Files that you want the reader to download: - - When the file type is not recognized by the browser, you can use the following format. - - > **Note:** _The filename must be in lowercase letters and CANNOT include any spaces._ - - Download the [starter SQL code](files/starter-file.sql). - - When the file type is recognized by the browser, it will attempt to render it. So you can use the following format to force the download dialog box. - - > **Note:** _The filename must be in lowercase letters and CANNOT include any spaces._ - - Download the [sample JSON code](files/sample.json?download=1). - - *IMPORTANT: do not include zip files, CSV, PDF, PSD, JAR, WAR, EAR, bin or exe files - you must have those objects stored somewhere else. We highly recommend using Oracle Cloud Object Store and creating a PAR URL instead. See [Using Pre-Authenticated Requests](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm)* - -3. Conditional content example (type="livelabs") - - Select your compartment. If you are using a LiveLabs environment, be sure to select the compartment provided by the environment. Leave Always Free unchecked,Choose any compartment, select "Always Free", and enter `SecretPassw0rd` for the ADMIN password, then click **Create Autonomous Database**. - - ![](images/atp-settings-1.png) - ![](images/atp-settings-2-notaf.png) - ![](images/atp-settings-2.png) - ![](images/atp-settings-3.png) - -## Learn More - -*(optional - include links to docs, white papers, blogs, etc)* - -* [URL text 1](http://docs.oracle.com) -* [URL text 2](http://docs.oracle.com) - -## Acknowledgements -* **Author** - -* **Contributors** - (optional) -* **Last Updated By/Date** - diff --git a/sqlcl-mcp-server-intro/sample-lab-template.md b/sqlcl-mcp-server-intro/sample-lab-template.md deleted file mode 100644 index 692411086..000000000 --- a/sqlcl-mcp-server-intro/sample-lab-template.md +++ /dev/null @@ -1,105 +0,0 @@ -# Title of the Lab - -## Introduction - -*Describe the lab in one or two sentences, for example:* This lab walks you through the steps to ... - -Estimated Time: n minutes - -### About Product/Technology (Optional) -Enter background information here about the technology/feature or product used in this lab - no need to repeat what you covered in the introduction. - -### Objectives - -*List objectives for this lab* - -In this lab, you will: -* Objective 1 -* Objective 2 -* Objective 3 - -### Prerequisites (Optional) - -*List the prerequisites for this lab using the format below. Fill in whatever knowledge, accounts, etc. is needed to complete the lab. **Do NOT list** each previous lab as a prerequisite.* - -This lab assumes you have: -* An Oracle account -* All previous labs successfully completed - -*This is the "fold" - below items are collapsed by default* - -## Task 1: - -(optional) Step 1 opening paragraph. - -1. Sub step 1 - - ![Image alt text](images/sample1.png) - - To create a link to local file you want the reader to download, use the following format. - - > **Note:** _The filename must be in lowercase letters and CANNOT include any spaces._ - - Download the [starter file](files/starter-file.sql) SQL code. - - When the file type is recognized by the browser, it will attempt to render it. So you can use the following format to force the download dialog box. - - > **Note:** _The filename must be in lowercase letters and CANNOT include any spaces._ - - Download the [sample JSON code](files/sample.json?download=1). - - *IMPORTANT: do not include zip files, CSV, PDF, PSD, JAR, WAR, EAR, bin or exe files - you must have those objects stored somewhere else. We highly recommend using Oracle Cloud Object Store and creating a PAR URL instead. See [Using Pre-Authenticated Requests](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm)* - -2. Sub step 2 - - ![Image alt text](images/sample1.png) - -4. Example with inline navigation icon ![Image alt text](images/sample2.png) click **Navigation**. - -5. Example with bold **text**. - - If you add another paragraph, add 3 spaces before the line. - -## Task 2: - -1. Sub step 1 - tables sample - - Use tables sparingly: - - | Column 1 | Column 2 | Column 3 | - | --- | --- | --- | - | 1 | Some text or a link | More text | - | 2 |Some text or a link | More text | - | 3 | Some text or a link | More text | - -2. You can also include bulleted lists - make sure to indent 4 spaces: - - - List item 1 - - List item 2 - -3. Code examples - - ``` - Adding code examples - Indentation is important for the code example to appear inside the step - Multiple lines of code - Enclose the text you want to copy in . - ``` - -4. Code examples that include variables - - ``` - ssh -i - ``` - -## Learn More - -*(optional - include links to docs, white papers, blogs, etc)* - -* [URL text 1](http://docs.oracle.com) -* [URL text 2](http://docs.oracle.com) - -## Acknowledgements -* **Author** - -* **Contributors** - -- optional -* **Last Updated By/Date** - diff --git a/sqlcl-mcp-server-intro/sample.json b/sqlcl-mcp-server-intro/sample.json deleted file mode 100644 index 48109ed27..000000000 --- a/sqlcl-mcp-server-intro/sample.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "quiz": { - "sport": { - "q1": { - "question": "Which one is correct team name in NBA?", - "options": [ - "New York Bulls", - "Los Angeles Kings", - "Golden State Warriros", - "Huston Rocket" - ], - "answer": "Huston Rocket" - } - }, - "maths": { - "q1": { - "question": "5 + 7 = ?", - "options": [ - "10", - "11", - "12", - "13" - ], - "answer": "12" - }, - "q2": { - "question": "12 - 8 = ?", - "options": [ - "1", - "2", - "3", - "4" - ], - "answer": "4" - } - } - } -} diff --git a/sqlcl-mcp-server-intro/sample1.txt b/sqlcl-mcp-server-intro/sample1.txt deleted file mode 100644 index 2299eef4e..000000000 --- a/sqlcl-mcp-server-intro/sample1.txt +++ /dev/null @@ -1 +0,0 @@ -This is a sample image description file. \ No newline at end of file diff --git a/sqlcl-mcp-server-intro/workshops/freesql/manifest.json b/sqlcl-mcp-server-intro/workshops/freesql/manifest.json index d685c2348..fbbbd95c1 100644 --- a/sqlcl-mcp-server-intro/workshops/freesql/manifest.json +++ b/sqlcl-mcp-server-intro/workshops/freesql/manifest.json @@ -14,7 +14,10 @@ "title": "Lab 1: Environment set-up", "description": "Installing and configuring necessary dependencies and pre-requisites.", "filename":"../../2-environment-set-up.md", - "type": "freesql" + "type": "freesql", + "include": { + "freesql-create-freesql-account-with-vscode.md":"/common/building-blocks/tasks/freesql/create-freesql-account-continue-to-vscode.md" + } }, { "title": "Lab 2: Explore SQLcl MCP server",