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
Fix documentation about queries with multiple parameters (#196)
- Fix the documentation about queries with multiple variables. The url with
multiple variables needs quotation marks around the entire query in order
to work.
- Rearranged the "specified back-end" documentation since it is targeted
for all endpoints.
Copy file name to clipboardExpand all lines: wiki/markdown/curl-examples.md
+22-20Lines changed: 22 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ The front-end may also be used by other tools such as CURL or any kind of progra
8
8
Below are some examples of using CURL towards different endpoints, together with example responses.
9
9
Most endpoints are also documented in the [Eiffel Intelligence backend repository](https://github.com/eiffel-community/eiffel-intelligence/tree/master/wiki/markdown)
10
10
11
+
**Note**: If you have multiple url parameters, you need to add quotation mark around the entire query. For example:
12
+
13
+
curl -X GET "http://localhost:8080/endpoint?varible1=1&varible2=2"
14
+
11
15
#### Quick access to endpoints:
12
16
*[/auth](#auth)
13
17
*[/backend](#backend)
@@ -17,6 +21,24 @@ Most endpoints are also documented in the [Eiffel Intelligence backend repositor
17
21
*[/rules](#rules)
18
22
*[/subscriptions](#subscriptions)
19
23
24
+
#### Specified back-end
25
+
As a user of the front-end you may want to specify your own back-end URL if you do not want to use the default back-end.
26
+
This is possible to do by injecting the back-end URL as a query parameter.
27
+
The parameters key should be `backendurl` then enter the full HTTP URL you wish to use. This back-end instance does not have to be specified in the list of available instances.
28
+
29
+
An example of a way to add such parameter is examplified below, note that the "?" indicates that parameters has been added to the front-end url.
30
+
`localhost:8080` is the front-end url, and we want to access the context path /auth but on URL `http://127.0.0.1:8090/` that is the back-end we wish to use.
31
+
32
+
33
+
curl -X GET http://localhost:8080/auth?backendurl="http://127.0.0.1:8090/"
34
+
35
+
Example with Tomcat:
36
+
37
+
curl -X GET http://localhost:8080/eifrontend/auth?backendurl="http://127.0.0.1:8090/eibackend/"
38
+
39
+
This way of entering the `backendurl` may be the easiest way. It works with GET, POST and PUT requests. Currently entering just a back-end name is not supported.
40
+
41
+
**Note: It is not possible to add the `backendurl` parameter as a JSON parameter.**
20
42
21
43
## <aid="auth" /> /auth
22
44
@@ -165,26 +187,6 @@ In the below command the JSON object is put in a file and sent along with the re
As a user of the front-end you may want to specify your own back-end URL if you do not want to use the default back-end.
170
-
This is possible to do by injecting the back-end URL as a query parameter.
171
-
The parameters key should be `backendurl` then enter the full HTTP URL you wish to use. This back-end instance does not have to be specified in the list of available instances.
172
-
173
-
An example of a way to add such parameter is below, note that the "?" indicates that parameters has been added to the front-end url.
174
-
`localhost:8080` is the front-end url, and we want to access the context path /auth but on URL `http://127.0.0.1:8090/` that is the back-end we wish to use.
175
-
176
-
177
-
curl -X GET http://localhost:8080/auth?backendurl="http://127.0.0.1:8090/"
178
-
179
-
Example with Tomcat:
180
-
181
-
curl -X GET http://localhost:8080/eifrontend/auth?backendurl="http://127.0.0.1:8090/eibackend/"
182
-
183
-
This way of entering the `backendurl` may be the easiest way. It works with GET, POST and PUT requests. Currently entering just a back-end name is not supported.
184
-
185
-
Note: It is not possible to add the `backendurl` parameter as a JSON parameter.
0 commit comments