Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
feat: add dash permission and versions api to th
Browse files Browse the repository at this point in the history
Added Dashboard Permissions API to Thunder Client collection
Added Dashboard Versions API to Thunder Client collection
  • Loading branch information
gjed committed Jun 21, 2022
1 parent 1ffd723 commit 3a9fa7f
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 2 deletions.
14 changes: 14 additions & 0 deletions thunder-client/thunderCollection.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,20 @@
"containerId": "",
"created": "2022-06-21T10:47:10.675Z",
"sortNum": 28750
},
{
"_id": "3ac23272-92c0-4184-ab95-3375dbd44a27",
"name": "Dashboard Permission API",
"containerId": "",
"created": "2022-06-21T11:15:13.326Z",
"sortNum": 29375
},
{
"_id": "1997d924-1799-4225-9b86-ae8d24d0957e",
"name": "Dashboard Versions API",
"containerId": "",
"created": "2022-06-21T11:15:23.602Z",
"sortNum": 29687.5
}
],
"settings": {
Expand Down
157 changes: 155 additions & 2 deletions thunder-client/thunderclient.json
Original file line number Diff line number Diff line change
Expand Up @@ -2547,7 +2547,7 @@
"method": "POST",
"sortNum": 440000,
"created": "2022-06-21T11:06:20.771Z",
"modified": "2022-06-21T11:08:46.910Z",
"modified": "2022-06-21T13:16:48.314Z",
"headers": [
{
"name": "Accept",
Expand All @@ -2561,7 +2561,7 @@
"params": [],
"body": {
"type": "json",
"raw": "{\n \"dashboard\": {\n \"id\": null,\n \"uid\": null,\n \"title\": \"Production Overview\",\n \"tags\": [ \"templated\" ],\n \"timezone\": \"browser\",\n \"schemaVersion\": 16,\n \"version\": 0,\n \"refresh\": \"25s\"\n },\n \"folderId\": 0,\n \"message\": \"Made changes to xyz\",\n \"overwrite\": false\n}",
"raw": "{\n \"dashboard\": {\n \"id\": null,\n \"uid\": null,\n \"title\": \"Production Overview 2\",\n \"tags\": [ \"templated\" ],\n \"timezone\": \"browser\",\n \"schemaVersion\": 16,\n \"version\": 0,\n \"refresh\": \"25s\"\n },\n \"folderId\": 0,\n \"message\": \"Made changes to xyz\",\n \"overwrite\": false\n}",
"form": []
},
"tests": []
Expand Down Expand Up @@ -2657,5 +2657,158 @@
],
"params": [],
"tests": []
},
{
"_id": "16a568ac-0708-43b9-aafb-61780a661b87",
"colId": "c91aad30-b523-4472-b29b-c1fc63dbcda1",
"containerId": "3ac23272-92c0-4184-ab95-3375dbd44a27",
"name": "Get permission for a dashboard",
"url": "{{baseUrl}}/api/dashboards/uid/{{dashboardUid}}/permissions",
"method": "GET",
"sortNum": 450000,
"created": "2022-06-21T13:15:33.245Z",
"modified": "2022-06-21T13:17:41.163Z",
"headers": [
{
"name": "Accept",
"value": "application/json"
},
{
"name": "Content-Type",
"value": "application/json"
}
],
"params": [],
"tests": []
},
{
"_id": "9a66b8d0-a235-459c-a285-ad71ef911ece",
"colId": "c91aad30-b523-4472-b29b-c1fc63dbcda1",
"containerId": "3ac23272-92c0-4184-ab95-3375dbd44a27",
"name": "Update permissions for a dashboard",
"url": "{{baseUrl}}/api/dashboards/uid/{{dashboardUid}}/permissions",
"method": "POST",
"sortNum": 460000,
"created": "2022-06-21T13:17:16.510Z",
"modified": "2022-06-21T13:19:09.336Z",
"headers": [
{
"name": "Accept",
"value": "application/json"
},
{
"name": "Content-Type",
"value": "application/json"
}
],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"items\": [\n {\n \"role\": \"Viewer\",\n \"permission\": 1\n },\n {\n \"role\": \"Editor\",\n \"permission\": 2\n },\n {\n \"teamId\": {{teamId}},\n \"permission\": 1\n },\n {\n \"userId\": {{userId}},\n \"permission\": 4\n }\n ]\n}",
"form": []
},
"tests": []
},
{
"_id": "d7dc4973-d4af-45da-8ba2-6c315e6cd8a8",
"colId": "c91aad30-b523-4472-b29b-c1fc63dbcda1",
"containerId": "1997d924-1799-4225-9b86-ae8d24d0957e",
"name": "Get all dashboard versions by dashboard UID",
"url": "{{baseUrl}}/api/dashboards/uid/{{dashboardUid}}/versions/{{dashboardVersion}}",
"method": "GET",
"sortNum": 10000,
"created": "2022-06-21T13:19:44.595Z",
"modified": "2022-06-21T13:21:15.815Z",
"headers": [
{
"name": "Accept",
"value": "application/json"
},
{
"name": "Content-Type",
"value": "application/json"
}
],
"params": [],
"tests": []
},
{
"_id": "d0d20098-d5b4-4a90-949f-ddbade3ab247",
"colId": "c91aad30-b523-4472-b29b-c1fc63dbcda1",
"containerId": "1997d924-1799-4225-9b86-ae8d24d0957e",
"name": "Get dashboard version by dashboard UID",
"url": "{{baseUrl}}/api/dashboards/uid/{{dashboardUid}}/versions",
"method": "GET",
"sortNum": 20000,
"created": "2022-06-21T13:20:40.268Z",
"modified": "2022-06-21T13:20:40.268Z",
"headers": [
{
"name": "Accept",
"value": "application/json"
},
{
"name": "Content-Type",
"value": "application/json"
}
],
"params": [],
"tests": []
},
{
"_id": "304e798c-cd50-4906-b983-c3e570b456a0",
"colId": "c91aad30-b523-4472-b29b-c1fc63dbcda1",
"containerId": "1997d924-1799-4225-9b86-ae8d24d0957e",
"name": "Restore dashboard by dashboard UID",
"url": "{{baseUrl}}/api/dashboards/uid/{{dashboardUid}}/restore",
"method": "POST",
"sortNum": 30000,
"created": "2022-06-21T13:21:56.836Z",
"modified": "2022-06-21T13:22:42.630Z",
"headers": [
{
"name": "Accept",
"value": "application/json"
},
{
"name": "Content-Type",
"value": "application/json"
}
],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"version\": {{dashboardVersion}}\n}",
"form": []
},
"tests": []
},
{
"_id": "f9ea9bc8-8ce5-41df-88f4-9240a4bd4607",
"colId": "c91aad30-b523-4472-b29b-c1fc63dbcda1",
"containerId": "1997d924-1799-4225-9b86-ae8d24d0957e",
"name": "Compare dashboard versions",
"url": "{{baseUrl}}/api/dashboards/calculate-diff",
"method": "POST",
"sortNum": 40000,
"created": "2022-06-21T13:23:02.639Z",
"modified": "2022-06-21T13:25:58.869Z",
"headers": [
{
"name": "Accept",
"value": "application/json"
},
{
"name": "Content-Type",
"value": "application/json"
}
],
"params": [],
"body": {
"type": "json",
"raw": "{\n \"base\": {\n \"dashboardId\": {{dashboardId}},\n \"version\": 1\n },\n \"new\": {\n \"dashboardId\": {{dashboardId}},\n \"version\": 2\n },\n \"diffType\": \"json\"\n}",
"form": []
},
"tests": []
}
]

0 comments on commit 3a9fa7f

Please sign in to comment.