Comments (4)
By analyzing the output on CI, it looks like the endpoint is responding with 200 OK
, but yields an empty response body. Maybe it should respond with 204 No Content
instead? See #44.
from grafana-client.
I've been able to reproduce the regression, and confirm the observation referenced above.
it looks like the endpoint is responding with 200 OK, but yields an empty response body.
This makes JSON parsers croak.
Grafana 9.2.7
docker run --rm -it --publish=3000:3000 --env='GF_SECURITY_ADMIN_PASSWORD=admin' grafana/grafana:9.2.7
HTTP folder create/delete conversation on Grafana 9.2
sink:grafana-wtf amo$ http --auth=admin:admin POST localhost:3000/api/folders title=foobar
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 278
Content-Type: application/json
Date: Wed, 30 Nov 2022 11:33:30 GMT
Expires: -1
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block
{
"canAdmin": true,
"canDelete": true,
"canEdit": true,
"canSave": true,
"created": "2022-11-30T11:33:30Z",
"createdBy": "admin",
"hasAcl": false,
"id": 1,
"title": "foobar",
"uid": "pyENC4KVz",
"updated": "2022-11-30T11:33:30Z",
"updatedBy": "admin",
"url": "/dashboards/f/pyENC4KVz/foobar",
"version": 1
}
sink:grafana-wtf amo$ http --auth=admin:admin DELETE localhost:3000/api/folders/pyENC4KVz
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 59
Content-Type: application/json
Date: Wed, 30 Nov 2022 11:33:57 GMT
Expires: -1
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block
{
"id": 1,
"message": "Folder foobar deleted",
"title": "foobar"
}
Grafana 9.3.0
docker run --rm -it --publish=3000:3000 --env='GF_SECURITY_ADMIN_PASSWORD=admin' grafana/grafana:9.3.0
HTTP folder create/delete conversation on Grafana 9.3.0
sink:grafana-wtf amo$ http --auth=admin:admin POST localhost:3000/api/folders title=foobar
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 313
Content-Type: application/json
Date: Wed, 30 Nov 2022 11:34:16 GMT
Expires: -1
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block
{
"canAdmin": true,
"canDelete": true,
"canEdit": true,
"canSave": true,
"created": "2022-11-30T11:34:16.024847779Z",
"createdBy": "admin",
"hasAcl": false,
"id": 1,
"parentUid": "",
"title": "foobar",
"uid": "8EmOC4K4z",
"updated": "2022-11-30T11:34:16.024847824Z",
"updatedBy": "admin",
"url": "/dashboards/f/8EmOC4K4z/foobar",
"version": 1
}
sink:grafana-wtf amo$ http --auth=admin:admin DELETE localhost:3000/api/folders/8EmOC4K4z
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 0
Content-Type: application/json
Date: Wed, 30 Nov 2022 11:34:24 GMT
Expires: -1
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block
from grafana-client.
I've reported the observations at grafana/grafana#59546.
from grafana-client.
On a recent version of Grafana, there is a non-empty response again now.
$ http --auth=admin:admin DELETE localhost:3000/api/folders/8EmOC4K4z
HTTP/1.1 404 Not Found
Cache-Control: no-store
Content-Length: 51
Content-Type: application/json
Date: Fri, 29 Mar 2024 10:40:34 GMT
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block
{
"message": "folder not found",
"status": "not-found"
}
from grafana-client.
Related Issues (20)
- Improve test suite by adding integration tests with Grafana HOT 1
- Add x-disable-provenance header to allow alert rules to be edited from the UI HOT 7
- Field `database` in data source model will be deprecated HOT 1
- grafana_client.client.GrafanaClientError: Client Error 404: Not found HOT 8
- Setting timeout explicitly HOT 7
- Grafana Smart Query Prometheus missing key HOT 6
- Need support for following missing api HOT 4
- Dashboard.get_dashboard_by_name seems broken HOT 5
- Plugins: Add more filtering capabilities to `list()` method HOT 1
- Cannot update datasource key with newlines, e.g. GCP Monitoring HOT 1
- distutils.version.LooseVersion is deprecated HOT 3
- Feature: Organisation-awareness HOT 7
- feature request: async api HOT 7
- Service Account functionality HOT 7
- New version of Grafana API create-annotation adds dashboardUID field HOT 2
- Grafana 10.2.3: breaking changes HOT 5
- Missing parentUid for create_folder HOT 6
- User Teams API endpoint missing HOT 3
- Get all folders endpoint is incorrect HOT 1
- Dashboard Search API endpoint is incorrect HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-client.