Create a new endpoint that converts .yml panels to JSON
What does this MR do?
Partial implementation of #228758 (closed)
It adds endpoint that accepts POST requests with metrics dashboard panel YAML as body, and returned processed JSON representation of it. For now it uses fixed response, YAML processing will be added in the follow up MR. Changelog and documentation will be handled at #231413 (closed)
Despite the fact that this endpoint returns JSON response, I've decided to not add it as public API endpoint, because it is in early implementation stage, and it may be modified in the near feature, and with public API changes we should tread more carefully.
curl 'https://24045.qa-tunnel.gitlab.info/root/autodevops-docker-app/-/metrics/dashboards/builder.json' \
-H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: pl,en-US;q=0.7,en;q=0.3' \
--compressed -H 'X-CSRF-Token: x6yC5ZpkH8qwJ3ATyenXBXaljuJJB8Z3HzBTLFNqmkedFNJTLnkJgfnXaznz/7zBtsMi7IKV5uf70Bgs7s42Dg==' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Content-Type: application/json;charset=utf-8' \
-H 'Origin: https://24045.qa-tunnel.gitlab.info' \
-H 'Connection: keep-alive' \
-H 'Cookie: experimentation_subject_id=ImUxYTgyYzdkLWE2ZjQtNDRiOS05ZTUyLWJjODQ0NzU4ZWQ1NyI%3D--5bcb7912f6455e4002ff7e7eb13fc2d7f54fc6bf; sidebar_collapsed=false; explore_groups_landing_dismissed=true; known_sign_in=QmpvT0FEbGp5SWtrSGUwYkdJamhnYlcvdVRCNmc4OXJqTm1pQ2lBelVqL1A4L2VsSE9XU0FqK2RjaWxGaDJwdFYvR2YvZXNML3ZiWG1kYVZnMTE2MzdKTTJzUXdJNklROURudEhxNi9pL21Cc0RxU2lwWURFV3dtcTNZRmJCUnAtLVlmWHJpanhVaU90T2RBZk1oMzFia1E9PQ%3D%3D--54697fac024a420333ad645754d3ca02ea5f5711; perf_bar_enabled=true; event_filter=all; collapsed_gutter=true; _gitlab_session_6bfaab2a7d74d6020e604879205f34fe0f39f579dbf9697551936569d1981a14=8ee9be0efdfd815b8a7f3a7fd20cd3c1' \
-H 'TE: Trailers' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
--data-raw '{}'
Conformity
Edited by Michael Kozono