cloudflare-docs icon indicating copy to clipboard operation
cloudflare-docs copied to clipboard

[Logs] Update curl commands under Logs

Open soheiokamoto opened this issue 1 year ago • 3 comments

Summary

This updates curl commands under Logs per guidelines: https://developers.cloudflare.com/style-guide/api-content-strategy/guidelines-for-curl-commands/

Changes:

  • Use long parameter names for --header, --request, and --data.

  • Use double quotes for parameters.

  • Remove double quotes for URL, except when there is ? (use double quotes).

  • Indent two spaces for request and response bodies.

  • Remove jq piping.

  • Reorder parameters for multi-line commands (and remove indentation except for --data) to be consistent.

  • Use correct placeholders, i.e., {name} in URLs, and <NAME> in request / response bodies.

  • Remove --request GET and --silent.

  • Remove --request POST when there's a body (with --data or --data-raw).

  • Use bash syntax for commands, and json syntax for JSON responses.

Documentation checklist

soheiokamoto avatar Aug 21 '24 02:08 soheiokamoto

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 17b4c4d
Status: ✅  Deploy successful!
Preview URL: https://f486bd8a.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev

View logs

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/logs/tutorials/examples/example-logpush-curl/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/tutorials/examples/example-logpush-curl/
https://developers.cloudflare.com/logs/get-started/enable-destinations/new-relic/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/get-started/enable-destinations/new-relic/
https://developers.cloudflare.com/logs/reference/log-output-options/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/reference/log-output-options/
https://developers.cloudflare.com/logs/instant-logs/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/instant-logs/
https://developers.cloudflare.com/logs/reference/custom-fields/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/reference/custom-fields/
https://developers.cloudflare.com/logs/logpull/requesting-logs/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/logpull/requesting-logs/
https://developers.cloudflare.com/logs/get-started/enable-destinations/s3-compatible-endpoints/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/get-started/enable-destinations/s3-compatible-endpoints/
https://developers.cloudflare.com/logs/r2-log-retrieval/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/r2-log-retrieval/
https://developers.cloudflare.com/logs/get-started/enable-destinations/splunk/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/get-started/enable-destinations/splunk/
https://developers.cloudflare.com/logs/get-started/enable-destinations/datadog/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/get-started/enable-destinations/datadog/
https://developers.cloudflare.com/logs/tutorials/parsing-json-log-data/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/tutorials/parsing-json-log-data/
https://developers.cloudflare.com/logs/get-started/api-configuration/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/get-started/api-configuration/
https://developers.cloudflare.com/logs/logpull/additional-details/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/logpull/additional-details/
https://developers.cloudflare.com/logs/get-started/enable-destinations/r2/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/get-started/enable-destinations/r2/
https://developers.cloudflare.com/logs/reference/filters/ https://sohei-update-curl-commands-u.cloudflare-docs-7ou.pages.dev/logs/reference/filters/

github-actions[bot] avatar Aug 21 '24 02:08 github-actions[bot]

I will wait for https://github.com/cloudflare/cloudflare-docs/pull/15964 to be merged, then resolve conflict.

soheiokamoto avatar Aug 21 '24 16:08 soheiokamoto

@soheiokamoto just to let you know that https://github.com/cloudflare/cloudflare-docs/pull/16790 that replaced https://github.com/cloudflare/cloudflare-docs/pull/15964 (it had too many conflicts) was merged.

angelampcosta avatar Sep 12 '24 14:09 angelampcosta

All feedback addressed. Rebased, and went over the curl commands again.

soheiokamoto avatar Sep 13 '24 17:09 soheiokamoto