mirror of https://github.com/grafana/grafana
Library Elements API GET by name returns array (#44743)
* Library Elements API GET by name returns array Making a GET request to the Library Elements HTTP API `api/library-elements/name/:name` will return an **array** of Library Element objects, but the documentation says it will return a Library Element object. Example cURL POST request: `curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer XXXXXXXXXXX" -d @request.json "https://my.grafana.net/api/library-elements/"` request.json ```json { "model": {}, "kind": 1, "name": "testing description3", "uid": "basic3", "id": 12345, "version": 2 } ``` Example cURL GET request: `curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer XXXXXXXX" -d @request "https://my/api/library-elements/name/testing description3"` Example response: ```json { "result": [ { . . . } ] } ``` * Library Elements API fix bracket spacingpull/44767/head
parent
ac90c8d68d
commit
925333bfa4
Loading…
Reference in new issue