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

docs: (logs-deletion.md) URL Encode curl command #4294

Merged
merged 1 commit into from
Sep 10, 2021
Merged

docs: (logs-deletion.md) URL Encode curl command #4294

merged 1 commit into from
Sep 10, 2021

Conversation

mr-karan
Copy link
Contributor

@mr-karan mr-karan commented Sep 9, 2021

What this PR does / why we need it:

What: Update the cURL command example to URL encode
the match query param

Why: The current cURL command throws this error:

$ curl -X POST \                                                                                                                                        
  'http://localhost:3100/loki/api/admin/delete?match[]={foo="bar"}&start=1591616227&end=1591619692' \                                                    
  -H 'x-scope-orgid: fake'
1:4: parse error: unexpected "="

Checklist

  • Documentation added
  • Tests updated

@CLAassistant
Copy link

CLAassistant commented Sep 9, 2021

CLA assistant check
All committers have signed the CLA.

Update the `cURL` command example to URL encode
the `match` query param
@mr-karan
Copy link
Contributor Author

@KMiller-Grafana Thanks for the review, made the suggested changes.

Copy link
Contributor

@KMiller-Grafana KMiller-Grafana left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM. I approve.

@slim-bean slim-bean merged commit 64e2a36 into grafana:main Sep 10, 2021
@Alan01252
Copy link
Contributor

An alternative to this is to use -g

curl -g -X POST \ 'http://127.0.0.1:3100/loki/api/admin/delete?match[]={foo="bar"}&start=1591616227&end=1591619692' \ -H 'x-scope-orgid: 1'

@mr-karan
Copy link
Contributor Author

Ah TIL. https://explainshell.com/explain?cmd=curl+-g

Yeah, this is a better option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants