From 1821809e69d9339672e9d8a58e702f83a9e384e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20K=C3=B6hler?= Date: Thu, 21 May 2015 12:46:26 +0200 Subject: [PATCH 1/2] listing of all none admin methods --- docs/sources/reference/http_api.md | 204 ++++++++++++++++++++++++++++- 1 file changed, 203 insertions(+), 1 deletion(-) diff --git a/docs/sources/reference/http_api.md b/docs/sources/reference/http_api.md index c0b63050199..3f5fa6392f9 100644 --- a/docs/sources/reference/http_api.md +++ b/docs/sources/reference/http_api.md @@ -141,12 +141,214 @@ Will return the dashboard given the dashboard slug. Slug is the url friendly ver The above will delete the dashboard with the specified slug. The slug is the url friendly (unique) version of the dashboard title. +### Gets the home dashboard + +`GET /api/dashboards/home` + +### Tags for Dashboard + +`GET /api/dashboards/tags` + +### Dashboard from JSON file + +`GET /file/:file` + +### Search Dashboards + +`GET /api/search/` + +Status Codes: + +- **query** – Search Query +- **tags** – Tags to use +- **starred** – Flag indicating if only starred Dashboards should be returned +- **tagcloud** - Flag indicating if a tagcloud should be returned + +**Example Request**: + + GET /api/search?query=MyDashboard&starred=true&tag=prod HTTP/1.1 + Accept: application/json + Content-Type: application/json + Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk + ## Data sources +### Get all datasources + +`GET /api/datasources` + +### Get a single data sources by Id + +`GET /api/datasources/:datasourceId` + ### Create data source -## Organizations +`PUT /api/datasources` + +**Example Response**: + + HTTP/1.1 200 + Content-Type: application/json + + {"message":"Datasource added"} + +### Edit an existing data source + +`POST /api/datasources` + +### Delete an existing data source + +`DELETE /api/datasources/:datasourceId` + +**Example Response**: + + HTTP/1.1 200 + Content-Type: application/json + + {"message":"Data source deleted"} + +### Available data source types + +`GET /api/datasources/plugins` + +## Data source proxy calls + +`GET /api/datasources/proxy/:datasourceId/*` + +Proxies all calls to the actual datasource. + +## Organisation + +### Get current Organisation + +`GET /api/org` + +### Get all users within the actual organisation + +`GET /api/org/users` + +### Add a new user to the actual organisation + +`POST /api/org/users` + +Adds a global user to the actual organisation. + +### Updates the given user + +`PATCH /api/org/users/:userId` + +### Delete user in actual organisation + +`DELETE /api/org/users/:userId` + +### Get all Users + +`GET /api/org/users` + +## Organisations + +### Search all Organisations + +`GET /api/orgs` + +### Update Organisation + +`PUT /api/orgs/:orgId` + +### Get Users in Organisation + +`GET /api/orgs/:orgId/users` + +### Add User in Organisation + +`POST /api/orgs/:orgId/users` + +### Update Users in Organisation + +`PATCH /api/orgs/:orgId/users/:userId` + +### Delete User in Organisation + +`DELETE /api/orgs/:orgId/users/:userId` ## Users +### Search Users +`GET /api/users` + +### Get single user by Id + +`GET /api/users/:id` + +### User Update + +`PUT /api/users/:id` + +### Get Organisations for user + +`GET /api/users/:id/orgs` + +## User + +### Change Password + +`PUT /api/user/password` + +Changes the password for the user + +### Actual User + +`GET /api/user` + +The above will return the current user. + +### Switch user context + +`POST /api/user/using/:organisationId` + +Switch user context to the given organisation. + +### Organisations of the actual User + +`GET /api/user/orgs` + +The above will return a list of all organisations of the current user. + +### Star a dashboard + +`POST /api/user/stars/dashboard/:dashboardId` + +Stars the given Dashboard for the actual user. + +### Unstar a dashboard + +`DELETE /api/user/stars/dashboard/:dashboardId` + +Deletes the staring of the given Dashboard for the actual user. + +## Snapshots + +### Create new snapshot + +`POST /api/snapshots` + +### Get Snapshot by Id + +`GET /api/snapshots/:key` + +### Delete Snapshot by Id + +`DELETE /api/snapshots-delete/:key` + +## Frontend Settings + +### Get Settings + +`GET /api/frontend/settings` + +## Login + +### Renew session based on remember cookie + +`GET /api/login/ping` \ No newline at end of file From 3c6b647398ac8ba49259316f7965889ea053aa5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20K=C3=B6hler?= Date: Thu, 21 May 2015 12:56:30 +0200 Subject: [PATCH 2/2] added admin stuff --- docs/sources/reference/http_api.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/sources/reference/http_api.md b/docs/sources/reference/http_api.md index 3f5fa6392f9..d888071bd35 100644 --- a/docs/sources/reference/http_api.md +++ b/docs/sources/reference/http_api.md @@ -351,4 +351,26 @@ Deletes the staring of the given Dashboard for the actual user. ### Renew session based on remember cookie -`GET /api/login/ping` \ No newline at end of file +`GET /api/login/ping` + +## Admin + +### Settings + +`GET /api/admin/settings` + +### Global Users + +`POST /api/admin/users` + +### Password for User + +`PUT /api/admin/users/:id/password` + +### Permissions + +`PUT /api/admin/users/:id/permissions` + +### Delete global User + +`DELETE /api/admin/users/:id`