Skip to content

Commit

Permalink
change API_KEY examples to avoid ansible issues
Browse files Browse the repository at this point in the history
  • Loading branch information
willr3 authored and lampajr committed Dec 11, 2024
1 parent 41c1fa5 commit 92517e1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ API operations that support Filter Query provide an HTTP request parameter named
To use the Filter Query with an operation that returns a [Run](/docs/concepts/core-concepts/#run) data can be done as follows.

```bash
curl -s 'http://localhost:8080/api/sql/1/queryrun?query=$.*&array=true' -H 'content-type: application/json' -H 'X-Horreum-API-Key: '$API_KEY
curl -s 'http://localhost:8080/api/sql/1/queryrun?query=$.*&array=true' -H 'content-type: application/json' -H "X-Horreum-API-Key: $API_KEY"
{
"valid": true,
"jsonpath": "$.*",
Expand All @@ -29,7 +29,7 @@ The response contains an enclosing JSON object that is common for Filter Query o
To filter the above API operation to retrieve only the *results* property of the uploaded [Run](/docs/concepts/core-concepts/#run) object the *query* parameter is defined as `$.results`

```bash
curl -s 'http://localhost:8080/api/sql/1/queryrun?query=$.results&array=true' -H 'content-type: application/json' -H 'X-Horreum-API-Key: '$API_KEY
curl -s 'http://localhost:8080/api/sql/1/queryrun?query=$.results&array=true' -H 'content-type: application/json' -H "X-Horreum-API-Key: $API_KEY"
{
"valid": true,
"jsonpath": "$.results",
Expand Down
8 changes: 4 additions & 4 deletions docs/site/content/en/docs/Tasks/import-export/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Click on Schema/Test and there is a button where you can select either _Import S
```bash
curl 'http://localhost:8080/api/schema/import/' \
-s -X POST -H 'content-type: application/json' \
-H 'X-Horreum-API-Key: '$API_KEY \
-H "X-Horreum-API-Key: $API_KEY" \
-d @/path/to/schema.json
```

Expand All @@ -55,7 +55,7 @@ If you are unfamiliar with generating an API Key, please see [Upload Run](/docs/
```bash
curl 'http://localhost:8080/api/test/import/' \
-s -X POST -H 'content-type: application/json' \
-H 'X-Horreum-API-Key: '$API_KEY \
-H "X-Horreum-API-Key: $API_KEY" \
-d @/path/to/test.json
```

Expand All @@ -64,7 +64,7 @@ curl 'http://localhost:8080/api/test/import/' \
```bash
SCHEMAID='123'
curl 'http://localhost:8080/api/schema/export/?id='$SCHEMAID \
-H 'X-Horreum-API-Key: '$API_KEY \
-H "X-Horreum-API-Key: $API_KEY" \
-O --output-dir /path/to/folder
```

Expand All @@ -74,6 +74,6 @@ curl 'http://localhost:8080/api/schema/export/?id='$SCHEMAID \
TESTID='123'
curl 'http://localhost:8080/api/test/export/?id=$TESTID' \
-s -X POST -H 'content-type: application/json' \
-H 'X-Horreum-API-Key: '$API_KEY \
-H "X-Horreum-API-Key: $API_KEY" \
-O --output-dir /path/to/folder
```
2 changes: 1 addition & 1 deletion docs/site/content/en/docs/Tasks/manage-reports/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ The same task can be repeated using the web API to delete a `Report`. Copy and p

```bash
REPORT_ID=<your_report_id_here>
curl 'http://localhost:8080/api/report/table/'$REPORT_ID -H 'content-type: application/json' -H 'X-Horreum-API-Key: '$API_KEY --request DELETE -v
curl 'http://localhost:8080/api/report/table/'$REPORT_ID -H 'content-type: application/json' -H "X-Horreum-API-Key: $API_KEY" --request DELETE -v
```
2 changes: 1 addition & 1 deletion docs/site/content/en/docs/Tasks/upload-run/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ OWNER='dev-team'
ACCESS='PUBLIC'
curl 'http://localhost:8080/api/run/data?test='$TEST'&start='$START'&stop='$STOP'&owner='$OWNER'&access='$ACCESS \
-s -X POST -H 'content-type: application/json' \
-H 'X-Horreum-API-Key: '$API_KEY \
-H "X-Horreum-API-Key: $API_KEY" \
-d @/path/to/data.json
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ STOP='2021-08-01T10:40:28.00Z'
OWNER='dev-team'
ACCESS='PUBLIC'
curl 'http://localhost:8080/api/run/data?test='$TEST'&start='$START'&stop='$STOP'&owner='$OWNER'&access='$ACCESS \
-s -H 'content-type: application/json' -H 'X-Horreum-API-Key: '$API_KEY \
-s -H 'content-type: application/json' -H "X-Horreum-API-Key: $API_KEY" \
-d @/tmp/run.json
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The query can be executed by making a call to the Horreum API;

```bash
$ curl 'http://localhost:8080/api/run/data?test='$TEST'&start='$START'&stop='$STOP'&owner='$OWNER'&access='$ACCESS \
-s -H 'content-type: application/json' -H 'X-Horreum-API-Key: '$API_KEY \
-s -H 'content-type: application/json' -H "X-Horreum-API-Key: $API_KEY" \
-d @/tmp/collector_query.json
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The document query can then be sumitted to the Horreum API;

```bash
$ curl 'http://localhost:8080/api/run/data?test='$TEST'&start='$START'&stop='$STOP'&owner='$OWNER'&access='$ACCESS \
-s -H 'content-type: application/json' -H 'X-Horreum-API-Key: '$API_KEY \
-s -H 'content-type: application/json' -H "X-Horreum-API-Key: $API_KEY" \
-d @/tmp/elastic_payload.json
```

Expand Down Expand Up @@ -101,7 +101,7 @@ The query can be executed by making a call to the Horreum API;

```bash
$ curl 'http://localhost:8080/api/run/data?test='$TEST'&start='$START'&stop='$STOP'&owner='$OWNER'&access='$ACCESS \
-s -H 'content-type: application/json' -H 'X-Horreum-API-Key: '$API_KEY \
-s -H 'content-type: application/json' -H "X-Horreum-API-Key: $API_KEY" \
-d @/tmp/elastic_query.json
```

Expand Down

0 comments on commit 92517e1

Please sign in to comment.