NoSQL Cloud Service REST APIs Programmatically using Shell (curl) #193
dario-vega
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are multiple possibilities for testing the NoSQL Cloud service.
Let me provide examples using GET, DELETE, POST, and PUT. All are using the following env variables with the information for the
authentication. There are additional headers you need to add when using curl with the POST and PUT methods. The best is to use a file and use the curl option --data-binary "@filename"
Using GET commands
Using DELETE, it is the same script as above for GET. Here is an example of deleting a table called the blog table. You can also use the table's ocid.
Using POST, I created a JSON file with the query to execute. And I add the additional headers
Using PUT, I created a JSON file with the row to UPSERT a value in a table called users. It uses the same script above for POST. You can also use the ocid of the table (in this case, you don’t need the compid in the file).
I hope it helps. Let me know
Beta Was this translation helpful? Give feedback.
All reactions