* Swagger: Fix listTokensResponse
It should return a list of Tokens, not a single one
Also regenerated the API spec from the latest changes + this branch
* Remove pointer
"description":"Disables permissions for the data source with the given id. All existing permissions will be removed and anyone will be able to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.",
"tags":[
"datasource_permissions",
"enterprise"
],
"summary":"Disable permissions for a data source.",
"description":"Enables permissions for the data source with the given id.\nNo one except Org Admins will be able to query the data source until permissions have been added\nwhich permit certain users or teams to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.",
"tags":[
"datasource_permissions",
"enterprise"
],
"summary":"Enable permissions for a data source.",
"description":"Gets all existing permissions for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.\nDeprecated. Please use GET /api/access-control/datasources/:uid",
"tags":[
"datasource_permissions",
"enterprise"
],
"summary":"Get permissions for a data source.",
"operationId":"getAllPermissions",
"parameters":[
{
"type":"string",
"name":"datasourceId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/getAllPermissionseResponse"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"post":{
"description":"You need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.\nDeprecated. Please use POST /api/access-control/datasources/:uid/users/:id, /api/access-control/datasources/:uid/teams/:id or /api/access-control/datasources/:uid/buildInRoles/:id",
"description":"Removes the permission with the given permissionId for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:delete` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.\nDeprecated. Please use POST /api/access-control/datasources/:uid/users/:id, /api/access-control/datasources/:uid/teams/:id or /api/access-control/datasources/:uid/buildInRoles/:id",
"description":"Disables permissions for the data source with the given id. All existing permissions will be removed and anyone will be able to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.",
"tags":[
"datasource_permissions",
"enterprise"
],
"summary":"Disable permissions for a data source.",
"description":"Enables permissions for the data source with the given id.\nNo one except Org Admins will be able to query the data source until permissions have been added\nwhich permit certain users or teams to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.",
"tags":[
"datasource_permissions",
"enterprise"
],
"summary":"Enable permissions for a data source.",
"description":"Gets all existing permissions for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.\nDeprecated. Please use GET /api/access-control/datasources/:uid",
"tags":[
"datasource_permissions",
"enterprise"
],
"summary":"Get permissions for a data source.",
"operationId":"getAllPermissions",
"parameters":[
{
"type":"string",
"name":"datasourceId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/getAllPermissionseResponse"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"post":{
"description":"You need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.\nDeprecated. Please use POST /api/access-control/datasources/:uid/users/:id, /api/access-control/datasources/:uid/teams/:id or /api/access-control/datasources/:uid/buildInRoles/:id",
"description":"Removes the permission with the given permissionId for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:delete` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.\nDeprecated. Please use POST /api/access-control/datasources/:uid/users/:id, /api/access-control/datasources/:uid/teams/:id or /api/access-control/datasources/:uid/buildInRoles/:id",
"tags":[
"datasource_permissions",
"enterprise"
],
"summary":"Remove permission for a data source.",
"operationId":"deletePermissions",
"parameters":[
{
"type":"string",
"name":"datasourceId",
"in":"path",
"required":true
},
{
"type":"string",
"name":"permissionId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/okResponse"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
}
}
}
},
"/datasources/{id}":{
"get":{
"description":"If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/getDataSourceByUID) instead",
"description":"Disables permissions for the data source with the given id. All existing permissions will be removed and anyone will be able to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.",
"description":"Enables permissions for the data source with the given id.\nNo one except Org Admins will be able to query the data source until permissions have been added\nwhich permit certain users or teams to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.",
"summary":"Enable permissions for a data source.",
"tags":[
"datasource_permissions",
"enterprise"
]
}
},
"/datasources/{datasourceId}/permissions":{
"get":{
"description":"Gets all existing permissions for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.\nDeprecated. Please use GET /api/access-control/datasources/:uid",
"description":"You need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.\nDeprecated. Please use POST /api/access-control/datasources/:uid/users/:id, /api/access-control/datasources/:uid/teams/:id or /api/access-control/datasources/:uid/buildInRoles/:id",
"description":"Removes the permission with the given permissionId for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:delete` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).\n\nDeprecated: true.\nDeprecated. Please use POST /api/access-control/datasources/:uid/users/:id, /api/access-control/datasources/:uid/teams/:id or /api/access-control/datasources/:uid/buildInRoles/:id",