Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API delete curl examples #6680

Merged

Conversation

KMiller-Grafana
Copy link
Contributor

This PR updates API delete examples (documentation) in the same way that PR #6530 updated the API query example. Deletes only work on a single tenant, so the examples distinguish GEL API header from Loki headers.

Reviews:

  • Are the cURL commands complete and correct?

@KMiller-Grafana KMiller-Grafana added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Jul 14, 2022
@KMiller-Grafana KMiller-Grafana self-assigned this Jul 14, 2022
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
-               loki	-0.6%

@KMiller-Grafana KMiller-Grafana added the backport release-2.6.x Tag a PR with this label to create a PR which cherry pics it into the release-2.6.x branch label Jul 14, 2022
Copy link
Contributor

@09jvilla 09jvilla left a comment

Choose a reason for hiding this comment

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

Reviewed!

docs/sources/api/_index.md Outdated Show resolved Hide resolved
docs/sources/api/_index.md Outdated Show resolved Hide resolved
docs/sources/api/_index.md Outdated Show resolved Hide resolved
docs/sources/api/_index.md Outdated Show resolved Hide resolved
KMiller-Grafana and others added 4 commits July 14, 2022 12:43
Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

@KMiller-Grafana KMiller-Grafana enabled auto-merge (squash) July 14, 2022 19:59
Copy link
Contributor

@09jvilla 09jvilla left a comment

Choose a reason for hiding this comment

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

LGTM!

@KMiller-Grafana KMiller-Grafana merged commit 1f676ad into grafana:main Jul 14, 2022
grafanabot pushed a commit that referenced this pull request Jul 14, 2022
* Add API delete curl examples

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
(cherry picked from commit 1f676ad)
KMiller-Grafana added a commit that referenced this pull request Jul 14, 2022
* Add API delete curl examples

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
(cherry picked from commit 1f676ad)

Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
```bash
curl -u "Tenant1:$API_TOKEN" \
-g -X POST \
'http://127.0.0.1:3100/loki/api/v1/delete?query={foo="bar"}&start=1591616227&end=1591619692'
Copy link
Contributor

@MichelHollands MichelHollands Jul 15, 2022

Choose a reason for hiding this comment

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

We've found out that running these kinds of post requests in bash causes problems with escaping the &, = and characters. The --data-urlencode parameter for curl is preferred. https://github.com/grafana/deployment_tools/blob/master/docs/loki/support-escalation.md#manual-operational-tasks has an example. Perhaps we should use that format.

lxwzy pushed a commit to lxwzy/loki that referenced this pull request Nov 7, 2022
* Add API delete curl examples

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update docs/sources/api/_index.md

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-2.6.x Tag a PR with this label to create a PR which cherry pics it into the release-2.6.x branch size/M type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants