Documentation
¶
Overview ¶
Package api Grafana HTTP API.
The Grafana backend exposes an HTTP API, the same API is used by the frontend to do everything from saving dashboards, creating users and updating data sources.
Schemes: http, https BasePath: /api Version: 0.0.1 Contact: Grafana Labs<hello@grafana.com> https://grafana.com Consumes: - application/json Produces: - application/json Security: - basic: - api_key: SecurityDefinitions: basic: type: basic api_key: type: apiKey name: Authorization in: header
swagger:meta
Index ¶
- Constants
- Variables
- func AnnotationTypeScopeResolver(annotationsRepo annotations.Repository, features featuremgmt.FeatureToggles, ...) (string, accesscontrol.ScopeAttributeResolver)
- func BasicAuthenticatedRequest(req *http.Request, expectedUser, expectedPass string) bool
- func GrafanaJavascriptAgentLogMessageHandler(store *frontendlogging.SourceMapStore) frontendLogMessageHandler
- func NewFakePluginInstaller() *fakePluginInstaller
- func ReverseProxyGnetReq(logger log.Logger, proxyPath string, version string, grafanaComAPIUrl string) *httputil.ReverseProxy
- func ValidateAndNormalizeEmail(email string) (string, error)
- type AcceptedResponse
- type AddAPIkeyParams
- type AddDataSourceParams
- type AddInviteParams
- type AddOrgUserParams
- type AddOrgUserToCurrentOrgParams
- type AdminCreateUserParams
- type AdminCreateUserResponseResponse
- type AdminDeleteUserParams
- type AdminDisableUserParams
- type AdminEnableUserParams
- type AdminGetUserAuthTokensParams
- type AdminGetUserAuthTokensResponse
- type AdminLogoutUserParams
- type AdminRevokeUserAuthTokenParams
- type AdminUpdateUserPasswordParams
- type AdminUpdateUserPermissionsParams
- type AnnotationError
- type AvailablePlugins
- type BadRequestError
- type BadRequestPublicError
- type CalcDashboardDiffParams
- type CalculateDashboardDiffResponse
- type CallDatasourceResourceByIDParams
- type CallDatasourceResourceWithUIDParams
- type ChangeUserPasswordParams
- type CheckDatasourceHealthByIDParams
- type CheckDatasourceHealthWithUIDParams
- type ConflictError
- type CreateFolderParams
- type CreateOrUpdateDatasourceResponse
- type CreateOrgParams
- type CreateOrgResponse
- type CreatePlaylistParams
- type CreatePlaylistResponse
- type CreateSnapshotParams
- type CreateSnapshotResponse
- type DashboardResponse
- type DashboardVersionResponse
- type DashboardVersionsResponse
- type DashboardsTagsResponse
- type DatasourceProxyDELETEByUIDcallsParams
- type DatasourceProxyDELETEcallsParams
- type DatasourceProxyGETByUIDcallsParams
- type DatasourceProxyGETcallsParams
- type DatasourceProxyPOSTByUIDcallsParams
- type DatasourceProxyPOSTcallsParams
- type DatasourceProxyRouteParam
- type DeleteAPIkeyParams
- type DeleteAnnotationByIDParams
- type DeleteDashboardByUIDParams
- type DeleteDashboardResponse
- type DeleteDashboardSnapshotParams
- type DeleteDataSourceByIDParams
- type DeleteDataSourceByNameParams
- type DeleteDataSourceByNameResponse
- type DeleteDataSourceByUIDParams
- type DeleteFolderParams
- type DeleteFolderResponse
- type DeleteOrgByIDParams
- type DeletePlaylistParams
- type DeleteSnapshotByDeleteKeyParams
- type ErrorResponseBody
- type FolderResponse
- type ForbiddenError
- type ForbiddenPublicError
- type GenericError
- type GetAPIkeyResponse
- type GetAPIkeysParams
- type GetAnnotationByIDParams
- type GetAnnotationByIDResponse
- type GetAnnotationTagsParams
- type GetAnnotationTagsResponse
- type GetAnnotationsParams
- type GetAnnotationsResponse
- type GetCurrentOrgResponse
- type GetDashboardByUIDParams
- type GetDashboardPermissionsListByIDParams
- type GetDashboardPermissionsListByUIDParams
- type GetDashboardPermissionsResponse
- type GetDashboardSnapshotParams
- type GetDashboardSnapshotResponse
- type GetDashboardVersionByIDParams
- type GetDashboardVersionByUIDParams
- type GetDashboardVersionsByIDParams
- type GetDashboardVersionsByUIDParams
- type GetDashboardVersionsParams
- type GetDataSourceByIDParams
- type GetDataSourceByNameParams
- type GetDataSourceByUIDParams
- type GetDataSourceIDresponse
- type GetDataSourceIdByNameParams
- type GetDataSourceResponse
- type GetDataSourcesResponse
- type GetFolderByIDParams
- type GetFolderByUIDParams
- type GetFolderDescendantCountsParams
- type GetFolderDescendantCountsResponse
- type GetFolderPermissionListParams
- type GetFolderPermissionsResponse
- type GetFoldersParams
- type GetFoldersResponse
- type GetHomeDashboardResponse
- type GetHomeDashboardResponseBody
- type GetOrgByIDParams
- type GetOrgByIDResponse
- type GetOrgByNameParams
- type GetOrgByNameResponse
- type GetOrgQuotaParams
- type GetOrgUsersForCurrentOrgLookupResponse
- type GetOrgUsersForCurrentOrgResponse
- type GetOrgUsersParams
- type GetOrgUsersResponse
- type GetPendingOrgInvitesResponse
- type GetPlaylistDashboardsParams
- type GetPlaylistDashboardsResponse
- type GetPlaylistItemsParams
- type GetPlaylistItemsResponse
- type GetPlaylistParams
- type GetPlaylistResponse
- type GetPreferencesResponse
- type GetQuotaResponseResponse
- type GetSettingsResponse
- type GetSharingOptionsResponse
- type GetSignedInUserOrgListResponse
- type GetSignedInUserTeamListResponse
- type GetSnapshotsParams
- type GetStatsResponse
- type GetUserAuthTokensResponse
- type GetUserByIDParams
- type GetUserByLoginOrEmailParams
- type GetUserOrgListParams
- type GetUserOrgListResponse
- type GetUserQuotaParams
- type GetUserTeamsParams
- type GetUserTeamsResponse
- type HTTPServer
- func (hs *HTTPServer) AddAPIKey(c *contextmodel.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) AddDataSource(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AddMiddleware(middleware web.Handler)
- func (hs *HTTPServer) AddNamedMiddleware(middleware routing.RegisterNamedMiddleware)
- func (hs *HTTPServer) AddOrgInvite(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AddOrgUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AddOrgUserToCurrentOrg(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminCreateUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminDeleteAllSecretsManagerPluginSecrets(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminDeleteUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminDisableUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminEnableUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminGetSettings(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminGetStats(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminGetUserAuthTokens(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminGetVerboseSettings(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminLogoutUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminMigrateSecretsFromPlugin(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminMigrateSecretsToPlugin(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminProvisioningReloadAlerting(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminProvisioningReloadDashboards(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminProvisioningReloadDatasources(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminProvisioningReloadPlugins(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminReEncryptEncryptionKeys(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminReEncryptSecrets(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminRevokeUserAuthToken(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminRollbackSecrets(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminRotateDataEncryptionKeys(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminUpdateUserPassword(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) AdminUpdateUserPermissions(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) CalculateDashboardDiff(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) CallDatasourceResource(c *contextmodel.ReqContext)deprecated
- func (hs *HTTPServer) CallDatasourceResourceWithUID(c *contextmodel.ReqContext)
- func (hs *HTTPServer) CallResource(c *contextmodel.ReqContext)
- func (hs *HTTPServer) ChangeActiveOrgAndRedirectToHome(c *contextmodel.ReqContext)
- func (hs *HTTPServer) ChangeUserPassword(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) CheckDatasourceHealth(c *contextmodel.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) CheckDatasourceHealthWithUID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) CheckHealth(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) ClearHelpFlags(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) CollectPluginMetrics(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) CompleteInvite(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) CookieOptionsFromCfg() cookies.CookieOptions
- func (hs *HTTPServer) CreateDashboardSnapshot(c *contextmodel.ReqContext)
- func (hs *HTTPServer) CreateFolder(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) CreateOrg(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) CreatePlaylist(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) DeleteAPIKey(c *contextmodel.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) DeleteAnnotationByID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDashboardByUID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDashboardSnapshot(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDashboardSnapshotByDeleteKey(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDataSourceById(c *contextmodel.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) DeleteDataSourceByName(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDataSourceByUID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) DeleteFolder(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) DeleteOrgByID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) DeletePlaylist(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetAPIKeys(c *contextmodel.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) GetAlertNotifiers() func(*contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetAnnotationByID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetAnnotationTags(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetAnnotations(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetCertificate(*tls.ClientHelloInfo) (*tls.Certificate, error)
- func (hs *HTTPServer) GetCurrentOrg(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetCurrentOrgQuotas(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetDashboard(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetDashboardPermissionList(c *contextmodel.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) GetDashboardSnapshot(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetDashboardTags(c *contextmodel.ReqContext)
- func (hs *HTTPServer) GetDashboardUIDs(c *contextmodel.ReqContext)
- func (hs *HTTPServer) GetDashboardVersion(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetDashboardVersions(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetDataSourceById(c *contextmodel.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) GetDataSourceByName(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetDataSourceByUID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetDataSourceIdByName(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetDataSources(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetFolderByID(c *contextmodel.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) GetFolderByUID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetFolderDescendantCounts(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetFolderPermissionList(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetFolders(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetFrontendAssets(c *contextmodel.ReqContext)
- func (hs *HTTPServer) GetFrontendSettings(c *contextmodel.ReqContext)
- func (hs *HTTPServer) GetHomeDashboard(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetInviteInfoByCode(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgByID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgByName(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgPreferences(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgQuotas(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgUsers(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgUsersForCurrentOrg(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgUsersForCurrentOrgLookup(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetPendingOrgInvites(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetPlaylist(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetPlaylistItems(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetPluginDashboards(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetPluginErrorsList(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetPluginList(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetPluginMarkdown(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetPluginSettingByID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetRedirectURL(c *contextmodel.ReqContext) string
- func (hs *HTTPServer) GetSharingOptions(c *contextmodel.ReqContext)
- func (hs *HTTPServer) GetSignUpOptions(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetSignedInUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetSignedInUserOrgList(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetSignedInUserTeamList(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetUserAuthTokens(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetUserByID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetUserByLoginOrEmail(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetUserOrgList(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetUserPreferences(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetUserQuotas(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) GetUserTeams(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) HardDeleteDashboardByUID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) Index(c *contextmodel.ReqContext)
- func (hs *HTTPServer) InstallPlugin(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) ListSortOptions(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) LoginAPIPing(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) LoginPost(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) LoginView(c *contextmodel.ReqContext)
- func (hs *HTTPServer) Logout(c *contextmodel.ReqContext)
- func (hs *HTTPServer) MassDeleteAnnotations(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) MoveFolder(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) NotFoundHandler(c *contextmodel.ReqContext)
- func (hs *HTTPServer) OAuthLogin(reqCtx *contextmodel.ReqContext)
- func (hs *HTTPServer) PatchAnnotation(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) PatchOrgPreferences(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) PatchUserPreferences(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) PostAnnotation(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) PostDashboard(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) PostFrontendMetrics(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) PostGraphiteAnnotation(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) ProxyDataSourceRequest(c *contextmodel.ReqContext)deprecated
- func (hs *HTTPServer) ProxyDataSourceRequestWithUID(c *contextmodel.ReqContext)
- func (hs *HTTPServer) ProxyGnetRequest(c *contextmodel.ReqContext)
- func (hs *HTTPServer) ProxyPluginRequest(c *contextmodel.ReqContext)
- func (hs *HTTPServer) QueryMetricsV2(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) RedirectResponseWithError(c *contextmodel.ReqContext, err error, v ...any) *response.RedirectResponse
- func (hs *HTTPServer) RemoveOrgUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) RemoveOrgUserForCurrentOrg(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) RenderHandler(c *contextmodel.ReqContext)
- func (hs *HTTPServer) ResetPassword(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) RestoreDashboardVersion(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) RestoreDeletedDashboard(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) RevokeInvite(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) RevokeUserAuthToken(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) RotateUserAuthToken(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) RotateUserAuthTokenRedirect(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) Run(ctx context.Context) error
- func (hs *HTTPServer) Search(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SearchDashboardSnapshots(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SearchOrgUsers(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SearchOrgUsersWithPaging(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SearchOrgs(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SearchPlaylists(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SendResetPasswordEmail(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SetHelpFlag(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SetHomeDashboard(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SignUp(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SignUpStep2(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) SoftDeleteDashboard(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) StartEmailVerificaton(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UninstallPlugin(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateAnnotation(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateCurrentOrg(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateCurrentOrgAddress(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateDashboardPermissions(c *contextmodel.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) UpdateDataSourceByID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateDataSourceByUID(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateFolder(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateFolderPermissions(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrg(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrgAddress(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrgPreferences(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrgQuota(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrgUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrgUserForCurrentOrg(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdatePlaylist(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdatePluginSetting(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateSignedInUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateUser(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateUserActiveOrg(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateUserEmail(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateUserPreferences(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UpdateUserQuota(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) UserSetUsingOrg(c *contextmodel.ReqContext) response.Response
- func (hs *HTTPServer) ValidateRedirectTo(redirectTo string) error
- func (hs *HTTPServer) WatchAndUpdateCerts(ctx context.Context)
- type HardDeleteDashboardByUIDParams
- type HelpFlagResponse
- type InternalServerError
- type InternalServerPublicError
- type ListSortOptionsResponse
- type LookupOrgUsersParams
- type MassDeleteAnnotationsParams
- type MoveFolderParams
- type NotFoundError
- type NotFoundPublicError
- type OKResponse
- type PatchAnnotationParams
- type PatchOrgPreferencesParams
- type PatchUserPreferencesParams
- type PostAPIkeyResponse
- type PostAnnotationParams
- type PostAnnotationResponse
- type PostDashboardParams
- type PostDashboardResponse
- type PostGraphiteAnnotationParams
- type PreconditionFailedError
- type PublicError
- type PublicErrorResponse
- type QueryMetricsWithExpressionsBodyParams
- type QueryMetricsWithExpressionsRespons
- type RemoveOrgUserForCurrentOrgParams
- type RemoveOrgUserParams
- type RestoreDashboardVersionByIDParams
- type RestoreDashboardVersionByUIDParams
- type RestoreDeletedDashboardByUID
- type RevokeInviteParams
- type RevokeUserAuthTokenParams
- type SMTPNotEnabledError
- type SearchDashboardSnapshotsResponse
- type SearchOrgParams
- type SearchOrgUsersParams
- type SearchOrgUsersResponse
- type SearchOrgsResponse
- type SearchParams
- type SearchPlaylistsParams
- type SearchPlaylistsResponse
- type SearchResponse
- type SearchUsersParams
- type SearchUsersWithPagingParams
- type ServerOptions
- type SetHelpFlagParams
- type SuccessResponseBody
- type TLSCerts
- type UnauthorisedPublicError
- type UnauthorizedError
- type UnprocessableEntityError
- type UpdateAnnotationParams
- type UpdateCurrentOrgAddressParams
- type UpdateCurrentOrgParams
- type UpdateCurrentOrgUserParams
- type UpdateDashboardPermissionsByIDParams
- type UpdateDashboardPermissionsByUIDParams
- type UpdateDataSourceByIDParams
- type UpdateDataSourceByUIDParams
- type UpdateFolderParams
- type UpdateFolderPermissionsParams
- type UpdateOrgAddressParams
- type UpdateOrgParams
- type UpdateOrgPreferencesParams
- type UpdateOrgQuotaParam
- type UpdateOrgUserForCurrentOrgParams
- type UpdateOrgUserParams
- type UpdatePlaylistParams
- type UpdatePlaylistResponse
- type UpdateSignedInUserParams
- type UpdateUserParams
- type UpdateUserPreferencesParams
- type UpdateUserQuotaParams
- type UserResponse
- type UserSetUsingOrgParams
Constants ¶
const ( OauthStateCookieName = "oauth_state" OauthPKCECookieName = "oauth_code_verifier" )
const (
ActionProvisioningReload = "provisioning:reload"
)
API related actions
const REDACTED = "redacted"
Variables ¶
var ( ScopeProvisionersAll = ac.Scope("provisioners", "*") ScopeProvisionersDashboards = ac.Scope("provisioners", "dashboards") ScopeProvisionersPlugins = ac.Scope("provisioners", "plugins") ScopeProvisionersDatasources = ac.Scope("provisioners", "datasources") ScopeProvisionersNotifications = ac.Scope("provisioners", "notifications") ScopeProvisionersAlertRules = ac.Scope("provisioners", "alerting") )
API related scopes
var ErrUnexpectedFileExtension = errors.New("unexpected file extension")
Functions ¶
func AnnotationTypeScopeResolver ¶
func AnnotationTypeScopeResolver(annotationsRepo annotations.Repository, features featuremgmt.FeatureToggles, dashSvc dashboards.DashboardService, folderSvc folder.Service) (string, accesscontrol.ScopeAttributeResolver)
AnnotationTypeScopeResolver provides an ScopeAttributeResolver able to resolve annotation types. Scope "annotations:id:<id>" will be translated to "annotations:type:<type>, where <type> is the type of annotation with id <id>. If annotationPermissionUpdate feature toggle is enabled, dashboard annotation scope will be resolved to the corresponding dashboard and folder scopes (eg, "dashboards:uid:<annotation_dashboard_uid>", "folders:uid:<parent_folder_uid>" etc).
func BasicAuthenticatedRequest ¶
BasicAuthenticatedRequest parses the provided HTTP request for basic authentication credentials and returns true if the provided credentials match the expected username and password. Returns false if the request is unauthenticated. Uses constant-time comparison in order to mitigate timing attacks.
func GrafanaJavascriptAgentLogMessageHandler ¶
func GrafanaJavascriptAgentLogMessageHandler(store *frontendlogging.SourceMapStore) frontendLogMessageHandler
func NewFakePluginInstaller ¶
func NewFakePluginInstaller() *fakePluginInstaller
func ReverseProxyGnetReq ¶
Types ¶
type AcceptedResponse ¶
type AcceptedResponse GenericError
AcceptedResponse
swagger:response acceptedResponse
type AddAPIkeyParams ¶
type AddAPIkeyParams struct {
// in:body
// required:true
Body apikey.AddCommand
}
swagger:parameters addAPIkey
type AddDataSourceParams ¶
type AddDataSourceParams struct {
// in:body
// required:true
Body datasources.AddDataSourceCommand
}
swagger:parameters addDataSource
type AddInviteParams ¶
type AddInviteParams struct {
// in:body
// required:true
Body dtos.AddInviteForm `json:"body"`
}
swagger:parameters addOrgInvite
type AddOrgUserParams ¶
type AddOrgUserParams struct {
// in:body
// required:true
Body org.AddOrgUserCommand `json:"body"`
// in:path
// required:true
OrgID int64 `json:"org_id"`
}
swagger:parameters addOrgUser
type AddOrgUserToCurrentOrgParams ¶
type AddOrgUserToCurrentOrgParams struct {
// in:body
// required:true
Body org.AddOrgUserCommand `json:"body"`
}
swagger:parameters addOrgUserToCurrentOrg
type AdminCreateUserParams ¶
type AdminCreateUserParams struct {
// in:body
// required:true
Body dtos.AdminCreateUserForm `json:"body"`
}
swagger:parameters adminCreateUser
type AdminCreateUserResponseResponse ¶
type AdminCreateUserResponseResponse struct {
// in:body
Body user.AdminCreateUserResponse `json:"body"`
}
swagger:response adminCreateUserResponse
type AdminDeleteUserParams ¶
type AdminDeleteUserParams struct {
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters adminDeleteUser
type AdminDisableUserParams ¶
type AdminDisableUserParams struct {
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters adminDisableUser
type AdminEnableUserParams ¶
type AdminEnableUserParams struct {
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters adminEnableUser
type AdminGetUserAuthTokensParams ¶
type AdminGetUserAuthTokensParams struct {
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters adminGetUserAuthTokens
type AdminGetUserAuthTokensResponse ¶
swagger:response adminGetUserAuthTokensResponse
type AdminLogoutUserParams ¶
type AdminLogoutUserParams struct {
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters adminLogoutUser
type AdminRevokeUserAuthTokenParams ¶
type AdminRevokeUserAuthTokenParams struct {
// in:body
// required:true
Body auth.RevokeAuthTokenCmd `json:"body"`
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters adminRevokeUserAuthToken
type AdminUpdateUserPasswordParams ¶
type AdminUpdateUserPasswordParams struct {
// in:body
// required:true
Body dtos.AdminUpdateUserPasswordForm `json:"body"`
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters adminUpdateUserPassword
type AdminUpdateUserPermissionsParams ¶
type AdminUpdateUserPermissionsParams struct {
// in:body
// required:true
Body dtos.AdminUpdateUserPermissionsForm `json:"body"`
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters adminUpdateUserPermissions
type AnnotationError ¶
type AnnotationError struct {
// contains filtered or unexported fields
}
func (*AnnotationError) Error ¶
func (e *AnnotationError) Error() string
type AvailablePlugins ¶
AvailablePlugins represents a mapping from plugin types (panel, data source, etc.) to plugin IDs to plugins For example ["panel"] -> ["piechart"] -> {pie chart plugin DTO}
type BadRequestError ¶
type BadRequestError GenericError
BadRequestError is returned when the request is invalid and it cannot be processed.
swagger:response badRequestError
type BadRequestPublicError ¶
type BadRequestPublicError PublicErrorResponse
BadRequestPublicError is returned when the request is invalid and it cannot be processed.
swagger:response badRequestPublicError
type CalcDashboardDiffParams ¶
type CalcDashboardDiffParams struct {
// in:body
// required:true
Body struct {
Base dtos.CalculateDiffTarget `json:"base" binding:"Required"`
New dtos.CalculateDiffTarget `json:"new" binding:"Required"`
// The type of diff to return
// Description:
// * `basic`
// * `json`
// Enum: basic,json
DiffType string `json:"diffType" binding:"Required"`
}
}
swagger:parameters calculateDashboardDiff
type CalculateDashboardDiffResponse ¶
type CalculateDashboardDiffResponse struct {
// in: body
Body []byte `json:"body"`
}
swagger:response calculateDashboardDiffResponse
type CallDatasourceResourceByIDParams ¶
type CallDatasourceResourceByIDParams struct {
// in:path
// required:true
DatasourceID string `json:"id"`
}
swagger:parameters callDatasourceResourceByID
type CallDatasourceResourceWithUIDParams ¶
type CallDatasourceResourceWithUIDParams struct {
// in:path
// required:true
DatasourceUID string `json:"uid"`
}
swagger:parameters callDatasourceResourceWithUID
type ChangeUserPasswordParams ¶
type ChangeUserPasswordParams struct {
// To change the email, name, login, theme, provide another one.
// in:body
// required:true
Body user.ChangeUserPasswordCommand `json:"body"`
}
swagger:parameters changeUserPassword
type CheckDatasourceHealthByIDParams ¶
type CheckDatasourceHealthByIDParams struct {
// in:path
// required:true
DatasourceID string `json:"id"`
}
swagger:parameters checkDatasourceHealthByID
type CheckDatasourceHealthWithUIDParams ¶
type CheckDatasourceHealthWithUIDParams struct {
// in:path
// required:true
DatasourceUID string `json:"uid"`
}
swagger:parameters checkDatasourceHealthWithUID
type CreateFolderParams ¶
type CreateFolderParams struct {
// in:body
// required:true
Body folder.CreateFolderCommand `json:"body"`
}
swagger:parameters createFolder
type CreateOrUpdateDatasourceResponse ¶
type CreateOrUpdateDatasourceResponse struct {
// The response message
// in: body
Body struct {
// ID Identifier of the new data source.
// required: true
// example: 65
ID int64 `json:"id"`
// Name of the new data source.
// required: true
// example: My Data source
Name string `json:"name"`
// Message Message of the deleted dashboard.
// required: true
// example: Data source added
Message string `json:"message"`
// Datasource properties
// required: true
Datasource dtos.DataSource `json:"datasource"`
} `json:"body"`
}
swagger:response createOrUpdateDatasourceResponse
type CreateOrgParams ¶
type CreateOrgParams struct {
// in:body
// required:true
Body org.CreateOrgCommand `json:"body"`
}
swagger:parameters createOrg
type CreateOrgResponse ¶
type CreateOrgResponse struct {
// The response message
// in: body
Body struct {
// ID Identifier of the created org.
// required: true
// example: 65
OrgID int64 `json:"orgId"`
// Message Message of the created org.
// required: true
// example: Data source added
Message string `json:"message"`
} `json:"body"`
}
swagger:response createOrgResponse
type CreatePlaylistParams ¶
type CreatePlaylistParams struct {
// in:body
// required:true
Body playlist.CreatePlaylistCommand
}
swagger:parameters createPlaylist
type CreatePlaylistResponse ¶
type CreatePlaylistResponse struct {
// The response message
// in: body
Body *playlist.Playlist `json:"body"`
}
swagger:response createPlaylistResponse
type CreateSnapshotParams ¶
type CreateSnapshotParams struct {
// in:body
// required:true
Body dashboardsnapshots.CreateDashboardSnapshotCommand `json:"body"`
}
swagger:parameters createDashboardSnapshot
type CreateSnapshotResponse ¶
type CreateSnapshotResponse struct {
// in:body
Body struct {
// Unique key
Key string `json:"key"`
// Unique key used to delete the snapshot. It is different from the key so that only the creator can delete the snapshot.
DeleteKey string `json:"deleteKey"`
URL string `json:"url"`
DeleteUrl string `json:"deleteUrl"`
// Snapshot id
ID int64 `json:"id"`
} `json:"body"`
}
swagger:response createDashboardSnapshotResponse
type DashboardResponse ¶
type DashboardResponse struct {
// The response message
// in: body
Body dtos.DashboardFullWithMeta `json:"body"`
}
swagger:response dashboardResponse
type DashboardVersionResponse ¶
type DashboardVersionResponse struct {
// in: body
Body *dashver.DashboardVersionMeta `json:"body"`
}
swagger:response dashboardVersionResponse
type DashboardVersionsResponse ¶
type DashboardVersionsResponse struct {
// in: body
Body []dashver.DashboardVersionMeta `json:"body"`
}
swagger:response dashboardVersionsResponse
type DashboardsTagsResponse ¶
type DashboardsTagsResponse struct {
// in: body
Body []*dashboards.DashboardTagCloudItem `json:"body"`
}
swagger:response getDashboardsTagsResponse
type DatasourceProxyDELETEByUIDcallsParams ¶
type DatasourceProxyDELETEByUIDcallsParams struct {
// in:path
// required:true
DatasourceUID string `json:"uid"`
}
swagger:parameters datasourceProxyDELETEByUIDcalls
type DatasourceProxyDELETEcallsParams ¶
type DatasourceProxyDELETEcallsParams struct {
// in:path
// required:true
DatasourceID string `json:"id"`
}
swagger:parameters datasourceProxyDELETEcalls
type DatasourceProxyGETByUIDcallsParams ¶
type DatasourceProxyGETByUIDcallsParams struct {
// in:path
// required:true
DatasourceProxyRoute string `json:"datasource_proxy_route"`
// in:path
// required:true
DatasourceUID string `json:"uid"`
}
swagger:parameters datasourceProxyGETByUIDcalls
type DatasourceProxyGETcallsParams ¶
type DatasourceProxyGETcallsParams struct {
// in:path
// required:true
DatasourceProxyRoute string `json:"datasource_proxy_route"`
// in:path
// required:true
DatasourceID string `json:"id"`
}
swagger:parameters datasourceProxyGETcalls
type DatasourceProxyPOSTByUIDcallsParams ¶
type DatasourceProxyPOSTByUIDcallsParams struct {
// in:body
// required:true
DatasourceProxyParam any
// in:path
// required:true
DatasourceProxyRoute string `json:"datasource_proxy_route"`
// in:path
// required:true
DatasourceUID string `json:"uid"`
}
swagger:parameters datasourceProxyPOSTByUIDcalls
type DatasourceProxyPOSTcallsParams ¶
type DatasourceProxyPOSTcallsParams struct {
// in:body
// required:true
DatasourceProxyParam any
// in:path
// required:true
DatasourceProxyRoute string `json:"datasource_proxy_route"`
// in:path
// required:true
DatasourceID string `json:"id"`
}
swagger:parameters datasourceProxyPOSTcalls
type DatasourceProxyRouteParam ¶
type DatasourceProxyRouteParam struct {
// in:path
// required:true
DatasourceProxyRoute string `json:"datasource_proxy_route"`
}
swagger:parameters datasourceProxyDELETEcalls swagger:parameters datasourceProxyDELETEByUIDcalls swagger:parameters callDatasourceResourceWithUID callDatasourceResourceByID
type DeleteAPIkeyParams ¶
type DeleteAPIkeyParams struct {
// in:path
// required:true
ID int64 `json:"id"`
}
swagger:parameters deleteAPIkey
type DeleteAnnotationByIDParams ¶
type DeleteAnnotationByIDParams struct {
// in:path
// required:true
AnnotationID string `json:"annotation_id"`
}
swagger:parameters deleteAnnotationByID
type DeleteDashboardByUIDParams ¶
type DeleteDashboardByUIDParams struct {
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters deleteDashboardByUID
type DeleteDashboardResponse ¶
type DeleteDashboardResponse struct {
// The response message
// in: body
Body struct {
// UID Identifier of the deleted dashboard.
// required: true
// example: 65
UID string `json:"uid"`
// Title Title of the deleted dashboard.
// required: true
// example: My Dashboard
Title string `json:"title"`
// Message Message of the deleted dashboard.
// required: true
// example: Dashboard My Dashboard deleted
Message string `json:"message"`
} `json:"body"`
}
swagger:response deleteDashboardResponse
type DeleteDashboardSnapshotParams ¶
type DeleteDashboardSnapshotParams struct {
// in:path
Key string `json:"key"`
}
swagger:parameters deleteDashboardSnapshot
type DeleteDataSourceByIDParams ¶
type DeleteDataSourceByIDParams struct {
// in:path
// required:true
DatasourceID string `json:"id"`
}
swagger:parameters deleteDataSourceByID
type DeleteDataSourceByNameParams ¶
type DeleteDataSourceByNameParams struct {
// in:path
// required:true
DatasourceName string `json:"name"`
}
swagger:parameters deleteDataSourceByName
type DeleteDataSourceByNameResponse ¶
type DeleteDataSourceByNameResponse struct {
// The response message
// in: body
Body struct {
// ID Identifier of the deleted data source.
// required: true
// example: 65
ID int64 `json:"id"`
// Message Message of the deleted dashboard.
// required: true
// example: Dashboard My Dashboard deleted
Message string `json:"message"`
} `json:"body"`
}
swagger:response deleteDataSourceByNameResponse
type DeleteDataSourceByUIDParams ¶
type DeleteDataSourceByUIDParams struct {
// in:path
// required:true
DatasourceUID string `json:"uid"`
}
swagger:parameters deleteDataSourceByUID
type DeleteFolderParams ¶
type DeleteFolderParams struct {
// in:path
// required:true
FolderUID string `json:"folder_uid"`
// If `true` any Grafana 8 Alerts under this folder will be deleted.
// Set to `false` so that the request will fail if the folder contains any Grafana 8 Alerts.
// in:query
// required:false
// default:false
ForceDeleteRules bool `json:"forceDeleteRules"`
}
swagger:parameters deleteFolder
type DeleteFolderResponse ¶
type DeleteFolderResponse struct {
// The response message
// in: body
Body struct {
// ID Identifier of the deleted folder.
// required: true
// example: 65
ID int64 `json:"id"`
// Title of the deleted folder.
// required: true
// example: My Folder
Title string `json:"title"`
// Message Message of the deleted folder.
// required: true
// example: Folder My Folder deleted
Message string `json:"message"`
} `json:"body"`
}
swagger:response deleteFolderResponse
type DeleteOrgByIDParams ¶
type DeleteOrgByIDParams struct {
// in:path
// required:true
OrgID int64 `json:"org_id"`
}
swagger:parameters deleteOrgByID
type DeletePlaylistParams ¶
type DeletePlaylistParams struct {
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters deletePlaylist
type DeleteSnapshotByDeleteKeyParams ¶
type DeleteSnapshotByDeleteKeyParams struct {
// in:path
DeleteKey string `json:"deleteKey"`
}
swagger:parameters deleteDashboardSnapshotByDeleteKey
type ErrorResponseBody ¶
type ErrorResponseBody struct {
// a human readable version of the error
// required: true
Message string `json:"message"`
// Error An optional detailed description of the actual error. Only included if running in developer mode.
Error string `json:"error"`
// Status An optional status to denote the cause of the error.
//
// For example, a 412 Precondition Failed error may include additional information of why that error happened.
Status string `json:"status"`
}
type FolderResponse ¶
swagger:response folderResponse
type ForbiddenError ¶
type ForbiddenError GenericError
ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
swagger:response forbiddenError
type ForbiddenPublicError ¶
type ForbiddenPublicError PublicErrorResponse
ForbiddenPublicError is returned if the user/token has insufficient permissions to access the requested resource.
swagger:response forbiddenPublicError
type GenericError ¶
type GenericError struct {
// The response message
// in: body
Body ErrorResponseBody `json:"body"`
}
A GenericError is the default error message that is generated. For certain status codes there are more appropriate error structures.
swagger:response genericError
type GetAPIkeyResponse ¶
type GetAPIkeyResponse struct {
// The response message
// in: body
Body []*dtos.ApiKeyDTO `json:"body"`
}
swagger:response getAPIkeyResponse
type GetAPIkeysParams ¶
type GetAPIkeysParams struct {
// Show expired keys
// in:query
// required:false
// default:false
IncludeExpired bool `json:"includeExpired"`
}
swagger:parameters getAPIkeys
type GetAnnotationByIDParams ¶
type GetAnnotationByIDParams struct {
// in:path
// required:true
AnnotationID string `json:"annotation_id"`
}
swagger:parameters getAnnotationByID
type GetAnnotationByIDResponse ¶
type GetAnnotationByIDResponse struct {
// The response message
// in: body
Body *annotations.ItemDTO `json:"body"`
}
swagger:response getAnnotationByIDResponse
type GetAnnotationTagsParams ¶
type GetAnnotationTagsParams struct {
// Tag is a string that you can use to filter tags.
// in:query
// required:false
Tag string `json:"tag"`
// Max limit for results returned.
// in:query
// required:false
// default: 100
Limit string `json:"limit"`
}
swagger:parameters getAnnotationTags
type GetAnnotationTagsResponse ¶
type GetAnnotationTagsResponse struct {
// The response message
// in: body
Body annotations.GetAnnotationTagsResponse `json:"body"`
}
swagger:response getAnnotationTagsResponse
type GetAnnotationsParams ¶
type GetAnnotationsParams struct {
// Find annotations created after specific epoch datetime in milliseconds.
// in:query
// required:false
From int64 `json:"from"`
// Find annotations created before specific epoch datetime in milliseconds.
// in:query
// required:false
To int64 `json:"to"`
// Limit response to annotations created by specific user.
// in:query
// required:false
UserID int64 `json:"userId"`
// Find annotations for a specified alert.
// in:query
// required:false
AlertID int64 `json:"alertId"`
// Find annotations that are scoped to a specific dashboard
// in:query
// required:false
DashboardID int64 `json:"dashboardId"`
// Find annotations that are scoped to a specific dashboard
// in:query
// required:false
DashboardUID string `json:"dashboardUID"`
// Find annotations that are scoped to a specific panel
// in:query
// required:false
PanelID int64 `json:"panelId"`
// Max limit for results returned.
// in:query
// required:false
Limit int64 `json:"limit"`
// Use this to filter organization annotations. Organization annotations are annotations from an annotation data source that are not connected specifically to a dashboard or panel. You can filter by multiple tags.
// in:query
// required:false
// type: array
// collectionFormat: multi
Tags []string `json:"tags"`
// Return alerts or user created annotations
// in:query
// required:false
// Description:
// * `alert`
// * `annotation`
// enum: alert,annotation
Type string `json:"type"`
// Match any or all tags
// in:query
// required:false
MatchAny bool `json:"matchAny"`
}
swagger:parameters getAnnotations
type GetAnnotationsResponse ¶
type GetAnnotationsResponse struct {
// The response message
// in: body
Body []*annotations.ItemDTO `json:"body"`
}
swagger:response getAnnotationsResponse
type GetCurrentOrgResponse ¶
type GetCurrentOrgResponse struct {
// The response message
// in: body
Body org.OrgDetailsDTO `json:"body"`
}
swagger:response getCurrentOrgResponse
type GetDashboardByUIDParams ¶
type GetDashboardByUIDParams struct {
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters getDashboardByUID
type GetDashboardPermissionsListByIDParams ¶
type GetDashboardPermissionsListByIDParams struct {
// in:path
DashboardID int64
}
swagger:parameters getDashboardPermissionsListByID
type GetDashboardPermissionsListByUIDParams ¶
type GetDashboardPermissionsListByUIDParams struct {
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters getDashboardPermissionsListByUID
type GetDashboardPermissionsResponse ¶
type GetDashboardPermissionsResponse struct {
// in: body
Body []*dashboards.DashboardACLInfoDTO `json:"body"`
}
swagger:response getDashboardPermissionsListResponse
type GetDashboardSnapshotParams ¶
type GetDashboardSnapshotParams struct {
// in:path
Key string `json:"key"`
}
swagger:parameters getDashboardSnapshot
type GetDashboardSnapshotResponse ¶
type GetDashboardSnapshotResponse DashboardResponse
swagger:response getDashboardSnapshotResponse
type GetDashboardVersionByIDParams ¶
type GetDashboardVersionByIDParams struct {
// in:path
DashboardID int64
// in:path
DashboardVersionID int64
}
swagger:parameters getDashboardVersionByID
type GetDashboardVersionByUIDParams ¶
type GetDashboardVersionByUIDParams struct {
// in:path
DashboardVersionID int64
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters getDashboardVersionByUID
type GetDashboardVersionsByIDParams ¶
type GetDashboardVersionsByIDParams struct {
// in:path
DashboardID int64
}
swagger:parameters getDashboardVersionsByID
type GetDashboardVersionsByUIDParams ¶
type GetDashboardVersionsByUIDParams struct {
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters getDashboardVersionsByUID
type GetDashboardVersionsParams ¶
type GetDashboardVersionsParams struct {
// Maximum number of results to return
// in:query
// required:false
// default:0
Limit int `json:"limit"`
// Version to start from when returning queries
// in:query
// required:false
// default:0
Start int `json:"start"`
}
swagger:parameters getDashboardVersions getDashboardVersionsByUID
type GetDataSourceByIDParams ¶
type GetDataSourceByIDParams struct {
// in:path
// required:true
DatasourceID string `json:"id"`
}
swagger:parameters getDataSourceByID
type GetDataSourceByNameParams ¶
type GetDataSourceByNameParams struct {
// in:path
// required:true
DatasourceName string `json:"name"`
}
swagger:parameters getDataSourceByName
type GetDataSourceByUIDParams ¶
type GetDataSourceByUIDParams struct {
// in:path
// required:true
DatasourceUID string `json:"uid"`
}
swagger:parameters getDataSourceByUID
type GetDataSourceIDresponse ¶
type GetDataSourceIDresponse struct {
// The response message
// in: body
Body struct {
// ID Identifier of the data source.
// required: true
// example: 65
ID int64 `json:"id"`
} `json:"body"`
}
swagger:response getDataSourceIDResponse
type GetDataSourceIdByNameParams ¶
type GetDataSourceIdByNameParams struct {
// in:path
// required:true
DatasourceName string `json:"name"`
}
swagger:parameters getDataSourceIdByName
type GetDataSourceResponse ¶
type GetDataSourceResponse struct {
// The response message
// in: body
Body dtos.DataSource `json:"body"`
}
swagger:response getDataSourceResponse
type GetDataSourcesResponse ¶
type GetDataSourcesResponse struct {
// The response message
// in: body
Body dtos.DataSourceList `json:"body"`
}
swagger:response getDataSourcesResponse
type GetFolderByIDParams ¶
type GetFolderByIDParams struct {
// in:path
// required:true
//
// Deprecated: use FolderUID instead
FolderID int64 `json:"folder_id"`
}
swagger:parameters getFolderByID
type GetFolderByUIDParams ¶
type GetFolderByUIDParams struct {
// in:path
// required:true
FolderUID string `json:"folder_uid"`
}
swagger:parameters getFolderByUID
type GetFolderDescendantCountsParams ¶
type GetFolderDescendantCountsParams struct {
// in:path
// required:true
FolderUID string `json:"folder_uid"`
}
swagger:parameters getFolderDescendantCounts
type GetFolderDescendantCountsResponse ¶
type GetFolderDescendantCountsResponse struct {
// The response message
// in: body
Body folder.DescendantCounts `json:"body"`
}
swagger:response getFolderDescendantCountsResponse
type GetFolderPermissionListParams ¶
type GetFolderPermissionListParams struct {
// in:path
// required:true
FolderUID string `json:"folder_uid"`
}
swagger:parameters getFolderPermissionList
type GetFolderPermissionsResponse ¶
type GetFolderPermissionsResponse struct {
// in: body
Body []*dashboards.DashboardACLInfoDTO `json:"body"`
}
swagger:response getFolderPermissionListResponse
type GetFoldersParams ¶
type GetFoldersParams struct {
// Limit the maximum number of folders to return
// in:query
// required:false
// default:1000
Limit int64 `json:"limit"`
// Page index for starting fetching folders
// in:query
// required:false
// default:1
Page int64 `json:"page"`
// The parent folder UID
// in:query
// required:false
ParentUID string `json:"parentUid"`
// Set to `Edit` to return folders that the user can edit
// in:query
// required: false
// default:View
// Enum: Edit,View
Permission string `json:"permission"`
}
swagger:parameters getFolders
type GetFoldersResponse ¶
type GetFoldersResponse struct {
// The response message
// in: body
Body []dtos.FolderSearchHit `json:"body"`
}
swagger:response getFoldersResponse
type GetHomeDashboardResponse ¶
type GetHomeDashboardResponse struct {
// in: body
Body GetHomeDashboardResponseBody `json:"body"`
}
swagger:response getHomeDashboardResponse
type GetHomeDashboardResponseBody ¶
type GetHomeDashboardResponseBody struct {
// swagger:allOf
// required: false
dtos.DashboardFullWithMeta
// swagger:allOf
// required: false
dtos.DashboardRedirect
}
Get home dashboard response. swagger:model GetHomeDashboardResponse
type GetOrgByIDParams ¶
type GetOrgByIDParams struct {
// in:path
// required:true
OrgID int64 `json:"org_id"`
}
swagger:parameters getOrgByID
type GetOrgByIDResponse ¶
type GetOrgByIDResponse struct {
// The response message
// in: body
Body org.OrgDetailsDTO `json:"body"`
}
swagger:response getOrgByIDResponse
type GetOrgByNameParams ¶
type GetOrgByNameParams struct {
// in:path
// required:true
OrgName string `json:"org_name"`
}
swagger:parameters getOrgByName
type GetOrgByNameResponse ¶
type GetOrgByNameResponse struct {
// The response message
// in: body
Body org.OrgDetailsDTO `json:"body"`
}
swagger:response getOrgByNameResponse
type GetOrgQuotaParams ¶
type GetOrgQuotaParams struct {
// in:path
// required:true
OrgID int64 `json:"org_id"`
}
swagger:parameters getOrgQuota
type GetOrgUsersForCurrentOrgLookupResponse ¶
type GetOrgUsersForCurrentOrgLookupResponse struct {
// The response message
// in: body
Body []*dtos.UserLookupDTO `json:"body"`
}
swagger:response getOrgUsersForCurrentOrgLookupResponse
type GetOrgUsersForCurrentOrgResponse ¶
type GetOrgUsersForCurrentOrgResponse struct {
// The response message
// in: body
Body []*org.OrgUserDTO `json:"body"`
}
swagger:response getOrgUsersForCurrentOrgResponse
type GetOrgUsersParams ¶
type GetOrgUsersParams struct {
// in:path
// required:true
OrgID int64 `json:"org_id"`
}
swagger:parameters getOrgUsers
type GetOrgUsersResponse ¶
type GetOrgUsersResponse struct {
// The response message/
// in: body
Body []*org.OrgUserDTO `json:"body"`
}
swagger:response getOrgUsersResponse
type GetPendingOrgInvitesResponse ¶
type GetPendingOrgInvitesResponse struct {
// The response message
// in: body
Body []*tempuser.TempUserDTO `json:"body"`
}
swagger:response getPendingOrgInvitesResponse
type GetPlaylistDashboardsParams ¶
type GetPlaylistDashboardsParams struct {
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters getPlaylistDashboards
type GetPlaylistDashboardsResponse ¶
type GetPlaylistDashboardsResponse struct {
// The response message
// in: body
Body dtos.PlaylistDashboardsSlice `json:"body"`
}
swagger:response getPlaylistDashboardsResponse
type GetPlaylistItemsParams ¶
type GetPlaylistItemsParams struct {
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters getPlaylistItems
type GetPlaylistItemsResponse ¶
type GetPlaylistItemsResponse struct {
// The response message
// in: body
Body []playlist.PlaylistItemDTO `json:"body"`
}
swagger:response getPlaylistItemsResponse
type GetPlaylistParams ¶
type GetPlaylistParams struct {
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters getPlaylist
type GetPlaylistResponse ¶
type GetPlaylistResponse struct {
// The response message
// in: body
Body *playlist.PlaylistDTO `json:"body"`
}
swagger:response getPlaylistResponse
type GetPreferencesResponse ¶
type GetPreferencesResponse struct {
// in:body
Body preferences.Spec `json:"body"`
}
swagger:response getPreferencesResponse
type GetQuotaResponseResponse ¶
swagger:response getQuotaResponse
type GetSettingsResponse ¶
type GetSettingsResponse struct {
// in:body
Body setting.SettingsBag `json:"body"`
}
swagger:response adminGetSettingsResponse
type GetSharingOptionsResponse ¶
type GetSharingOptionsResponse struct {
// in:body
Body struct {
ExternalSnapshotURL string `json:"externalSnapshotURL"`
ExternalSnapshotName string `json:"externalSnapshotName"`
ExternalEnabled bool `json:"externalEnabled"`
} `json:"body"`
}
swagger:response getSharingOptionsResponse
type GetSignedInUserOrgListResponse ¶
type GetSignedInUserOrgListResponse struct {
// The response message
// in: body
Body []*org.UserOrgDTO `json:"body"`
}
swagger:response getSignedInUserOrgListResponse
type GetSignedInUserTeamListResponse ¶
type GetSignedInUserTeamListResponse struct {
// The response message
// in: body
Body []*team.TeamDTO `json:"body"`
}
swagger:response getSignedInUserTeamListResponse
type GetSnapshotsParams ¶
type GetSnapshotsParams struct {
// Search Query
// in:query
Query string `json:"query"`
// Limit the number of returned results
// in:query
// default:1000
Limit int64 `json:"limit"`
}
swagger:parameters searchDashboardSnapshots
type GetStatsResponse ¶
type GetStatsResponse struct {
// in:body
Body stats.AdminStats `json:"body"`
}
swagger:response adminGetStatsResponse
type GetUserAuthTokensResponse ¶
swagger:response getUserAuthTokensResponse
type GetUserByIDParams ¶
type GetUserByIDParams struct {
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters getUserByID
type GetUserByLoginOrEmailParams ¶
type GetUserByLoginOrEmailParams struct {
// loginOrEmail of the user
// in:query
// required:true
LoginOrEmail string `json:"loginOrEmail"`
}
swagger:parameters getUserByLoginOrEmail
type GetUserOrgListParams ¶
type GetUserOrgListParams struct {
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters getUserOrgList
type GetUserOrgListResponse ¶
type GetUserOrgListResponse struct {
// The response message
// in: body
Body []*org.UserOrgDTO `json:"body"`
}
swagger:response getUserOrgListResponse
type GetUserQuotaParams ¶
type GetUserQuotaParams struct {
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters getUserQuota
type GetUserTeamsParams ¶
type GetUserTeamsParams struct {
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters getUserTeams
type GetUserTeamsResponse ¶
type GetUserTeamsResponse struct {
// The response message
// in: body
Body []*team.TeamDTO `json:"body"`
}
swagger:response getUserTeamsResponse
type HTTPServer ¶
type HTTPServer struct {
RouteRegister routing.RouteRegister
RenderService rendering.Service
Cfg *setting.Cfg
Features featuremgmt.FeatureToggles
SettingsProvider setting.Provider
HooksService *hooks.HooksService
CacheService *localcache.CacheService
DataSourceCache datasources.CacheService
AuthTokenService auth.UserTokenService
QuotaService quota.Service
RemoteCacheService *remotecache.RemoteCache
ProvisioningService provisioning.ProvisioningService
License licensing.Licensing
AccessControl accesscontrol.AccessControl
DataProxy *datasourceproxy.DataSourceProxyService
PluginRequestValidator validations.PluginRequestValidator
SearchService search.Service
ShortURLService shorturls.Service
QueryHistoryService queryhistory.Service
CorrelationsService correlations.Service
Live *live.GrafanaLive
LivePushGateway *pushhttp.Gateway
StorageService store.StorageService
SearchV2HTTPService searchV2.SearchHTTPService
ContextHandler *contexthandler.ContextHandler
LoggerMiddleware loggermw.Logger
SQLStore db.DB
AlertNG *ngalert.AlertNG
LibraryPanelService librarypanels.Service
LibraryElementService libraryelements.Service
SocialService social.Service
Listener net.Listener
EncryptionService encryption.Internal
SecretsService secrets.Service
DataSourcesService datasources.DataSourceService
NotificationService notifications.Service
DashboardService dashboards.DashboardService
PluginSettings pluginSettings.Service
AvatarCacheServer *avatar.AvatarCacheServer
Csrf csrf.Service
PublicDashboardsApi *publicdashboardsApi.Api
// contains filtered or unexported fields
}
func ProvideHTTPServer ¶
func ProvideHTTPServer(opts ServerOptions, cfg *setting.Cfg, routeRegister routing.RouteRegister, bus bus.Bus, renderService rendering.Service, licensing licensing.Licensing, hooksService *hooks.HooksService, cacheService *localcache.CacheService, sqlStore db.DB, pluginRequestValidator validations.PluginRequestValidator, pluginStaticRouteResolver plugins.StaticRouteResolver, pluginDashboardService plugindashboards.Service, pluginStore pluginstore.Store, pluginClient plugins.Client, pluginErrorResolver plugins.ErrorResolver, pluginInstaller plugins.Installer, settingsProvider setting.Provider, dataSourceCache datasources.CacheService, userTokenService auth.UserTokenService, cleanUpService *cleanup.CleanUpService, shortURLService shorturls.Service, queryHistoryService queryhistory.Service, correlationsService correlations.Service, remoteCache *remotecache.RemoteCache, provisioningService provisioning.ProvisioningService, accessControl accesscontrol.AccessControl, dataSourceProxy *datasourceproxy.DataSourceProxyService, searchService *search.SearchService, live *live.GrafanaLive, livePushGateway *pushhttp.Gateway, plugCtxProvider *plugincontext.Provider, contextHandler *contexthandler.ContextHandler, loggerMiddleware loggermw.Logger, features featuremgmt.FeatureToggles, alertNG *ngalert.AlertNG, libraryPanelService librarypanels.Service, libraryElementService libraryelements.Service, quotaService quota.Service, socialService social.Service, tracer tracing.Tracer, encryptionService encryption.Internal, grafanaUpdateChecker *updatechecker.GrafanaService, pluginsUpdateChecker *updatechecker.PluginsService, searchUsersService searchusers.Service, dataSourcesService datasources.DataSourceService, queryDataService query.Service, pluginFileStore plugins.FileStore, serviceaccountsService serviceaccounts.Service, authInfoService login.AuthInfoService, storageService store.StorageService, notificationService notifications.Service, dashboardService dashboards.DashboardService, dashboardProvisioningService dashboards.DashboardProvisioningService, folderService folder.Service, dsGuardian guardian.DatasourceGuardianProvider, dashboardsnapshotsService dashboardsnapshots.Service, pluginSettings pluginSettings.Service, avatarCacheServer *avatar.AvatarCacheServer, preferenceService pref.Service, folderPermissionsService accesscontrol.FolderPermissionsService, dashboardPermissionsService accesscontrol.DashboardPermissionsService, dashboardVersionService dashver.Service, starService star.Service, csrfService csrf.Service, playlistService playlist.Service, apiKeyService apikey.Service, kvStore kvstore.KVStore, secretsMigrator secrets.Migrator, secretsPluginManager plugins.SecretsPluginManager, secretsService secrets.Service, secretsPluginMigrator spm.SecretMigrationProvider, secretsStore secretsKV.SecretsKVStore, publicDashboardsApi *publicdashboardsApi.Api, userService user.Service, tempUserService tempUser.Service, loginAttemptService loginAttempt.Service, orgService org.Service, teamService team.Service, accesscontrolService accesscontrol.Service, navTreeService navtree.Service, annotationRepo annotations.Repository, tagService tag.Service, searchv2HTTPService searchV2.SearchHTTPService, oauthTokenService oauthtoken.OAuthTokenService, statsService stats.Service, authnService authn.Service, pluginsCDNService *pluginscdn.Service, promGatherer prometheus.Gatherer, starApi *starApi.API, promRegister prometheus.Registerer, clientConfigProvider grafanaapiserver.DirectRestConfigProvider, anonService anonymous.Service, userVerifier user.Verifier, ) (*HTTPServer, error)
func (*HTTPServer) AddAPIKey
deprecated
func (hs *HTTPServer) AddAPIKey(c *contextmodel.ReqContext) response.Response
swagger:route POST /auth/keys api_keys addAPIkey
Creates an API key.
Will return details of the created API key.
Deprecated: true Deprecated. Please use POST /api/serviceaccounts and POST /api/serviceaccounts/{id}/tokens
Responses: 200: postAPIkeyResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 409: conflictError 500: internalServerError
func (*HTTPServer) AddDataSource ¶
func (hs *HTTPServer) AddDataSource(c *contextmodel.ReqContext) response.Response
swagger:route POST /datasources datasources addDataSource
Create a data source.
By defining `password` and `basicAuthPassword` under secureJsonData property Grafana encrypts them securely as an encrypted blob in the database. The response then lists the encrypted fields under secureJsonFields.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:create`
Responses: 200: createOrUpdateDatasourceResponse 401: unauthorisedError 403: forbiddenError 409: conflictError 500: internalServerError
func (*HTTPServer) AddMiddleware ¶
func (hs *HTTPServer) AddMiddleware(middleware web.Handler)
func (*HTTPServer) AddNamedMiddleware ¶
func (hs *HTTPServer) AddNamedMiddleware(middleware routing.RegisterNamedMiddleware)
func (*HTTPServer) AddOrgInvite ¶
func (hs *HTTPServer) AddOrgInvite(c *contextmodel.ReqContext) response.Response
swagger:route POST /org/invites org_invites addOrgInvite
Add invite.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 412: SMTPNotEnabledError 500: internalServerError
func (*HTTPServer) AddOrgUser ¶
func (hs *HTTPServer) AddOrgUser(c *contextmodel.ReqContext) response.Response
swagger:route POST /orgs/{org_id}/users orgs addOrgUser
Add a new user to the current organization.
Adds a global user to the current organization.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `org.users:add` with scope `users:*`.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) AddOrgUserToCurrentOrg ¶
func (hs *HTTPServer) AddOrgUserToCurrentOrg(c *contextmodel.ReqContext) response.Response
swagger:route POST /org/users org addOrgUserToCurrentOrg
Add a new user to the current organization.
Adds a global user to the current organization.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `org.users:add` with scope `users:*`.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) AdminCreateUser ¶
func (hs *HTTPServer) AdminCreateUser(c *contextmodel.ReqContext) response.Response
swagger:route POST /admin/users admin_users adminCreateUser
Create new user.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:create`. Note that OrgId is an optional parameter that can be used to assign a new user to a different organization when `auto_assign_org` is set to `true`.
Security: - basic:
Responses: 200: adminCreateUserResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 412: preconditionFailedError 500: internalServerError
func (*HTTPServer) AdminDeleteAllSecretsManagerPluginSecrets ¶
func (hs *HTTPServer) AdminDeleteAllSecretsManagerPluginSecrets(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) AdminDeleteUser ¶
func (hs *HTTPServer) AdminDeleteUser(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /admin/users/{user_id} admin_users adminDeleteUser
Delete global User.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:delete` and scope `global.users:*`.
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) AdminDisableUser ¶
func (hs *HTTPServer) AdminDisableUser(c *contextmodel.ReqContext) response.Response
swagger:route POST /admin/users/{user_id}/disable admin_users adminDisableUser
Disable user.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:disable` and scope `global.users:1` (userIDScope).
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) AdminEnableUser ¶
func (hs *HTTPServer) AdminEnableUser(c *contextmodel.ReqContext) response.Response
swagger:route POST /admin/users/{user_id}/enable admin_users adminEnableUser
Enable user.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:enable` and scope `global.users:1` (userIDScope).
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) AdminGetSettings ¶
func (hs *HTTPServer) AdminGetSettings(c *contextmodel.ReqContext) response.Response
swagger:route GET /admin/settings admin adminGetSettings
Fetch settings.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `settings:read` and scopes: `settings:*`, `settings:auth.saml:` and `settings:auth.saml:enabled` (property level).
Security: - basic:
Responses: 200: adminGetSettingsResponse 401: unauthorisedError 403: forbiddenError
func (*HTTPServer) AdminGetStats ¶
func (hs *HTTPServer) AdminGetStats(c *contextmodel.ReqContext) response.Response
swagger:route GET /admin/stats admin adminGetStats
Fetch Grafana Stats.
Only works with Basic Authentication (username and password). See introduction for an explanation. If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `server:stats:read`.
Responses: 200: adminGetStatsResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) AdminGetUserAuthTokens ¶
func (hs *HTTPServer) AdminGetUserAuthTokens(c *contextmodel.ReqContext) response.Response
swagger:route GET /admin/users/{user_id}/auth-tokens admin_users adminGetUserAuthTokens
Return a list of all auth tokens (devices) that the user currently have logged in from. If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:list` and scope `global.users:*`.
Security: - basic:
Responses: 200: adminGetUserAuthTokensResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) AdminGetVerboseSettings ¶
func (hs *HTTPServer) AdminGetVerboseSettings(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) AdminLogoutUser ¶
func (hs *HTTPServer) AdminLogoutUser(c *contextmodel.ReqContext) response.Response
swagger:route POST /admin/users/{user_id}/logout admin_users adminLogoutUser
Logout user revokes all auth tokens (devices) for the user. User of issued auth tokens (devices) will no longer be logged in and will be required to authenticate again upon next activity. If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.logout` and scope `global.users:*`.
Security: - basic:
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) AdminMigrateSecretsFromPlugin ¶
func (hs *HTTPServer) AdminMigrateSecretsFromPlugin(c *contextmodel.ReqContext) response.Response
To migrate from the plugin, it must be installed only as it is possible the user disabled it and then wants to migrate
func (*HTTPServer) AdminMigrateSecretsToPlugin ¶
func (hs *HTTPServer) AdminMigrateSecretsToPlugin(c *contextmodel.ReqContext) response.Response
To migrate to the plugin, it must be installed and configured so as not to lose access to migrated secrets
func (*HTTPServer) AdminProvisioningReloadAlerting ¶
func (hs *HTTPServer) AdminProvisioningReloadAlerting(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) AdminProvisioningReloadDashboards ¶
func (hs *HTTPServer) AdminProvisioningReloadDashboards(c *contextmodel.ReqContext) response.Response
swagger:route POST /admin/provisioning/dashboards/reload admin_provisioning adminProvisioningReloadDashboards
Reload dashboard provisioning configurations.
Reloads the provisioning config files for dashboards again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning. If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:dashboards`.
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) AdminProvisioningReloadDatasources ¶
func (hs *HTTPServer) AdminProvisioningReloadDatasources(c *contextmodel.ReqContext) response.Response
swagger:route POST /admin/provisioning/datasources/reload admin_provisioning adminProvisioningReloadDatasources
Reload datasource provisioning configurations.
Reloads the provisioning config files for datasources again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning. If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:datasources`.
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) AdminProvisioningReloadPlugins ¶
func (hs *HTTPServer) AdminProvisioningReloadPlugins(c *contextmodel.ReqContext) response.Response
swagger:route POST /admin/provisioning/plugins/reload admin_provisioning adminProvisioningReloadPlugins
Reload plugin provisioning configurations.
Reloads the provisioning config files for plugins again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning. If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:plugin`.
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) AdminReEncryptEncryptionKeys ¶
func (hs *HTTPServer) AdminReEncryptEncryptionKeys(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) AdminReEncryptSecrets ¶
func (hs *HTTPServer) AdminReEncryptSecrets(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) AdminRevokeUserAuthToken ¶
func (hs *HTTPServer) AdminRevokeUserAuthToken(c *contextmodel.ReqContext) response.Response
swagger:route POST /admin/users/{user_id}/revoke-auth-token admin_users adminRevokeUserAuthToken
Revoke auth token for user.
Revokes the given auth token (device) for the user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity. If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:update` and scope `global.users:*`.
Security: - basic:
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) AdminRollbackSecrets ¶
func (hs *HTTPServer) AdminRollbackSecrets(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) AdminRotateDataEncryptionKeys ¶
func (hs *HTTPServer) AdminRotateDataEncryptionKeys(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) AdminUpdateUserPassword ¶
func (hs *HTTPServer) AdminUpdateUserPassword(c *contextmodel.ReqContext) response.Response
swagger:route PUT /admin/users/{user_id}/password admin_users adminUpdateUserPassword
Set password for user.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.password:update` and scope `global.users:*`.
Security: - basic:
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) AdminUpdateUserPermissions ¶
func (hs *HTTPServer) AdminUpdateUserPermissions(c *contextmodel.ReqContext) response.Response
swagger:route PUT /admin/users/{user_id}/permissions admin_users adminUpdateUserPermissions
Set permissions for user.
Only works with Basic Authentication (username and password). See introduction for an explanation. If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.permissions:update` and scope `global.users:*`.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) CalculateDashboardDiff ¶
func (hs *HTTPServer) CalculateDashboardDiff(c *contextmodel.ReqContext) response.Response
swagger:route POST /dashboards/calculate-diff dashboards calculateDashboardDiff
Perform diff on two dashboards.
Produces: - application/json - text/html
Responses: 200: calculateDashboardDiffResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) CallDatasourceResource
deprecated
func (hs *HTTPServer) CallDatasourceResource(c *contextmodel.ReqContext)
swagger:route GET /datasources/{id}/resources/{datasource_proxy_route} datasources callDatasourceResourceByID
Fetch data source resources by Id.
Please refer to [updated API](#/datasources/callDatasourceResourceWithUID) instead
Deprecated: true
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) CallDatasourceResourceWithUID ¶
func (hs *HTTPServer) CallDatasourceResourceWithUID(c *contextmodel.ReqContext)
swagger:route GET /datasources/uid/{uid}/resources/{datasource_proxy_route} datasources callDatasourceResourceWithUID
Fetch data source resources.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) CallResource ¶
func (hs *HTTPServer) CallResource(c *contextmodel.ReqContext)
CallResource passes a resource call from a plugin to the backend plugin.
/api/plugins/:pluginId/resources/*
func (*HTTPServer) ChangeActiveOrgAndRedirectToHome ¶
func (hs *HTTPServer) ChangeActiveOrgAndRedirectToHome(c *contextmodel.ReqContext)
GET /profile/switch-org/:id
func (*HTTPServer) ChangeUserPassword ¶
func (hs *HTTPServer) ChangeUserPassword(c *contextmodel.ReqContext) response.Response
swagger:route PUT /user/password signed_in_user changeUserPassword
Change Password.
Changes the password for the user.
Security: - basic:
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) CheckDatasourceHealth
deprecated
func (hs *HTTPServer) CheckDatasourceHealth(c *contextmodel.ReqContext) response.Response
swagger:route GET /datasources/{id}/health datasources checkDatasourceHealthByID
Sends a health check request to the plugin datasource identified by the ID.
Please refer to [updated API](#/datasources/checkDatasourceHealthWithUID) instead
Deprecated: true
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) CheckDatasourceHealthWithUID ¶
func (hs *HTTPServer) CheckDatasourceHealthWithUID(c *contextmodel.ReqContext) response.Response
swagger:route GET /datasources/uid/{uid}/health datasources checkDatasourceHealthWithUID
Sends a health check request to the plugin datasource identified by the UID.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) CheckHealth ¶
func (hs *HTTPServer) CheckHealth(c *contextmodel.ReqContext) response.Response
CheckHealth returns the health of a plugin. /api/plugins/:pluginId/health
func (*HTTPServer) ClearHelpFlags ¶
func (hs *HTTPServer) ClearHelpFlags(c *contextmodel.ReqContext) response.Response
swagger:route GET /user/helpflags/clear signed_in_user clearHelpFlags
Clear user help flag.
Responses: 200: helpFlagResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) CollectPluginMetrics ¶
func (hs *HTTPServer) CollectPluginMetrics(c *contextmodel.ReqContext) response.Response
CollectPluginMetrics collect metrics from a plugin.
/api/plugins/:pluginId/metrics
func (*HTTPServer) CompleteInvite ¶
func (hs *HTTPServer) CompleteInvite(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) CookieOptionsFromCfg ¶
func (hs *HTTPServer) CookieOptionsFromCfg() cookies.CookieOptions
func (*HTTPServer) CreateDashboardSnapshot ¶
func (hs *HTTPServer) CreateDashboardSnapshot(c *contextmodel.ReqContext)
swagger:route POST /snapshots snapshots createDashboardSnapshot
When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI.
Snapshot public mode should be enabled or authentication is required.
Responses: 200: createDashboardSnapshotResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) CreateFolder ¶
func (hs *HTTPServer) CreateFolder(c *contextmodel.ReqContext) response.Response
swagger:route POST /folders folders createFolder
Create folder.
If nested folders are enabled then it additionally expects the parent folder UID.
Responses: 200: folderResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 409: conflictError 500: internalServerError
func (*HTTPServer) CreateOrg ¶
func (hs *HTTPServer) CreateOrg(c *contextmodel.ReqContext) response.Response
swagger:route POST /orgs orgs createOrg
Create Organization.
Only works if [users.allow_org_create](https://grafana.com/docs/grafana/latest/administration/configuration/#allow_org_create) is set.
Responses: 200: createOrgResponse 401: unauthorisedError 403: forbiddenError 409: conflictError 500: internalServerError
func (*HTTPServer) CreatePlaylist ¶
func (hs *HTTPServer) CreatePlaylist(c *contextmodel.ReqContext) response.Response
swagger:route POST /playlists playlists createPlaylist
Create playlist.
Responses: 200: createPlaylistResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteAPIKey
deprecated
func (hs *HTTPServer) DeleteAPIKey(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /auth/keys/{id} api_keys deleteAPIkey
Delete API key.
Deletes an API key. Deprecated. See: https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-the-api.
Deprecated: true Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteAnnotationByID ¶
func (hs *HTTPServer) DeleteAnnotationByID(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /annotations/{annotation_id} annotations deleteAnnotationByID
Delete Annotation By ID.
Deletes the annotation that matches the specified ID.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) DeleteDashboardByUID ¶
func (hs *HTTPServer) DeleteDashboardByUID(c *contextmodel.ReqContext) response.Response
DeleteDashboardByUID swagger:route DELETE /dashboards/uid/{uid} dashboards deleteDashboardByUID
Delete dashboard by uid.
Will delete the dashboard given the specified unique identifier (uid).
Responses: 200: deleteDashboardResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteDashboardSnapshot ¶
func (hs *HTTPServer) DeleteDashboardSnapshot(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /snapshots/{key} snapshots deleteDashboardSnapshot
Delete Snapshot by Key.
Responses: 200: okResponse 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteDashboardSnapshotByDeleteKey ¶
func (hs *HTTPServer) DeleteDashboardSnapshotByDeleteKey(c *contextmodel.ReqContext) response.Response
swagger:route GET /snapshots-delete/{deleteKey} snapshots deleteDashboardSnapshotByDeleteKey
Delete Snapshot by deleteKey.
Snapshot public mode should be enabled or authentication is required.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteDataSourceById
deprecated
func (hs *HTTPServer) DeleteDataSourceById(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /datasources/{id} datasources deleteDataSourceByID
Delete an existing data source by id.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).
Please refer to [updated API](#/datasources/deleteDataSourceByUID) instead
Deprecated: true
Responses: 200: okResponse 401: unauthorisedError 404: notFoundError 403: forbiddenError 500: internalServerError
func (*HTTPServer) DeleteDataSourceByName ¶
func (hs *HTTPServer) DeleteDataSourceByName(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /datasources/name/{name} datasources deleteDataSourceByName
Delete an existing data source by name.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).
Responses: 200: deleteDataSourceByNameResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteDataSourceByUID ¶
func (hs *HTTPServer) DeleteDataSourceByUID(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /datasources/uid/{uid} datasources deleteDataSourceByUID
Delete an existing data source by UID.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteFolder ¶
func (hs *HTTPServer) DeleteFolder(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /folders/{folder_uid} folders deleteFolder
Delete folder.
Deletes an existing folder identified by UID along with all dashboards (and their alerts) stored in the folder. This operation cannot be reverted. If nested folders are enabled then it also deletes all the subfolders.
Responses: 200: deleteFolderResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteOrgByID ¶
func (hs *HTTPServer) DeleteOrgByID(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /orgs/{org_id} orgs deleteOrgByID
Delete Organization.
Security: - basic:
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeletePlaylist ¶
func (hs *HTTPServer) DeletePlaylist(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /playlists/{uid} playlists deletePlaylist
Delete playlist.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetAPIKeys
deprecated
func (hs *HTTPServer) GetAPIKeys(c *contextmodel.ReqContext) response.Response
swagger:route GET /auth/keys api_keys getAPIkeys
Get auth keys.
Will return auth keys.
Deprecated: true.
Deprecated. Please use GET /api/serviceaccounts and GET /api/serviceaccounts/{id}/tokens instead see https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-the-api.
Responses: 200: getAPIkeyResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetAlertNotifiers ¶
func (hs *HTTPServer) GetAlertNotifiers() func(*contextmodel.ReqContext) response.Response
func (*HTTPServer) GetAnnotationByID ¶
func (hs *HTTPServer) GetAnnotationByID(c *contextmodel.ReqContext) response.Response
swagger:route GET /annotations/{annotation_id} annotations getAnnotationByID
Get Annotation by ID.
Responses: 200: getAnnotationByIDResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) GetAnnotationTags ¶
func (hs *HTTPServer) GetAnnotationTags(c *contextmodel.ReqContext) response.Response
swagger:route GET /annotations/tags annotations getAnnotationTags
Find Annotations Tags.
Find all the event tags created in the annotations.
Responses: 200: getAnnotationTagsResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) GetAnnotations ¶
func (hs *HTTPServer) GetAnnotations(c *contextmodel.ReqContext) response.Response
swagger:route GET /annotations annotations getAnnotations
Find Annotations.
Starting in Grafana v6.4 regions annotations are now returned in one entity that now includes the timeEnd property.
Responses: 200: getAnnotationsResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) GetCertificate ¶
func (hs *HTTPServer) GetCertificate(*tls.ClientHelloInfo) (*tls.Certificate, error)
func (*HTTPServer) GetCurrentOrg ¶
func (hs *HTTPServer) GetCurrentOrg(c *contextmodel.ReqContext) response.Response
swagger:route GET /org org getCurrentOrg
Get current Organization.
Responses: 200: getCurrentOrgResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetCurrentOrgQuotas ¶
func (hs *HTTPServer) GetCurrentOrgQuotas(c *contextmodel.ReqContext) response.Response
swagger:route GET /org/quotas getCurrentOrg getCurrentOrgQuota
Fetch Organization quota.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope).
Responses: 200: getQuotaResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetDashboard ¶
func (hs *HTTPServer) GetDashboard(c *contextmodel.ReqContext) response.Response
swagger:route GET /dashboards/uid/{uid} dashboards getDashboardByUID
Get dashboard by uid.
Will return the dashboard given the dashboard unique identifier (uid).
Responses: 200: dashboardResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetDashboardPermissionList
deprecated
func (hs *HTTPServer) GetDashboardPermissionList(c *contextmodel.ReqContext) response.Response
swagger:route GET /dashboards/id/{DashboardID}/permissions dashboard_permissions getDashboardPermissionsListByID
Gets all existing permissions for the given dashboard.
Please refer to [updated API](#/dashboard_permissions/getDashboardPermissionsListByUID) instead
Deprecated: true
Responses: 200: getDashboardPermissionsListResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetDashboardSnapshot ¶
func (hs *HTTPServer) GetDashboardSnapshot(c *contextmodel.ReqContext) response.Response
GET /api/snapshots/:key swagger:route GET /snapshots/{key} snapshots getDashboardSnapshot
Get Snapshot by Key.
Responses: 200: getDashboardSnapshotResponse 400: badRequestError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetDashboardTags ¶
func (hs *HTTPServer) GetDashboardTags(c *contextmodel.ReqContext)
swagger:route GET /dashboards/tags dashboards getDashboardTags
Get all dashboards tags of an organisation.
Responses: 200: getDashboardsTagsResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) GetDashboardUIDs ¶
func (hs *HTTPServer) GetDashboardUIDs(c *contextmodel.ReqContext)
GetDashboardUIDs converts internal ids to UIDs
func (*HTTPServer) GetDashboardVersion ¶
func (hs *HTTPServer) GetDashboardVersion(c *contextmodel.ReqContext) response.Response
swagger:route GET /dashboards/uid/{uid}/versions/{DashboardVersionID} dashboard_versions getDashboardVersionByUID
Get a specific dashboard version using UID.
Responses: 200: dashboardVersionResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetDashboardVersions ¶
func (hs *HTTPServer) GetDashboardVersions(c *contextmodel.ReqContext) response.Response
swagger:route GET /dashboards/uid/{uid}/versions dashboard_versions getDashboardVersionsByUID
Gets all existing versions for the dashboard using UID.
Responses: 200: dashboardVersionsResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetDataSourceById
deprecated
func (hs *HTTPServer) GetDataSourceById(c *contextmodel.ReqContext) response.Response
swagger:route GET /datasources/{id} datasources getDataSourceByID
Get a single data source by Id.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).
Please refer to [updated API](#/datasources/getDataSourceByUID) instead
Deprecated: true
Responses: 200: getDataSourceResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetDataSourceByName ¶
func (hs *HTTPServer) GetDataSourceByName(c *contextmodel.ReqContext) response.Response
swagger:route GET /datasources/name/{name} datasources getDataSourceByName
Get a single data source by Name.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).
Responses: 200: getDataSourceResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetDataSourceByUID ¶
func (hs *HTTPServer) GetDataSourceByUID(c *contextmodel.ReqContext) response.Response
swagger:route GET /datasources/uid/{uid} datasources getDataSourceByUID
Get a single data source by UID.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).
Responses: 200: getDataSourceResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetDataSourceIdByName ¶
func (hs *HTTPServer) GetDataSourceIdByName(c *contextmodel.ReqContext) response.Response
swagger:route GET /datasources/id/{name} datasources getDataSourceIdByName
Get data source Id by Name.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).
Responses: 200: getDataSourceIDResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetDataSources ¶
func (hs *HTTPServer) GetDataSources(c *contextmodel.ReqContext) response.Response
swagger:route GET /datasources datasources getDataSources
Get all data sources.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:read` and scope: `datasources:*`.
Responses: 200: getDataSourcesResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetFolderByID
deprecated
func (hs *HTTPServer) GetFolderByID(c *contextmodel.ReqContext) response.Response
swagger:route GET /folders/id/{folder_id} folders getFolderByID
Get folder by id.
Returns the folder identified by id. This is deprecated. Please refer to [updated API](#/folders/getFolderByUID) instead
Deprecated: true
Responses: 200: folderResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetFolderByUID ¶
func (hs *HTTPServer) GetFolderByUID(c *contextmodel.ReqContext) response.Response
swagger:route GET /folders/{folder_uid} folders getFolderByUID
Get folder by uid.
Responses: 200: folderResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetFolderDescendantCounts ¶
func (hs *HTTPServer) GetFolderDescendantCounts(c *contextmodel.ReqContext) response.Response
swagger:route GET /folders/{folder_uid}/counts folders getFolderDescendantCounts
Gets the count of each descendant of a folder by kind. The folder is identified by UID.
Responses: 200: getFolderDescendantCountsResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetFolderPermissionList ¶
func (hs *HTTPServer) GetFolderPermissionList(c *contextmodel.ReqContext) response.Response
swagger:route GET /folders/{folder_uid}/permissions folder_permissions getFolderPermissionList
Gets all existing permissions for the folder with the given `uid`.
Responses: 200: getFolderPermissionListResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetFolders ¶
func (hs *HTTPServer) GetFolders(c *contextmodel.ReqContext) response.Response
swagger:route GET /folders folders getFolders
Get all folders.
It returns all folders that the authenticated user has permission to view. If nested folders are enabled, it expects an additional query parameter with the parent folder UID and returns the immediate subfolders that the authenticated user has permission to view. If the parameter is not supplied then it returns immediate subfolders under the root that the authenticated user has permission to view.
Responses: 200: getFoldersResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetFrontendAssets ¶
func (hs *HTTPServer) GetFrontendAssets(c *contextmodel.ReqContext)
Returns a file that is easy to check for changes Any changes to the file means we should refresh the frontend
func (*HTTPServer) GetFrontendSettings ¶
func (hs *HTTPServer) GetFrontendSettings(c *contextmodel.ReqContext)
func (*HTTPServer) GetHomeDashboard ¶
func (hs *HTTPServer) GetHomeDashboard(c *contextmodel.ReqContext) response.Response
swagger:route GET /dashboards/home dashboards getHomeDashboard
Get home dashboard.
Responses: 200: getHomeDashboardResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) GetInviteInfoByCode ¶
func (hs *HTTPServer) GetInviteInfoByCode(c *contextmodel.ReqContext) response.Response
GetInviteInfoByCode gets a pending user invite corresponding to a certain code. A response containing an InviteInfo object is returned if the invite is found. If a (pending) invite is not found, 404 is returned.
func (*HTTPServer) GetOrgByID ¶
func (hs *HTTPServer) GetOrgByID(c *contextmodel.ReqContext) response.Response
swagger:route GET /orgs/{org_id} orgs getOrgByID
Get Organization by ID.
Security: - basic:
Responses: 200: getOrgByIDResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetOrgByName ¶
func (hs *HTTPServer) GetOrgByName(c *contextmodel.ReqContext) response.Response
swagger:route GET /orgs/name/{org_name} orgs getOrgByName
Get Organization by ID.
Security: - basic:
Responses: 200: getOrgByNameResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetOrgPreferences ¶
func (hs *HTTPServer) GetOrgPreferences(c *contextmodel.ReqContext) response.Response
swagger:route GET /org/preferences org_preferences getOrgPreferences
Get Current Org Prefs.
Responses: 200: getPreferencesResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetOrgQuotas ¶
func (hs *HTTPServer) GetOrgQuotas(c *contextmodel.ReqContext) response.Response
swagger:route GET /orgs/{org_id}/quotas orgs getOrgQuota
Fetch Organization quota.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope).
Responses: 200: getQuotaResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetOrgUsers ¶
func (hs *HTTPServer) GetOrgUsers(c *contextmodel.ReqContext) response.Response
swagger:route GET /orgs/{org_id}/users orgs getOrgUsers
Get Users in Organization.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `org.users:read` with scope `users:*`.
Security: - basic:
Responses: 200: getOrgUsersResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetOrgUsersForCurrentOrg ¶
func (hs *HTTPServer) GetOrgUsersForCurrentOrg(c *contextmodel.ReqContext) response.Response
swagger:route GET /org/users org getOrgUsersForCurrentOrg
Get all users within the current organization.
Returns all org users within the current organization. Accessible to users with org admin role. If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `org.users:read` with scope `users:*`.
Responses: 200: getOrgUsersForCurrentOrgResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetOrgUsersForCurrentOrgLookup ¶
func (hs *HTTPServer) GetOrgUsersForCurrentOrgLookup(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) GetPendingOrgInvites ¶
func (hs *HTTPServer) GetPendingOrgInvites(c *contextmodel.ReqContext) response.Response
swagger:route GET /org/invites org_invites getPendingOrgInvites
Get pending invites.
Responses: 200: getPendingOrgInvitesResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetPlaylist ¶
func (hs *HTTPServer) GetPlaylist(c *contextmodel.ReqContext) response.Response
swagger:route GET /playlists/{uid} playlists getPlaylist
Get playlist.
Responses: 200: getPlaylistResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetPlaylistItems ¶
func (hs *HTTPServer) GetPlaylistItems(c *contextmodel.ReqContext) response.Response
swagger:route GET /playlists/{uid}/items playlists getPlaylistItems
Get playlist items.
Responses: 200: getPlaylistItemsResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetPluginDashboards ¶
func (hs *HTTPServer) GetPluginDashboards(c *contextmodel.ReqContext) response.Response
GetPluginDashboards get plugin dashboards.
/api/plugins/:pluginId/dashboards
func (*HTTPServer) GetPluginErrorsList ¶
func (hs *HTTPServer) GetPluginErrorsList(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) GetPluginList ¶
func (hs *HTTPServer) GetPluginList(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) GetPluginMarkdown ¶
func (hs *HTTPServer) GetPluginMarkdown(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) GetPluginSettingByID ¶
func (hs *HTTPServer) GetPluginSettingByID(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) GetRedirectURL ¶
func (hs *HTTPServer) GetRedirectURL(c *contextmodel.ReqContext) string
func (*HTTPServer) GetSharingOptions ¶
func (hs *HTTPServer) GetSharingOptions(c *contextmodel.ReqContext)
swagger:route GET /snapshot/shared-options snapshots getSharingOptions
Get snapshot sharing settings.
Responses: 200: getSharingOptionsResponse 401: unauthorisedError
func (*HTTPServer) GetSignUpOptions ¶
func (hs *HTTPServer) GetSignUpOptions(c *contextmodel.ReqContext) response.Response
GET /api/user/signup/options
func (*HTTPServer) GetSignedInUser ¶
func (hs *HTTPServer) GetSignedInUser(c *contextmodel.ReqContext) response.Response
swagger:route GET /user signed_in_user getSignedInUser
Get (current authenticated user)
Responses: 200: userResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetSignedInUserOrgList ¶
func (hs *HTTPServer) GetSignedInUserOrgList(c *contextmodel.ReqContext) response.Response
swagger:route GET /user/orgs signed_in_user getSignedInUserOrgList
Organizations of the actual User.
Return a list of all organizations of the current user.
Security: - basic:
Responses: 200: getSignedInUserOrgListResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetSignedInUserTeamList ¶
func (hs *HTTPServer) GetSignedInUserTeamList(c *contextmodel.ReqContext) response.Response
swagger:route GET /user/teams signed_in_user getSignedInUserTeamList
Teams that the actual User is member of.
Return a list of all teams that the current user is member of.
Responses: 200: getSignedInUserTeamListResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetUserAuthTokens ¶
func (hs *HTTPServer) GetUserAuthTokens(c *contextmodel.ReqContext) response.Response
swagger:route GET /user/auth-tokens signed_in_user getUserAuthTokens
Auth tokens of the actual User.
Return a list of all auth tokens (devices) that the actual user currently have logged in from.
Responses: 200: getUserAuthTokensResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetUserByID ¶
func (hs *HTTPServer) GetUserByID(c *contextmodel.ReqContext) response.Response
swagger:route GET /users/{user_id} users getUserByID
Get user by id.
Responses: 200: userResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetUserByLoginOrEmail ¶
func (hs *HTTPServer) GetUserByLoginOrEmail(c *contextmodel.ReqContext) response.Response
swagger:route GET /users/lookup users getUserByLoginOrEmail
Get user by login or email.
Responses: 200: userResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetUserOrgList ¶
func (hs *HTTPServer) GetUserOrgList(c *contextmodel.ReqContext) response.Response
swagger:route GET /users/{user_id}/orgs users getUserOrgList
Get organizations for user.
Get organizations for user identified by id.
Responses: 200: getUserOrgListResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetUserPreferences ¶
func (hs *HTTPServer) GetUserPreferences(c *contextmodel.ReqContext) response.Response
swagger:route GET /user/preferences user_preferences getUserPreferences
Get user preferences.
Responses: 200: getPreferencesResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) GetUserQuotas ¶
func (hs *HTTPServer) GetUserQuotas(c *contextmodel.ReqContext) response.Response
swagger:route GET /user/quotas signed_in_user getUserQuotas
Fetch user quota.
Responses: 200: getQuotaResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetUserTeams ¶
func (hs *HTTPServer) GetUserTeams(c *contextmodel.ReqContext) response.Response
swagger:route GET /users/{user_id}/teams users getUserTeams
Get teams for user.
Get teams for user identified by id.
Responses: 200: getUserTeamsResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) HardDeleteDashboardByUID ¶
func (hs *HTTPServer) HardDeleteDashboardByUID(c *contextmodel.ReqContext) response.Response
HardDeleteDashboardByUID swagger:route DELETE /dashboards/uid/{uid}/trash dashboards hardDeleteDashboardByUID
Hard delete dashboard by uid.
Will delete the dashboard given the specified unique identifier (uid).
Responses: 200: deleteDashboardResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) Index ¶
func (hs *HTTPServer) Index(c *contextmodel.ReqContext)
func (*HTTPServer) InstallPlugin ¶
func (hs *HTTPServer) InstallPlugin(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) ListSortOptions ¶
func (hs *HTTPServer) ListSortOptions(c *contextmodel.ReqContext) response.Response
swagger:route GET /search/sorting search listSortOptions
List search sorting options.
Responses: 200: listSortOptionsResponse 401: unauthorisedError
func (*HTTPServer) LoginAPIPing ¶
func (hs *HTTPServer) LoginAPIPing(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) LoginPost ¶
func (hs *HTTPServer) LoginPost(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) LoginView ¶
func (hs *HTTPServer) LoginView(c *contextmodel.ReqContext)
func (*HTTPServer) Logout ¶
func (hs *HTTPServer) Logout(c *contextmodel.ReqContext)
func (*HTTPServer) MassDeleteAnnotations ¶
func (hs *HTTPServer) MassDeleteAnnotations(c *contextmodel.ReqContext) response.Response
swagger:route POST /annotations/mass-delete annotations massDeleteAnnotations
Delete multiple annotations.
Responses: 200: okResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) MoveFolder ¶
func (hs *HTTPServer) MoveFolder(c *contextmodel.ReqContext) response.Response
swagger:route POST /folders/{folder_uid}/move folders moveFolder
Move folder.
Responses: 200: folderResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) NotFoundHandler ¶
func (hs *HTTPServer) NotFoundHandler(c *contextmodel.ReqContext)
func (*HTTPServer) OAuthLogin ¶
func (hs *HTTPServer) OAuthLogin(reqCtx *contextmodel.ReqContext)
func (*HTTPServer) PatchAnnotation ¶
func (hs *HTTPServer) PatchAnnotation(c *contextmodel.ReqContext) response.Response
swagger:route PATCH /annotations/{annotation_id} annotations patchAnnotation
Patch Annotation.
Updates one or more properties of an annotation that matches the specified ID. This operation currently supports updating of the `text`, `tags`, `time` and `timeEnd` properties. This is available in Grafana 6.0.0-beta2 and above.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) PatchOrgPreferences ¶
func (hs *HTTPServer) PatchOrgPreferences(c *contextmodel.ReqContext) response.Response
swagger:route PATCH /org/preferences org_preferences patchOrgPreferences
Patch Current Org Prefs.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) PatchUserPreferences ¶
func (hs *HTTPServer) PatchUserPreferences(c *contextmodel.ReqContext) response.Response
swagger:route PATCH /user/preferences user_preferences patchUserPreferences
Patch user preferences.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 500: internalServerError
func (*HTTPServer) PostAnnotation ¶
func (hs *HTTPServer) PostAnnotation(c *contextmodel.ReqContext) response.Response
swagger:route POST /annotations annotations postAnnotation
Create Annotation.
Creates an annotation in the Grafana database. The dashboardId and panelId fields are optional. If they are not specified then an organization annotation is created and can be queried in any dashboard that adds the Grafana annotations data source. When creating a region annotation include the timeEnd property. The format for `time` and `timeEnd` should be epoch numbers in millisecond resolution. The response for this HTTP request is slightly different in versions prior to v6.4. In prior versions you would also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and timeEnd properties.
Responses: 200: postAnnotationResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) PostDashboard ¶
func (hs *HTTPServer) PostDashboard(c *contextmodel.ReqContext) response.Response
swagger:route POST /dashboards/db dashboards postDashboard
Create / Update dashboard
Creates a new dashboard or updates an existing dashboard. Note: This endpoint is not intended for creating folders, use `POST /api/folders` for that.
Responses: 200: postDashboardResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 412: preconditionFailedError 422: unprocessableEntityError 500: internalServerError
func (*HTTPServer) PostFrontendMetrics ¶
func (hs *HTTPServer) PostFrontendMetrics(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) PostGraphiteAnnotation ¶
func (hs *HTTPServer) PostGraphiteAnnotation(c *contextmodel.ReqContext) response.Response
swagger:route POST /annotations/graphite annotations postGraphiteAnnotation
Create Annotation in Graphite format.
Creates an annotation by using Graphite-compatible event format. The `when` and `data` fields are optional. If `when` is not specified then the current time will be used as annotation’s timestamp. The `tags` field can also be in prior to Graphite `0.10.0` format (string with multiple tags being separated by a space).
Responses: 200: postAnnotationResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) ProxyDataSourceRequest
deprecated
func (hs *HTTPServer) ProxyDataSourceRequest(c *contextmodel.ReqContext)
swagger:route DELETE /datasources/proxy/{id}/{datasource_proxy_route} datasources datasourceProxyDELETEcalls
Data source proxy DELETE calls.
Proxies all calls to the actual data source.
Please refer to [updated API](#/datasources/datasourceProxyDELETEByUIDcalls) instead
Deprecated: true
Responses: 202: 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) ProxyDataSourceRequestWithUID ¶
func (hs *HTTPServer) ProxyDataSourceRequestWithUID(c *contextmodel.ReqContext)
swagger:route DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route} datasources datasourceProxyDELETEByUIDcalls
Data source proxy DELETE calls.
Proxies all calls to the actual data source.
Responses: 202: 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) ProxyGnetRequest ¶
func (hs *HTTPServer) ProxyGnetRequest(c *contextmodel.ReqContext)
func (*HTTPServer) ProxyPluginRequest ¶
func (hs *HTTPServer) ProxyPluginRequest(c *contextmodel.ReqContext)
func (*HTTPServer) QueryMetricsV2 ¶
func (hs *HTTPServer) QueryMetricsV2(c *contextmodel.ReqContext) response.Response
QueryMetricsV2 returns query metrics. swagger:route POST /ds/query ds queryMetricsWithExpressions
DataSource query metrics with expressions.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:query`.
Responses: 200: queryMetricsWithExpressionsRespons 207: queryMetricsWithExpressionsRespons 401: unauthorisedError 400: badRequestError 403: forbiddenError 500: internalServerError
func (*HTTPServer) RedirectResponseWithError ¶
func (hs *HTTPServer) RedirectResponseWithError(c *contextmodel.ReqContext, err error, v ...any) *response.RedirectResponse
func (*HTTPServer) RemoveOrgUser ¶
func (hs *HTTPServer) RemoveOrgUser(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /orgs/{org_id}/users/{user_id} orgs removeOrgUser
Delete user in current organization.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `org.users:remove` with scope `users:*`.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) RemoveOrgUserForCurrentOrg ¶
func (hs *HTTPServer) RemoveOrgUserForCurrentOrg(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /org/users/{user_id} org removeOrgUserForCurrentOrg
Delete user in current organization.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `org.users:remove` with scope `users:*`.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) RenderHandler ¶
func (hs *HTTPServer) RenderHandler(c *contextmodel.ReqContext)
func (*HTTPServer) ResetPassword ¶
func (hs *HTTPServer) ResetPassword(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) RestoreDashboardVersion ¶
func (hs *HTTPServer) RestoreDashboardVersion(c *contextmodel.ReqContext) response.Response
swagger:route POST /dashboards/uid/{uid}/restore dashboard_versions restoreDashboardVersionByUID
Restore a dashboard to a given dashboard version using UID.
Responses: 200: postDashboardResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) RestoreDeletedDashboard ¶
func (hs *HTTPServer) RestoreDeletedDashboard(c *contextmodel.ReqContext) response.Response
swagger:route PATCH /dashboards/uid/{uid}/trash dashboards restoreDeletedDashboardByUID
Restore a dashboard to a given dashboard version using UID.
Responses: 200: postDashboardResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) RevokeInvite ¶
func (hs *HTTPServer) RevokeInvite(c *contextmodel.ReqContext) response.Response
swagger:route DELETE /org/invites/{invitation_code}/revoke org_invites revokeInvite
Revoke invite.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) RevokeUserAuthToken ¶
func (hs *HTTPServer) RevokeUserAuthToken(c *contextmodel.ReqContext) response.Response
swagger:route POST /user/revoke-auth-token signed_in_user revokeUserAuthToken
Revoke an auth token of the actual User.
Revokes the given auth token (device) for the actual user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) RotateUserAuthToken ¶
func (hs *HTTPServer) RotateUserAuthToken(c *contextmodel.ReqContext) response.Response
swagger:route POST /user/auth-tokens/rotate
Rotate the auth token of the caller ¶
Rotate the token of caller, if successful send a new session cookie.
Responses: 200: okResponse 401: unauthorisedError 404: notFoundError 500: internalServerError
func (*HTTPServer) RotateUserAuthTokenRedirect ¶
func (hs *HTTPServer) RotateUserAuthTokenRedirect(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) Search ¶
func (hs *HTTPServer) Search(c *contextmodel.ReqContext) response.Response
swagger:route GET /search search search
Responses: 200: searchResponse 401: unauthorisedError 422: unprocessableEntityError 500: internalServerError
func (*HTTPServer) SearchDashboardSnapshots ¶
func (hs *HTTPServer) SearchDashboardSnapshots(c *contextmodel.ReqContext) response.Response
swagger:route GET /dashboard/snapshots snapshots searchDashboardSnapshots
List snapshots.
Responses: 200: searchDashboardSnapshotsResponse 500: internalServerError
func (*HTTPServer) SearchOrgUsers ¶
func (hs *HTTPServer) SearchOrgUsers(c *contextmodel.ReqContext) response.Response
swagger:route GET /orgs/{org_id}/users/search orgs searchOrgUsers
Search Users in Organization.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `org.users:read` with scope `users:*`.
Security: - basic:
Responses: 200: searchOrgUsersResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) SearchOrgUsersWithPaging ¶
func (hs *HTTPServer) SearchOrgUsersWithPaging(c *contextmodel.ReqContext) response.Response
SearchOrgUsersWithPaging is an HTTP handler to search for org users with paging. GET /api/org/users/search
func (*HTTPServer) SearchOrgs ¶
func (hs *HTTPServer) SearchOrgs(c *contextmodel.ReqContext) response.Response
swagger:route GET /orgs orgs searchOrgs
Search all Organizations.
Security: - basic:
Responses: 200: searchOrgsResponse 401: unauthorisedError 403: forbiddenError 409: conflictError 500: internalServerError
func (*HTTPServer) SearchPlaylists ¶
func (hs *HTTPServer) SearchPlaylists(c *contextmodel.ReqContext) response.Response
swagger:route GET /playlists playlists searchPlaylists
Get playlists.
Responses: 200: searchPlaylistsResponse 500: internalServerError
func (*HTTPServer) SendResetPasswordEmail ¶
func (hs *HTTPServer) SendResetPasswordEmail(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) SetHelpFlag ¶
func (hs *HTTPServer) SetHelpFlag(c *contextmodel.ReqContext) response.Response
swagger:route PUT /user/helpflags/{flag_id} signed_in_user setHelpFlag
Set user help flag.
Responses: 200: helpFlagResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) SetHomeDashboard ¶
func (hs *HTTPServer) SetHomeDashboard(c *contextmodel.ReqContext) response.Response
POST /api/preferences/set-home-dash
func (*HTTPServer) SignUp ¶
func (hs *HTTPServer) SignUp(c *contextmodel.ReqContext) response.Response
POST /api/user/signup
func (*HTTPServer) SignUpStep2 ¶
func (hs *HTTPServer) SignUpStep2(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) SoftDeleteDashboard ¶
func (hs *HTTPServer) SoftDeleteDashboard(c *contextmodel.ReqContext) response.Response
SoftDeleteDashboard swagger:route DELETE /dashboards/uid/{uid} dashboards deleteDashboardByUID
Delete dashboard by uid.
Will delete the dashboard given the specified unique identifier (uid).
Responses: 200: deleteDashboardResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) StartEmailVerificaton ¶
func (hs *HTTPServer) StartEmailVerificaton(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) UninstallPlugin ¶
func (hs *HTTPServer) UninstallPlugin(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) UpdateAnnotation ¶
func (hs *HTTPServer) UpdateAnnotation(c *contextmodel.ReqContext) response.Response
swagger:route PUT /annotations/{annotation_id} annotations updateAnnotation
Update Annotation.
Updates all properties of an annotation that matches the specified id. To only update certain property, consider using the Patch Annotation operation.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdateCurrentOrg ¶
func (hs *HTTPServer) UpdateCurrentOrg(c *contextmodel.ReqContext) response.Response
swagger:route PUT /org org updateCurrentOrg
Update current Organization.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdateCurrentOrgAddress ¶
func (hs *HTTPServer) UpdateCurrentOrgAddress(c *contextmodel.ReqContext) response.Response
swagger:route PUT /org/address org updateCurrentOrgAddress
Update current Organization's address.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdateDashboardPermissions
deprecated
func (hs *HTTPServer) UpdateDashboardPermissions(c *contextmodel.ReqContext) response.Response
swagger:route POST /dashboards/id/{DashboardID}/permissions dashboard_permissions updateDashboardPermissionsByID
Updates permissions for a dashboard.
Please refer to [updated API](#/dashboard_permissions/updateDashboardPermissionsByUID) instead
This operation will remove existing permissions if they’re not included in the request.
Deprecated: true
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) UpdateDataSourceByID ¶
func (hs *HTTPServer) UpdateDataSourceByID(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) UpdateDataSourceByUID ¶
func (hs *HTTPServer) UpdateDataSourceByUID(c *contextmodel.ReqContext) response.Response
swagger:route PUT /datasources/uid/{uid} datasources updateDataSourceByUID
Update an existing data source.
Similar to creating a data source, `password` and `basicAuthPassword` should be defined under secureJsonData in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under secureJsonFields section in the response.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).
Responses: 200: createOrUpdateDatasourceResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdateFolder ¶
func (hs *HTTPServer) UpdateFolder(c *contextmodel.ReqContext) response.Response
swagger:route PUT /folders/{folder_uid} folders updateFolder
Update folder.
Responses: 200: folderResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 409: conflictError 500: internalServerError
func (*HTTPServer) UpdateFolderPermissions ¶
func (hs *HTTPServer) UpdateFolderPermissions(c *contextmodel.ReqContext) response.Response
swagger:route POST /folders/{folder_uid}/permissions folder_permissions updateFolderPermissions
Updates permissions for a folder. This operation will remove existing permissions if they’re not included in the request.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) UpdateOrg ¶
func (hs *HTTPServer) UpdateOrg(c *contextmodel.ReqContext) response.Response
swagger:route PUT /orgs/{org_id} orgs updateOrg
Update Organization.
Security: - basic:
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdateOrgAddress ¶
func (hs *HTTPServer) UpdateOrgAddress(c *contextmodel.ReqContext) response.Response
swagger:route PUT /orgs/{org_id}/address orgs updateOrgAddress
Update Organization's address.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdateOrgPreferences ¶
func (hs *HTTPServer) UpdateOrgPreferences(c *contextmodel.ReqContext) response.Response
swagger:route PUT /org/preferences org_preferences updateOrgPreferences
Update Current Org Prefs.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdateOrgQuota ¶
func (hs *HTTPServer) UpdateOrgQuota(c *contextmodel.ReqContext) response.Response
swagger:route PUT /orgs/{org_id}/quotas/{quota_target} orgs updateOrgQuota
Update user quota.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:write` and scope `org:id:1` (orgIDScope).
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) UpdateOrgUser ¶
func (hs *HTTPServer) UpdateOrgUser(c *contextmodel.ReqContext) response.Response
swagger:route PATCH /orgs/{org_id}/users/{user_id} orgs updateOrgUser
Update Users in Organization.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `org.users.role:update` with scope `users:*`.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdateOrgUserForCurrentOrg ¶
func (hs *HTTPServer) UpdateOrgUserForCurrentOrg(c *contextmodel.ReqContext) response.Response
swagger:route PATCH /org/users/{user_id} org updateOrgUserForCurrentOrg
Updates the given user.
If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `org.users.role:update` with scope `users:*`.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdatePlaylist ¶
func (hs *HTTPServer) UpdatePlaylist(c *contextmodel.ReqContext) response.Response
swagger:route PUT /playlists/{uid} playlists updatePlaylist
Update playlist.
Responses: 200: updatePlaylistResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) UpdatePluginSetting ¶
func (hs *HTTPServer) UpdatePluginSetting(c *contextmodel.ReqContext) response.Response
func (*HTTPServer) UpdateSignedInUser ¶
func (hs *HTTPServer) UpdateSignedInUser(c *contextmodel.ReqContext) response.Response
swagger:route PUT /user signed_in_user updateSignedInUser
Update signed in User.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 409: conflictError 500: internalServerError
func (*HTTPServer) UpdateUser ¶
func (hs *HTTPServer) UpdateUser(c *contextmodel.ReqContext) response.Response
swagger:route PUT /users/{user_id} users updateUser
Update user.
Update the user identified by id.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 409: conflictError 500: internalServerError
func (*HTTPServer) UpdateUserActiveOrg ¶
func (hs *HTTPServer) UpdateUserActiveOrg(c *contextmodel.ReqContext) response.Response
POST /api/users/:id/using/:orgId
func (*HTTPServer) UpdateUserEmail ¶
func (hs *HTTPServer) UpdateUserEmail(c *contextmodel.ReqContext) response.Response
swagger:route GET /user/email/update user updateUserEmail
Update user email.
Update the email of user given a verification code.
Responses: 302: okResponse
func (*HTTPServer) UpdateUserPreferences ¶
func (hs *HTTPServer) UpdateUserPreferences(c *contextmodel.ReqContext) response.Response
swagger:route PUT /user/preferences user_preferences updateUserPreferences
Update user preferences.
Omitting a key (`theme`, `homeDashboardId`, `timezone`) will cause the current value to be replaced with the system default value.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 500: internalServerError
func (*HTTPServer) UpdateUserQuota ¶
func (hs *HTTPServer) UpdateUserQuota(c *contextmodel.ReqContext) response.Response
swagger:route PUT /admin/users/{user_id}/quotas/{quota_target} admin_users updateUserQuota
Update user quota.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.quotas:update` and scope `global.users:1` (userIDScope).
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) UserSetUsingOrg ¶
func (hs *HTTPServer) UserSetUsingOrg(c *contextmodel.ReqContext) response.Response
swagger:route POST /user/using/{org_id} signed_in_user userSetUsingOrg
Switch user context for signed in user.
Switch user context to the given organization.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) ValidateRedirectTo ¶
func (hs *HTTPServer) ValidateRedirectTo(redirectTo string) error
func (*HTTPServer) WatchAndUpdateCerts ¶
func (hs *HTTPServer) WatchAndUpdateCerts(ctx context.Context)
fsnotify module can be used to detect file changes and based on the event certs can be reloaded since it adds a direct dependency for the optional feature. So that is the reason periodic watching of cert files is chosen. If fsnotify is added as direct dependency in future, then the implementation can be revisited to align to fsnotify.
type HardDeleteDashboardByUIDParams ¶
type HardDeleteDashboardByUIDParams struct {
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters hardDeleteDashboardByUID
type HelpFlagResponse ¶
type HelpFlagResponse struct {
// The response message
// in: body
Body struct {
HelpFlags1 int64 `json:"helpFlags1"`
Message string `json:"message"`
} `json:"body"`
}
swagger:response helpFlagResponse
type InternalServerError ¶
type InternalServerError GenericError
InternalServerError is a general error indicating something went wrong internally.
swagger:response internalServerError
type InternalServerPublicError ¶
type InternalServerPublicError PublicErrorResponse
InternalServerPublicError is a general error indicating something went wrong internally.
swagger:response internalServerPublicError
type ListSortOptionsResponse ¶
type ListSortOptionsResponse struct {
// in: body
Body struct {
Name string `json:"name"`
DisplayName string `json:"displayName"`
Description string `json:"description"`
Meta string `json:"meta"`
} `json:"body"`
}
swagger:response listSortOptionsResponse
type LookupOrgUsersParams ¶
type LookupOrgUsersParams struct {
// in:query
// required:false
Query string `json:"query"`
// in:query
// required:false
Limit int `json:"limit"`
}
swagger:parameters getOrgUsersForCurrentOrgLookup
type MassDeleteAnnotationsParams ¶
type MassDeleteAnnotationsParams struct {
// in:body
// required:true
Body dtos.MassDeleteAnnotationsCmd `json:"body"`
}
swagger:parameters massDeleteAnnotations
type MoveFolderParams ¶
type MoveFolderParams struct {
// in:path
// required:true
FolderUID string `json:"folder_uid"`
// in:body
// required:true
Body folder.MoveFolderCommand `json:"body"`
}
swagger:parameters moveFolder
type NotFoundError ¶
type NotFoundError GenericError
NotFoundError is returned when the requested resource was not found.
swagger:response notFoundError
type NotFoundPublicError ¶
type NotFoundPublicError PublicErrorResponse
NotFoundPublicError is returned when the requested resource was not found.
swagger:response notFoundPublicError
type OKResponse ¶
type OKResponse struct {
// in: body
Body SuccessResponseBody `json:"body"`
}
An OKResponse is returned if the request was successful.
swagger:response okResponse
type PatchAnnotationParams ¶
type PatchAnnotationParams struct {
// in:path
// required:true
AnnotationID string `json:"annotation_id"`
// in:body
// required:true
Body dtos.PatchAnnotationsCmd `json:"body"`
}
swagger:parameters patchAnnotation
type PatchOrgPreferencesParams ¶
type PatchOrgPreferencesParams struct {
// in:body
// required:true
Body dtos.PatchPrefsCmd `json:"body"`
}
swagger:parameters patchOrgPreferences
type PatchUserPreferencesParams ¶
type PatchUserPreferencesParams struct {
// in:body
// required:true
Body dtos.PatchPrefsCmd `json:"body"`
}
swagger:parameters patchUserPreferences
type PostAPIkeyResponse ¶
type PostAPIkeyResponse struct {
// The response message
// in: body
Body dtos.NewApiKeyResult `json:"body"`
}
swagger:response postAPIkeyResponse
type PostAnnotationParams ¶
type PostAnnotationParams struct {
// in:body
// required:true
Body dtos.PostAnnotationsCmd `json:"body"`
}
swagger:parameters postAnnotation
type PostAnnotationResponse ¶
type PostAnnotationResponse struct {
// The response message
// in: body
Body struct {
// ID Identifier of the created annotation.
// required: true
// example: 65
ID int64 `json:"id"`
// Message Message of the created annotation.
// required: true
Message string `json:"message"`
} `json:"body"`
}
swagger:response postAnnotationResponse
type PostDashboardParams ¶
type PostDashboardParams struct {
// in:body
// required:true
Body dashboards.SaveDashboardCommand
}
swagger:parameters postDashboard
type PostDashboardResponse ¶
type PostDashboardResponse struct {
// in: body
Body struct {
// Status status of the response.
// required: true
// example: success
Status string `json:"status"`
// Slug The slug of the dashboard.
// required: true
// example: my-dashboard
Slug string `json:"title"`
// Version The version of the dashboard.
// required: true
// example: 2
Verion int64 `json:"version"`
// ID The unique identifier (id) of the created/updated dashboard.
// required: true
// example: 1
ID int64 `json:"id"`
// UID The unique identifier (uid) of the created/updated dashboard.
// required: true
// example: nHz3SXiiz
UID string `json:"uid"`
// URL The relative URL for accessing the created/updated dashboard.
// required: true
// example: /d/nHz3SXiiz/my-dashboard
URL string `json:"url"`
// FolderUID The unique identifier (uid) of the folder the dashboard belongs to.
// required: false
FolderUID string `json:"folderUid"`
} `json:"body"`
}
swagger:response postDashboardResponse
type PostGraphiteAnnotationParams ¶
type PostGraphiteAnnotationParams struct {
// in:body
// required:true
Body dtos.PostGraphiteAnnotationsCmd `json:"body"`
}
swagger:parameters postGraphiteAnnotation
type PreconditionFailedError ¶
type PreconditionFailedError GenericError
PreconditionFailedError
swagger:response preconditionFailedError
type PublicError ¶
type PublicError struct {
// StatusCode The HTTP status code returned
// required: true
StatusCode int `json:"statusCode"`
// MessageID A unique identifier for the error
// required: true
MessageID string `json:"messageId"`
// Message A human readable message
Message string `json:"message"`
// Extra Additional information about the error
Extra map[string]any `json:"extra"`
}
PublicError is derived from Error and only contains information available to the end user. swagger:model publicError
type PublicErrorResponse ¶
type PublicErrorResponse struct {
// The response message
// in: body
Body PublicError `json:"body"`
}
swagger:response publicErrorResponse
type QueryMetricsWithExpressionsBodyParams ¶
type QueryMetricsWithExpressionsBodyParams struct {
// in:body
// required:true
Body dtos.MetricRequest `json:"body"`
}
swagger:parameters queryMetricsWithExpressions
type QueryMetricsWithExpressionsRespons ¶
type QueryMetricsWithExpressionsRespons struct {
// The response message
// in: body
Body *backend.QueryDataResponse `json:"body"`
}
swagger:response queryMetricsWithExpressionsRespons
type RemoveOrgUserForCurrentOrgParams ¶
type RemoveOrgUserForCurrentOrgParams struct {
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters removeOrgUserForCurrentOrg
type RemoveOrgUserParams ¶
type RemoveOrgUserParams struct {
// in:path
// required:true
OrgID int64 `json:"org_id"`
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters removeOrgUser
type RestoreDashboardVersionByIDParams ¶
type RestoreDashboardVersionByIDParams struct {
// in:body
// required:true
Body dtos.RestoreDashboardVersionCommand
// in:path
DashboardID int64
}
swagger:parameters restoreDashboardVersionByID
type RestoreDashboardVersionByUIDParams ¶
type RestoreDashboardVersionByUIDParams struct {
// in:body
// required:true
Body dtos.RestoreDashboardVersionCommand
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters restoreDashboardVersionByUID
type RestoreDeletedDashboardByUID ¶
type RestoreDeletedDashboardByUID struct {
// in:path
// required:true
UID string `json:"uid"`
// in:body
// required:true
Body dashboards.RestoreDeletedDashboardCommand
}
swagger:parameters restoreDeletedDashboardByUID
type RevokeInviteParams ¶
type RevokeInviteParams struct {
// in:path
// required:true
Code string `json:"invitation_code"`
}
swagger:parameters revokeInvite
type RevokeUserAuthTokenParams ¶
type RevokeUserAuthTokenParams struct {
// in:body
// required:true
Body auth.RevokeAuthTokenCmd `json:"body"`
}
swagger:parameters revokeUserAuthToken
type SMTPNotEnabledError ¶
type SMTPNotEnabledError PreconditionFailedError
swagger:response SMTPNotEnabledError
type SearchDashboardSnapshotsResponse ¶
type SearchDashboardSnapshotsResponse struct {
// in:body
Body []*dashboardsnapshots.DashboardSnapshotDTO `json:"body"`
}
swagger:response searchDashboardSnapshotsResponse
type SearchOrgParams ¶
type SearchOrgParams struct {
// in:query
// required:false
// default: 1
Page int `json:"page"`
// Number of items per page
// The totalCount field in the response can be used for pagination list E.g. if totalCount is equal to 100 teams and the perpage parameter is set to 10 then there are 10 pages of teams.
// in:query
// required:false
// default: 1000
PerPage int `json:"perpage"`
Name string `json:"name"`
// If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.
// required:false
Query string `json:"query"`
}
swagger:parameters searchOrgs
type SearchOrgUsersParams ¶
type SearchOrgUsersParams struct {
// in:path
// required:true
OrgID int64 `json:"org_id"`
}
swagger:parameters searchOrgUsers
type SearchOrgUsersResponse ¶
type SearchOrgUsersResponse struct {
// The response message
// in: body
Body *org.SearchOrgUsersQueryResult `json:"body"`
}
swagger:response searchOrgUsersResponse
type SearchOrgsResponse ¶
type SearchOrgsResponse struct {
// The response message
// in: body
Body []*org.OrgDTO `json:"body"`
}
swagger:response searchOrgsResponse
type SearchParams ¶
type SearchParams struct {
// Search Query
// in:query
// required: false
Query string `json:"query"`
// List of tags to search for
// in:query
// required: false
// type: array
// collectionFormat: multi
Tag []string `json:"tag"`
// Type to search for, dash-folder or dash-db
// in:query
// required: false
// Description:
// * `dash-folder` - Search for folder
// * `dash-db` - Seatch for dashboard
// Enum: dash-folder,dash-db
Type string `json:"type"`
// List of dashboard id’s to search for
// This is deprecated: users should use the `dashboardUIDs` query parameter instead
// in:query
// required: false
// deprecated: true
DashboardIds []int64 `json:"dashboardIds"`
// List of dashboard uid’s to search for
// in:query
// required: false
DashboardUIDs []string `json:"dashboardUIDs"`
// List of folder id’s to search in for dashboards
// If it's `0` then it will query for the top level folders
// This is deprecated: users should use the `folderUIDs` query parameter instead
// in:query
// required: false
// deprecated: true
//
// Deprecated: use FolderUIDs instead
FolderIds []int64 `json:"folderIds"`
// List of folder UID’s to search in for dashboards
// If it's an empty string then it will query for the top level folders
// in:query
// required: false
FolderUIDs []string `json:"folderUIDs"`
// Flag indicating if only starred Dashboards should be returned
// in:query
// required: false
Starred bool `json:"starred"`
// Limit the number of returned results (max 5000)
// in:query
// required: false
Limit int64 `json:"limit"`
// Use this parameter to access hits beyond limit. Numbering starts at 1. limit param acts as page size. Only available in Grafana v6.2+.
// in:query
// required: false
Page int64 `json:"page"`
// Set to `Edit` to return dashboards/folders that the user can edit
// in:query
// required: false
// default:View
// Enum: Edit,View
Permission string `json:"permission"`
// Sort method; for listing all the possible sort methods use the search sorting endpoint.
// in:query
// required: false
// default: alpha-asc
// Enum: alpha-asc,alpha-desc
Sort string `json:"sort"`
// Flag indicating if only soft deleted Dashboards should be returned
// in:query
// required: false
Deleted bool `json:"deleted"`
}
swagger:parameters search
type SearchPlaylistsParams ¶
type SearchPlaylistsParams struct {
// in:query
// required:false
Query string `json:"query"`
// in:limit
// required:false
Limit int `json:"limit"`
}
swagger:parameters searchPlaylists
type SearchPlaylistsResponse ¶
type SearchPlaylistsResponse struct {
// The response message
// in: body
Body playlist.Playlists `json:"body"`
}
swagger:response searchPlaylistsResponse
type SearchResponse ¶
swagger:response searchResponse
type SearchUsersParams ¶
type SearchUsersParams struct {
// Limit the maximum number of users to return per page
// in:query
// required:false
// default:1000
Limit int64 `json:"perpage"`
// Page index for starting fetching users
// in:query
// required:false
// default:1
Page int64 `json:"page"`
}
swagger:parameters searchUsers
type SearchUsersWithPagingParams ¶
type SearchUsersWithPagingParams struct {
// Limit the maximum number of users to return per page
// in:query
// required:false
// default:1000
Limit int64 `json:"perpage"`
// Page index for starting fetching users
// in:query
// required:false
// default:1
Page int64 `json:"page"`
// Query allows return results where the query value is contained in one of the name, login or email fields. Query values with spaces need to be URL encoded e.g. query=Jane%20Doe
// in:query
// required:false
Query string `json:"query"`
}
type ServerOptions ¶
type SetHelpFlagParams ¶
type SetHelpFlagParams struct {
// in:path
// required:true
FlagID string `json:"flag_id"`
}
swagger:parameters setHelpFlag
type SuccessResponseBody ¶
type SuccessResponseBody struct {
Message string `json:"message,omitempty"`
}
swagger:model
type UnauthorisedPublicError ¶
type UnauthorisedPublicError PublicErrorResponse
UnauthorisedPublicError is returned when the request is not authenticated.
swagger:response unauthorisedPublicError
type UnauthorizedError ¶
type UnauthorizedError GenericError
UnauthorizedError is returned when the request is not authenticated.
swagger:response unauthorisedError
type UnprocessableEntityError ¶
type UnprocessableEntityError GenericError
UnprocessableEntityError
swagger:response unprocessableEntityError
type UpdateAnnotationParams ¶
type UpdateAnnotationParams struct {
// in:path
// required:true
AnnotationID string `json:"annotation_id"`
// in:body
// required:true
Body dtos.UpdateAnnotationsCmd `json:"body"`
}
swagger:parameters updateAnnotation
type UpdateCurrentOrgAddressParams ¶
type UpdateCurrentOrgAddressParams struct {
// in:body
// required:true
Body dtos.UpdateOrgAddressForm `json:"body"`
}
swagger:parameters updateCurrentOrgAddress
type UpdateCurrentOrgParams ¶
type UpdateCurrentOrgParams struct {
// in:body
// required:true
Body dtos.UpdateOrgForm `json:"body"`
}
swagger:parameters updateCurrentOrg
type UpdateCurrentOrgUserParams ¶
type UpdateCurrentOrgUserParams struct {
// in:body
// required:true
Body org.UpdateOrgUserCommand `json:"body"`
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters updateCurrentOrgUser
type UpdateDashboardPermissionsByIDParams ¶
type UpdateDashboardPermissionsByIDParams struct {
// in:body
// required:true
Body dtos.UpdateDashboardACLCommand
// in:path
DashboardID int64
}
swagger:parameters updateDashboardPermissionsByID
type UpdateDashboardPermissionsByUIDParams ¶
type UpdateDashboardPermissionsByUIDParams struct {
// in:body
// required:true
Body dtos.UpdateDashboardACLCommand
// in:path
// required:true
// description: The dashboard UID
UID string `json:"uid"`
}
swagger:parameters updateDashboardPermissionsByUID
type UpdateDataSourceByIDParams ¶
type UpdateDataSourceByIDParams struct {
// in:body
// required:true
Body datasources.UpdateDataSourceCommand
// in:path
// required:true
DatasourceID string `json:"id"`
}
swagger:parameters updateDataSourceByID
type UpdateDataSourceByUIDParams ¶
type UpdateDataSourceByUIDParams struct {
// in:body
// required:true
Body datasources.UpdateDataSourceCommand
// in:path
// required:true
DatasourceUID string `json:"uid"`
}
swagger:parameters updateDataSourceByUID
type UpdateFolderParams ¶
type UpdateFolderParams struct {
// in:path
// required:true
FolderUID string `json:"folder_uid"`
// To change the unique identifier (uid), provide another one.
// To overwrite an existing folder with newer version, set `overwrite` to `true`.
// Provide the current version to safelly update the folder: if the provided version differs from the stored one the request will fail, unless `overwrite` is `true`.
//
// in:body
// required:true
Body folder.UpdateFolderCommand `json:"body"`
}
swagger:parameters updateFolder
type UpdateFolderPermissionsParams ¶
type UpdateFolderPermissionsParams struct {
// in:path
// required:true
FolderUID string `json:"folder_uid"`
// in:body
// required:true
Body dtos.UpdateDashboardACLCommand
}
swagger:parameters updateFolderPermissions
type UpdateOrgAddressParams ¶
type UpdateOrgAddressParams struct {
// in:body
// required:true
Body dtos.UpdateOrgAddressForm `json:"body"`
// in:path
// required:true
OrgID int64 `json:"org_id"`
}
swagger:parameters updateOrgAddress
type UpdateOrgParams ¶
type UpdateOrgParams struct {
// in:body
// required:true
Body dtos.UpdateOrgForm `json:"body"`
// in:path
// required:true
OrgID int64 `json:"org_id"`
}
swagger:parameters updateOrg
type UpdateOrgPreferencesParams ¶
type UpdateOrgPreferencesParams struct {
// in:body
// required:true
Body dtos.UpdatePrefsCmd `json:"body"`
}
swagger:parameters updateOrgPreferences
type UpdateOrgQuotaParam ¶
type UpdateOrgQuotaParam struct {
// in:body
// required:true
Body quota.UpdateQuotaCmd `json:"body"`
// in:path
// required:true
QuotaTarget string `json:"quota_target"`
// in:path
// required:true
OrgID int64 `json:"org_id"`
}
swagger:parameters updateOrgQuota
type UpdateOrgUserForCurrentOrgParams ¶
type UpdateOrgUserForCurrentOrgParams struct {
// in:body
// required:true
Body org.UpdateOrgUserCommand `json:"body"`
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters updateOrgUserForCurrentOrg
type UpdateOrgUserParams ¶
type UpdateOrgUserParams struct {
// in:body
// required:true
Body org.UpdateOrgUserCommand `json:"body"`
// in:path
// required:true
OrgID int64 `json:"org_id"`
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters updateOrgUser
type UpdatePlaylistParams ¶
type UpdatePlaylistParams struct {
// in:body
// required:true
Body playlist.UpdatePlaylistCommand
// in:path
// required:true
UID string `json:"uid"`
}
swagger:parameters updatePlaylist
type UpdatePlaylistResponse ¶
type UpdatePlaylistResponse struct {
// The response message
// in: body
Body *playlist.PlaylistDTO `json:"body"`
}
swagger:response updatePlaylistResponse
type UpdateSignedInUserParams ¶
type UpdateSignedInUserParams struct {
// To change the email, name, login, theme, provide another one.
// in:body
// required:true
Body user.UpdateUserCommand `json:"body"`
}
swagger:parameters updateSignedInUser
type UpdateUserParams ¶
type UpdateUserParams struct {
// To change the email, name, login, theme, provide another one.
// in:body
// required:true
Body user.UpdateUserCommand `json:"body"`
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters updateUser
type UpdateUserPreferencesParams ¶
type UpdateUserPreferencesParams struct {
// in:body
// required:true
Body dtos.UpdatePrefsCmd `json:"body"`
}
swagger:parameters updateUserPreferences
type UpdateUserQuotaParams ¶
type UpdateUserQuotaParams struct {
// in:body
// required:true
Body quota.UpdateQuotaCmd `json:"body"`
// in:path
// required:true
QuotaTarget string `json:"quota_target"`
// in:path
// required:true
UserID int64 `json:"user_id"`
}
swagger:parameters updateUserQuota
type UserResponse ¶
type UserResponse struct {
// The response message
// in: body
Body user.UserProfileDTO `json:"body"`
}
swagger:response userResponse
type UserSetUsingOrgParams ¶
type UserSetUsingOrgParams struct {
// in:path
// required:true
OrgID int64 `json:"org_id"`
}
swagger:parameters userSetUsingOrg
Source Files
¶
- accesscontrol.go
- admin.go
- admin_encryption.go
- admin_provisioning.go
- admin_users.go
- alerting.go
- annotations.go
- api.go
- apikey.go
- basic_auth.go
- dashboard.go
- dashboard_permission.go
- dashboard_snapshot.go
- dataproxy.go
- datasources.go
- ds_query.go
- fakes.go
- folder.go
- folder_permission.go
- frontend_logging.go
- frontend_metrics.go
- frontendsettings.go
- grafana_com_proxy.go
- health.go
- http_server.go
- index.go
- login.go
- login_oauth.go
- org.go
- org_invite.go
- org_users.go
- password.go
- playlist.go
- plugin_checks.go
- plugin_dashboards.go
- plugin_metrics.go
- plugin_proxy.go
- plugin_resource.go
- plugins.go
- preferences.go
- quota.go
- render.go
- search.go
- short_url.go
- signup.go
- swagger.go
- swagger_responses.go
- user.go
- user_token.go
- utils.go