Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

# tag::request[]
curl -v -X POST -u Administrator:password \
http://localhost:8091/settings/querySettings/curlWhitelist \
-d '{"all_access": false,
"allowed_urls": ["https://company1.com"],
"disallowed_urls": ["https://company2.com"]}'
# end::request[]
15 changes: 1 addition & 14 deletions modules/n1ql/pages/n1ql-language-reference/curl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ You can send a call to the Query Settings REST API to allow or disallow specific

[source,sh]
----
include::n1ql-rest-settings:example$query-settings-post-access.sh[tags=request]
include::example$n1ql-language-reference/query-settings-post-access.sh[tag=request]
----

The access list file command structure is described in the following table.
Expand All @@ -297,19 +297,6 @@ The redirection of URL is not allowed.
This means that files on the local file system cannot be accessed.
* The amount of memory used for the CURL result is controlled using the `result-cap` option.
The default is 20MB.
* Any values passed to the arguments of `CURL()` must be static values.
Copy link
Copy Markdown
Contributor Author

@rakhi-prathap rakhi-prathap May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this point along with the example.

CURL() supports document field references, SQL++ expressions, and dynamic parameters. Locally tested and verified.

That means, they cannot include any references to names, aliases of documents, attributes in the documents, or any {sqlpp} functions or expressions that need to be evaluated.
+
Consider the following example:
+
[source,sqlpp]
----
SELECT CURL(b.url, { "data" : "address="||b.data })
FROM keyspace b;
----
+
The above example is invalid, because the first argument `b.url` refers to the alias `b` and the attribute `url` in the document.
In the second argument, the string concatenation operator (||) cannot be evaluated.

== Examples

Expand Down