You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: json-mongo-duality-general/mongodb-api/mongodb-api.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,7 +243,36 @@ In this section, you will:
243
243
244
244
### Interact with native JSON Collections in the Oracle Database using Mongo API
245
245
246
-
1. First, you must set the URI to the Mongo API running in ORDS on your machine. You can find the URI in the Autonomous Database console in the *Tool Configuration* tab.
246
+
247
+
1. First, you must set the URI to the Mongo API running in ORDS on your machine.
248
+
249
+
**Your Autonomous Database should be configured with an enabled MongoDB API, ready for you to go. If you don't see the MongoDB API enabled in your environment, then let's enable it quickly.**
250
+
251
+
You need to do two things:
252
+
253
+
1. Enable Access Control Lists (ACLs)
254
+
255
+
Due to security precautions, the MongoDB API is not enabled to the public out of the box, but requires some conscious control access. To enable ACLs, go to the details page of your autonomous database and select to edit the access control lists.
256
+
257
+

258
+
259
+
Choose an ACL that enables the machine where you have installed the MongoDB tools to access the database. For demonstration purposes, the most pragmatic way to do this is to set the CIDR block to 0.0.0.0/0 which allows full access from the Internet. **This is for demonstration purposes only and never meant for production environment or systems with sensitive data.**
Save your changes and go back to the detail page of your Autonomous Database.
264
+
265
+
2. Ensure that the MongoDB API is enabled.
266
+
267
+
You can find the URI in the Autonomous Database console in the *Tool Configuration* tab if the MongoDB API is enabled. If the API is disabled, then enable the MongoDB API.
268
+
269
+

Let's create an environment variable called *URI* which contains the MongoDB URI including the user and password information.
259
289
260
290
On Mac or Linux, issue the following command in your shell to set the environment variable. If you close the shell, you need to set this variable again.
0 commit comments