Skip to content

Conversation

therve
Copy link
Contributor

@therve therve commented Jul 5, 2022

What does this PR do?

Add accept headers in curl examples.

Motivation

Recent breakage in some APIs.

Preview

Check curl examples in various sections
https://docs-staging.datadoghq.com/therve/curl-accept/api/latest/dashboards/#update-a-dashboard
https://docs-staging.datadoghq.com/therve/curl-accept/api/latest/dashboards/#delete-dashboards

Additional Notes


Reviewer checklist

  • Review the changed files.
  • Review the URLs listed in the Preview section.
  • Check images for PII
  • Review any mentions of "Contact Datadog support" for internal support documentation.

This makes it more clear for custom clients.
@therve therve added the Do Not Merge Just do not merge this PR :) label Jul 5, 2022
@therve therve requested review from a team as code owners July 5, 2022 15:53
@github-actions github-actions bot added the Architecture Everything related to the Doc backend label Jul 5, 2022
@davidejones
Copy link
Member

Just noticed with these changes that the \ is on a new line now instead of at the end of the first line e.g

# Curl command
curl -X GET "https://api.datadoghq.com/api/v1/dashboard"
 \
-H "Accept: "application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

@therve
Copy link
Contributor Author

therve commented Jul 6, 2022

Just noticed with these changes that the \ is on a new line now instead of at the end of the first line e.g

# Curl command
curl -X GET "https://api.datadoghq.com/api/v1/dashboard"
 \
-H "Accept: "application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

Yeah I don't know why... But I also want to make sure we only set it when the response can't be 204, need to spend more time investigating.

@therve therve removed the Do Not Merge Just do not merge this PR :) label Jul 11, 2022
Copy link
Collaborator

@kayayarai kayayarai left a comment

Choose a reason for hiding this comment

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

There's either a superfluous " or a missing "

Co-authored-by: Kari Halsted <12926135+kayayarai@users.noreply.github.com>
@therve therve requested a review from kayayarai July 19, 2022 08:40
@buraizu buraizu merged commit 071e62c into master Jul 20, 2022
@buraizu buraizu deleted the therve/curl-accept branch July 20, 2022 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Everything related to the Doc backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants