Skip to content

Commit 865a402

Browse files
authored
WIP: Update rest documentation (#680)
* Update rest.md * update rest doc
1 parent 2e6520a commit 865a402

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

site/rest.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ The X-Requested-By header is not needed for requests that only read, for example
2222

2323
If using `curl`, you can use the `-k` option to bypass the check to verify that the operator's certificate is trusted (instead of `curl --cacert`).
2424

25-
Here is a small BASH script that may help to prepare the necessary token, certificates, and such, to call the operator's REST services:
25+
Here is a small sample BASH script that may help to prepare the necessary token, certificates, and such, to call the operator's REST services:
26+
27+
Before using this script it would be necessary to update it to ensure it has the correct
28+
service account, namespaces, etc., and it points to your `values.yaml` that you used to install
29+
the operator (so that it can get the certificates).
2630

2731
```
2832
#!/bin/bash
@@ -42,14 +46,14 @@ cat ${OPERATOR_CERT_FILE}
4246
echo "Ready to call operator REST APIs"
4347
4448
STATUS_CODE=`curl \
45-
-v -k \
46-
--cacert ${OPERATOR_CERT_FILE} \
47-
-H "Authorization: Bearer ${TOKEN}" \
48-
-H Accept:application/json \
49-
-X GET ${REST_ADDR}/${URL_TAIL} \
50-
-o curl.out \
51-
--stderr curl.err \
52-
-w "%{http_code}"`
49+
-v -k \
50+
--cacert ${OPERATOR_CERT_FILE} \
51+
-H "Authorization: Bearer ${TOKEN}" \
52+
-H Accept:application/json \
53+
-X GET ${REST_ADDR}/${URL_TAIL} \
54+
-o curl.out \
55+
--stderr curl.err \
56+
-w "%{http_code}"`
5357
5458
cat curl.err
5559
cat curl.out | jq .

0 commit comments

Comments
 (0)