-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Updates for API usage #51989
[DOCS] Updates for API usage #51989
Conversation
Pinging @elastic/kibana-docs (Team:Docs) |
Pinging @elastic/kibana-security (Team:Security) |
This limitation/bug was fixed in #43470, and was released with
Example whitelist setting:Note: We don't recommend disabling protections for arbitrary API endpoints. We want to encourage users to supply the server.xsrf.whitelist: ["/api/security/v1/oidc", "/api/spaces/space"]
Would something like this be helpful? curl -X POST \
http://localhost:5601/api/spaces/space \
-H 'Content-Type: application/json' \
-H 'kbn-xsrf: true' \
-d '{
"id": "sales",
"name": "Sales",
"description": "This is your Sales Space!",
"disabledFeatures": []
}
' |
Co-Authored-By: Larry Gregory <lgregorydev@gmail.com>
…into docs/api-usage
* [DOCS] Updates for API usage * Changes from Larry * Update docs/api/using-api.asciidoc Co-Authored-By: Larry Gregory <lgregorydev@gmail.com> * Comments from Larry * Comment from Larry
* [DOCS] Updates for API usage * Changes from Larry * Update docs/api/using-api.asciidoc Co-Authored-By: Larry Gregory <lgregorydev@gmail.com> * Comments from Larry * Comment from Larry
Summary
Replaces #38107. @dcode, I was unable to push to your branch, so I created a new PR.
Closes part of #19553.
Here is the original summary:
While trying to use the Kibana API for programmatically creating Spaces, I ran across an issue when using the examples and specifying the color that I pulled from the Kibana UI to manage spaces. Namely, the UI presents hex color codes in all caps, while the API only accepts lower case hex. Secondly, there's no documentation (that I could find) that specified that both the
kbn-xsrf
andContent-Type
headers are required.[skip ci]
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)- [ ] Unit or functional tests were updated or added to match the most common scenarios- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers