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 License: GNU Affero General Public License v3.0 https://www.gnu.org/licenses/agpl-3.0.en.html 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) (string, accesscontrol.ScopeAttributeResolver)
- func BasicAuthenticatedRequest(req *http.Request, expectedUser, expectedPass string) bool
- func GenStateString() (string, error)
- func GetSharingOptions(c *models.ReqContext)
- func GetSignUpOptions(c *models.ReqContext) response.Response
- func GrafanaJavascriptAgentLogMessageHandler(store *frontendlogging.SourceMapStore) frontendLogMessageHandler
- func NewFakePluginInstaller() *fakePluginInstaller
- func NewFrontendLogMessageHandler(store *frontendlogging.SourceMapStore) frontendLogMessageHandler
- func ReverseProxyGnetReq(logger log.Logger, proxyPath string, version string) *httputil.ReverseProxy
- type AcceptedResponse
- type AddAPIkeyParams
- type AddDataSourceParams
- type AddInviteParams
- type AddOrgUserParams
- type AddOrgUserToCurrentOrgParams
- type AddTeamMemberParams
- 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 BadRequestError
- type CalcDashboardDiffParams
- type CalculateDashboardDiffResponse
- type CallDatasourceResourceByIDParams
- type CallDatasourceResourceWithUIDParams
- type ChangeUserPasswordParams
- type CheckDatasourceHealthByIDParams
- type CheckDatasourceHealthWithUIDParams
- type ConflictError
- type CreateAlertNotificationChannelParams
- type CreateExternalSnapshotResponse
- type CreateFolderParams
- type CreateOrUpdateDatasourceResponse
- type CreateOrgParams
- type CreateOrgResponse
- type CreatePlaylistParams
- type CreatePlaylistResponse
- type CreateSnapshotParams
- type CreateSnapshotResponse
- type CreateTeamParams
- type CreateTeamResponse
- 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 DeleteAlertNotificationChannelByUIDParams
- type DeleteAlertNotificationChannelParams
- type DeleteAlertNotificationChannelResponse
- 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 DeleteTeamByIDParams
- type EnabledPlugins
- type ErrorResponseBody
- type FolderResponse
- type ForbiddenError
- type GenericError
- type GetAPIkeyResponse
- type GetAPIkeysParams
- type GetAlertByIDParams
- type GetAlertNotificationChannelByIDParams
- type GetAlertNotificationChannelByUIDParams
- type GetAlertNotificationChannelResponse
- type GetAlertNotificationChannelsResponse
- type GetAlertResponse
- type GetAlertsParams
- type GetAlertsResponse
- 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 GetDashboardStatesParams
- type GetDashboardStatesResponse
- 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 GetFolderPermissionListParams
- type GetFolderPermissionsResponse
- type GetFoldersParams
- type GetFoldersResponse
- type GetHomeDashboardResponse
- type GetHomeDashboardResponseBody
- type GetLDAPUserParams
- 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 GetTeamByIDParams
- type GetTeamByIDResponse
- type GetTeamMembersParams
- type GetTeamMembersResponse
- type GetTeamPreferencesParams
- type GetUserAuthTokensResponse
- type GetUserByIDParams
- type GetUserByLoginOrEmailParams
- type GetUserOrgListParams
- type GetUserOrgListResponse
- type GetUserQuotaParams
- type GetUserTeamsParams
- type GetUserTeamsResponse
- type HTTPServer
- func (hs *HTTPServer) AddAPIKey(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AddDataSource(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AddMiddleware(middleware web.Handler)
- func (hs *HTTPServer) AddNamedMiddleware(middleware routing.RegisterNamedMiddleware)
- func (hs *HTTPServer) AddOrgInvite(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AddOrgUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AddOrgUserToCurrentOrg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AddTeamMember(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminCreateUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminDeleteAllSecretsManagerPluginSecrets(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminDeleteUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminDisableUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminEnableUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminGetSettings(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminGetStats(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminGetUserAuthTokens(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminLogoutUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminMigrateSecretsFromPlugin(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminMigrateSecretsToPlugin(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminProvisioningReloadAlerting(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminProvisioningReloadDashboards(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminProvisioningReloadDatasources(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminProvisioningReloadNotifications(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminProvisioningReloadPlugins(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminReEncryptEncryptionKeys(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminReEncryptSecrets(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminRevokeUserAuthToken(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminRollbackSecrets(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminRotateDataEncryptionKeys(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminUpdateUserPassword(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminUpdateUserPermissions(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AlertTest(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CalculateDashboardDiff(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CallDatasourceResource(c *models.ReqContext)deprecated
- func (hs *HTTPServer) CallDatasourceResourceWithUID(c *models.ReqContext)
- func (hs *HTTPServer) CallResource(c *models.ReqContext)
- func (hs *HTTPServer) ChangeActiveOrgAndRedirectToHome(c *models.ReqContext)
- func (hs *HTTPServer) ChangeUserPassword(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CheckDatasourceHealth(c *models.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) CheckDatasourceHealthWithUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CheckHealth(c *models.ReqContext) response.Response
- func (hs *HTTPServer) ClearHelpFlags(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CollectPluginMetrics(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CompleteInvite(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CookieOptionsFromCfg() cookies.CookieOptions
- func (hs *HTTPServer) CreateAlertNotification(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CreateDashboardSnapshot(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CreateFolder(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CreateOrg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CreatePlaylist(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CreateTeam(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteAPIKey(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteAlertNotification(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteAlertNotificationByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteAnnotationByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDashboardByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDashboardSnapshot(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDashboardSnapshotByDeleteKey(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDataSourceById(c *models.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) DeleteDataSourceByName(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDataSourceByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteFolder(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteOrgByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeletePlaylist(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteTeamByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAPIKeys(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAlert(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAlertNotificationByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAlertNotificationByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAlertNotificationLookup(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAlertNotifications(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAlertNotifiers(ngalertEnabled bool) func(*models.ReqContext) response.Response
- func (hs *HTTPServer) GetAlertStatesForDashboard(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAlerts(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAnnotationByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAnnotationTags(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetAnnotations(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetCurrentOrg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetCurrentOrgQuotas(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetDashboard(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetDashboardPermissionList(c *models.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) GetDashboardSnapshot(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetDashboardTags(c *models.ReqContext)
- func (hs *HTTPServer) GetDashboardUIDs(c *models.ReqContext)
- func (hs *HTTPServer) GetDashboardVersion(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetDashboardVersions(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetDataSourceById(c *models.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) GetDataSourceByName(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetDataSourceByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetDataSourceIdByName(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetDataSources(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetFolderByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetFolderByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetFolderPermissionList(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetFolders(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetFrontendSettings(c *models.ReqContext)
- func (hs *HTTPServer) GetHomeDashboard(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetInviteInfoByCode(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetLDAPStatus(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgByName(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgPreferences(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgQuotas(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgUsers(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgUsersForCurrentOrg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetOrgUsersForCurrentOrgLookup(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetPendingOrgInvites(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetPlaylist(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetPlaylistDashboards(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetPlaylistItems(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetPluginDashboards(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetPluginErrorsList(_ *models.ReqContext) response.Response
- func (hs *HTTPServer) GetPluginList(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetPluginMarkdown(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetPluginSettingByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetSignedInUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetSignedInUserOrgList(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetSignedInUserTeamList(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetStars(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetTeamByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetTeamMembers(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetTeamPreferences(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetUserAuthTokens(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetUserByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetUserByLoginOrEmail(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetUserFromLDAP(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetUserOrgList(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetUserPreferences(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetUserQuotas(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetUserTeams(c *models.ReqContext) response.Response
- func (hs *HTTPServer) Index(c *models.ReqContext)
- func (hs *HTTPServer) InstallPlugin(c *models.ReqContext) response.Response
- func (hs *HTTPServer) ListSortOptions(c *models.ReqContext) response.Response
- func (hs *HTTPServer) LoadPlaylistDashboards(ctx context.Context, orgID int64, signedInUser *user.SignedInUser, ...) (dtos.PlaylistDashboardsSlice, error)
- func (hs *HTTPServer) LoginAPIPing(c *models.ReqContext) response.Response
- func (hs *HTTPServer) LoginPost(c *models.ReqContext) response.Response
- func (hs *HTTPServer) LoginView(c *models.ReqContext)
- func (hs *HTTPServer) Logout(c *models.ReqContext)
- func (hs *HTTPServer) MassDeleteAnnotations(c *models.ReqContext) response.Response
- func (hs *HTTPServer) NotFoundHandler(c *models.ReqContext)
- func (hs *HTTPServer) NotificationTest(c *models.ReqContext) response.Response
- func (hs *HTTPServer) OAuthLogin(ctx *models.ReqContext)
- func (hs *HTTPServer) PatchAnnotation(c *models.ReqContext) response.Response
- func (hs *HTTPServer) PatchOrgPreferences(c *models.ReqContext) response.Response
- func (hs *HTTPServer) PatchUserPreferences(c *models.ReqContext) response.Response
- func (hs *HTTPServer) PauseAlert(legacyAlertingEnabled *bool) func(c *models.ReqContext) response.Response
- func (hs *HTTPServer) PauseAllAlerts(legacyAlertingEnabled *bool) func(c *models.ReqContext) response.Response
- func (hs *HTTPServer) PostAnnotation(c *models.ReqContext) response.Response
- func (hs *HTTPServer) PostDashboard(c *models.ReqContext) response.Response
- func (hs *HTTPServer) PostFrontendMetrics(c *models.ReqContext) response.Response
- func (hs *HTTPServer) PostGraphiteAnnotation(c *models.ReqContext) response.Response
- func (hs *HTTPServer) PostSyncUserWithLDAP(c *models.ReqContext) response.Response
- func (hs *HTTPServer) ProxyDataSourceRequest(c *models.ReqContext)deprecated
- func (hs *HTTPServer) ProxyDataSourceRequestWithUID(c *models.ReqContext)
- func (hs *HTTPServer) ProxyGnetRequest(c *models.ReqContext)
- func (hs *HTTPServer) ProxyPluginRequest(c *models.ReqContext)
- func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext) response.Response
- func (hs *HTTPServer) RedirectResponseWithError(ctx *models.ReqContext, err error, v ...interface{}) *response.RedirectResponse
- func (hs *HTTPServer) ReloadLDAPCfg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) RemoveOrgUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) RemoveOrgUserForCurrentOrg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) RemoveTeamMember(c *models.ReqContext) response.Response
- func (hs *HTTPServer) RenderToPng(c *models.ReqContext)
- func (hs *HTTPServer) ResetPassword(c *models.ReqContext) response.Response
- func (hs *HTTPServer) RestoreDashboardVersion(c *models.ReqContext) response.Response
- func (hs *HTTPServer) RevokeInvite(c *models.ReqContext) response.Response
- func (hs *HTTPServer) RevokeUserAuthToken(c *models.ReqContext) response.Response
- func (hs *HTTPServer) Run(ctx context.Context) error
- func (hs *HTTPServer) Search(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SearchDashboardSnapshots(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SearchOrgUsersWithPaging(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SearchOrgs(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SearchPlaylists(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SearchTeams(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SendResetPasswordEmail(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SetHelpFlag(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SetHomeDashboard(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SignUp(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SignUpStep2(c *models.ReqContext) response.Response
- func (hs *HTTPServer) StarDashboard(c *models.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) StarDashboardByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SyncUser(ctx *models.ReqContext, extUser *models.ExternalUserInfo, ...) (*user.User, error)
- func (hs *HTTPServer) TrimDashboard(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UninstallPlugin(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UnstarDashboard(c *models.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) UnstarDashboardByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateAlertNotification(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateAlertNotificationByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateAnnotation(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateCurrentOrg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateCurrentOrgAddress(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateDashboardPermissions(c *models.ReqContext) response.Responsedeprecated
- func (hs *HTTPServer) UpdateDataSourceByID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateDataSourceByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateFolder(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateFolderPermissions(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrgAddress(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrgPreferences(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrgQuota(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrgUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateOrgUserForCurrentOrg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdatePlaylist(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdatePluginSetting(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateSignedInUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateTeam(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateTeamMember(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateTeamPreferences(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateUserActiveOrg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateUserPreferences(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateUserQuota(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UserSetUsingOrg(c *models.ReqContext) response.Response
- func (hs *HTTPServer) ValidateOrgAlert(c *models.ReqContext)
- func (hs *HTTPServer) ValidateOrgPlaylist(c *models.ReqContext)
- func (hs *HTTPServer) ValidateRedirectTo(redirectTo string) error
- type HelpFlagResponse
- type InternalServerError
- type LDAPAttribute
- type LDAPRoleDTO
- type LDAPServerDTO
- type LDAPUserDTO
- type ListSortOptionsResponse
- type LoginError
- type LookupAlertNotificationChannelsResponse
- type LookupOrgUsersParams
- type MassDeleteAnnotationsParams
- type NotFoundError
- type NotificationChannelTestParams
- type OKResponse
- type PatchAnnotationParams
- type PatchOrgPreferencesParams
- type PatchUserPreferencesParams
- type PauseAlertParams
- type PauseAlertResponse
- type PauseAllAlertsParams
- type PauseAllAlertsResponse
- type PostAPIkeyResponse
- type PostAnnotationParams
- type PostAnnotationResponse
- type PostDashboardParams
- type PostDashboardResponse
- type PostGraphiteAnnotationParams
- type PreconditionFailedError
- type QueryMetricsWithExpressionsBodyParams
- type QueryMetricsWithExpressionsRespons
- type RemoveOrgUserForCurrentOrgParams
- type RemoveOrgUserParams
- type RemoveTeamMemberParams
- type RenderReportPDFParams
- type RestoreDashboardVersionByIDParams
- type RestoreDashboardVersionByUIDParams
- type RevokeInviteParams
- type RevokeUserAuthTokenParams
- type SMTPNotEnabledError
- type SearchDashboardSnapshotsResponse
- type SearchOrgParams
- type SearchOrgsResponse
- type SearchParams
- type SearchPlaylistsParams
- type SearchPlaylistsResponse
- type SearchResponse
- type SearchTeamsParams
- type SearchTeamsResponse
- type SearchUsersParams
- type SearchUsersResponse
- type SearchUsersWithPagingParams
- type ServerOptions
- type SetHelpFlagParams
- type StarDashboardByUIDParams
- type StarDashboardParams
- type SuccessResponseBody
- type SyncLDAPUserParams
- type TestAlertParams
- type TestAlertResponse
- type TrimDashboardParams
- type TrimDashboardResponse
- type UnauthorizedError
- type UnprocessableEntityError
- type UnstarDashboardByUIDParams
- type UnstarDashboardParams
- type UpdateAlertNotificationChannelByUIDParams
- type UpdateAlertNotificationChannelParams
- 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 UpdateTeamMemberParams
- type UpdateTeamParams
- type UpdateTeamPreferencesParams
- 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
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
Functions ¶
func AnnotationTypeScopeResolver ¶
func AnnotationTypeScopeResolver(annotationsRepo annotations.Repository) (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>.
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 GenStateString ¶
func GetSharingOptions ¶
func GetSharingOptions(c *models.ReqContext)
swagger:route GET /snapshot/shared-options snapshots getSharingOptions
Get snapshot sharing settings.
Responses: 200: getSharingOptionsResponse 401: unauthorisedError
func GetSignUpOptions ¶
func GetSignUpOptions(c *models.ReqContext) response.Response
GET /api/user/signup/options
func GrafanaJavascriptAgentLogMessageHandler ¶
func GrafanaJavascriptAgentLogMessageHandler(store *frontendlogging.SourceMapStore) frontendLogMessageHandler
func NewFakePluginInstaller ¶
func NewFakePluginInstaller() *fakePluginInstaller
func NewFrontendLogMessageHandler ¶
func NewFrontendLogMessageHandler(store *frontendlogging.SourceMapStore) frontendLogMessageHandler
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 models.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 models.AddOrgUserCommand `json:"body"` }
swagger:parameters addOrgUserToCurrentOrg
type AddTeamMemberParams ¶
type AddTeamMemberParams struct { // in:body // required:true Body models.AddTeamMemberCommand `json:"body"` // in:path // required:true TeamID string `json:"team_id"` }
swagger:parameters addTeamMember
type AdminCreateUserParams ¶
type AdminCreateUserParams struct { // in:body // required:true Body dtos.AdminCreateUserForm `json:"body"` }
swagger:parameters adminCreateUser
type AdminCreateUserResponseResponse ¶
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 models.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 BadRequestError ¶
type BadRequestError GenericError
BadRequestError is returned when the request is invalid and it cannot be processed.
swagger:response badRequestError
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 models.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 CreateAlertNotificationChannelParams ¶
type CreateAlertNotificationChannelParams struct { // in:body // required:true Body models.CreateAlertNotificationCommand `json:"body"` }
swagger:parameters createAlertNotificationChannel
type CreateFolderParams ¶
type CreateFolderParams struct { // in:body // required:true Body models.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 models.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 CreateTeamParams ¶
type CreateTeamParams struct { // in:body // required:true Body models.CreateTeamCommand `json:"body"` }
swagger:parameters createTeam
type CreateTeamResponse ¶
type CreateTeamResponse struct { // The response message // in: body Body struct { TeamId int64 `json:"teamId"` Message string `json:"message"` } `json:"body"` }
swagger:response createTeamResponse
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.DashboardVersionDTO `json:"body"` }
swagger:response dashboardVersionsResponse
type DashboardsTagsResponse ¶
type DashboardsTagsResponse struct { // in: body Body []*models.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 interface{} // 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 interface{} // 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 DeleteAlertNotificationChannelByUIDParams ¶
type DeleteAlertNotificationChannelByUIDParams struct { // in:path // required:true NotificationUID string `json:"notification_channel_uid"` }
swagger:parameters deleteAlertNotificationChannelByUID
type DeleteAlertNotificationChannelParams ¶
type DeleteAlertNotificationChannelParams struct { // in:path // required:true NotificationID int64 `json:"notification_channel_id"` }
swagger:parameters deleteAlertNotificationChannel
type DeleteAlertNotificationChannelResponse ¶
type DeleteAlertNotificationChannelResponse struct { // The response message // in: body Body struct { // ID Identifier of the deleted notification channel. // required: true // example: 65 ID int64 `json:"id"` // Message Message of the deleted notificatiton channel. // required: true Message string `json:"message"` } `json:"body"` }
swagger:response deleteAlertNotificationChannelResponse
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 { // ID Identifier of the deleted dashboard. // required: true // example: 65 ID int64 `json:"id"` // 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 DeleteTeamByIDParams ¶
type DeleteTeamByIDParams struct { // in:path // required:true TeamID string `json:"team_id"` }
swagger:parameters deleteTeamByID
type EnabledPlugins ¶
EnabledPlugins represents a mapping from plugin types (panel, data source, etc.) to plugin IDs to plugins For example ["panel"] -> ["piechart"] -> {pie chart plugin DTO}
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 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 GetAlertByIDParams ¶
type GetAlertByIDParams struct { // in:path // required:true AlertID string `json:"alert_id"` }
swagger:parameters getAlertByID
type GetAlertNotificationChannelByIDParams ¶
type GetAlertNotificationChannelByIDParams struct { // in:path // required:true NotificationID int64 `json:"notification_channel_id"` }
swagger:parameters getAlertNotificationChannelByID
type GetAlertNotificationChannelByUIDParams ¶
type GetAlertNotificationChannelByUIDParams struct { // in:path // required:true NotificationUID string `json:"notification_channel_uid"` }
swagger:parameters getAlertNotificationChannelByUID
type GetAlertNotificationChannelResponse ¶
type GetAlertNotificationChannelResponse struct { // The response message // in: body Body *dtos.AlertNotification `json:"body"` }
swagger:response getAlertNotificationChannelResponse
type GetAlertNotificationChannelsResponse ¶
type GetAlertNotificationChannelsResponse struct { // The response message // in: body Body []*dtos.AlertNotification `json:"body"` }
swagger:response getAlertNotificationChannelsResponse
type GetAlertResponse ¶
type GetAlertResponse struct { // The response message // in: body Body *models.Alert `json:"body"` }
swagger:response getAlertResponse
type GetAlertsParams ¶
type GetAlertsParams struct { // Limit response to alerts in specified dashboard(s). You can specify multiple dashboards. // in:query // required:false DashboardID []string `json:"dashboardId"` // Limit response to alert for a specified panel on a dashboard. // in:query // required:false PanelID int64 `json:"panelId"` // Limit response to alerts having a name like this value. // in:query // required: false Query string `json:"query"` // Return alerts with one or more of the following alert states // in:query // required:false // Description: // * `all` // * `no_data` // * `paused` // * `alerting` // * `ok` // * `pending` // * `unknown` // enum: all,no_data,paused,alerting,ok,pending,unknown State string `json:"state"` // Limit response to X number of alerts. // in:query // required:false Limit int64 `json:"limit"` // Limit response to alerts of dashboards in specified folder(s). You can specify multiple folders // in:query // required:false // type array // collectionFormat: multi FolderID []string `json:"folderId"` // Limit response to alerts having a dashboard name like this value./ Limit response to alerts having a dashboard name like this value. // in:query // required:false DashboardQuery string `json:"dashboardQuery"` // Limit response to alerts of dashboards with specified tags. To do an “AND” filtering with multiple tags, specify the tags parameter multiple times // in:query // required:false // type: array // collectionFormat: multi DashboardTag []string `json:"dashboardTag"` }
swagger:parameters getAlerts
type GetAlertsResponse ¶
type GetAlertsResponse struct { // The response message // in: body Body []*models.AlertListItemDTO `json:"body"` }
swagger:response getAlertsResponse
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 models.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 []*models.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 GetDashboardStatesParams ¶
type GetDashboardStatesParams struct { // in:query // required: true DashboardID int64 `json:"dashboardId"` }
swagger:parameters getDashboardStates
type GetDashboardStatesResponse ¶
type GetDashboardStatesResponse struct { // The response message // in: body Body []*models.AlertStateInfoDTO `json:"body"` }
swagger:response getDashboardStatesResponse
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 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 GetFolderPermissionListParams ¶
type GetFolderPermissionListParams struct { // in:path // required:true FolderUID string `json:"folder_uid"` }
swagger:parameters getFolderPermissionList
type GetFolderPermissionsResponse ¶
type GetFolderPermissionsResponse struct { // in: body Body []*models.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"` }
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 GetLDAPUserParams ¶
type GetLDAPUserParams struct { // in:path // required:true UserName string `json:"user_name"` }
swagger:parameters getUserFromLDAP
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 models.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 models.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 []*models.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 []*models.OrgUserDTO `json:"body"` }
swagger:response getOrgUsersResponse
type GetPendingOrgInvitesResponse ¶
type GetPendingOrgInvitesResponse struct { // The response message // in: body Body []*models.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 ¶
swagger:response getPreferencesResponse
type GetQuotaResponseResponse ¶
type GetQuotaResponseResponse struct { // in:body Body []*models.UserQuotaDTO `json:"body"` }
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 []*models.UserOrgDTO `json:"body"` }
swagger:response getSignedInUserOrgListResponse
type GetSignedInUserTeamListResponse ¶
type GetSignedInUserTeamListResponse struct { // The response message // in: body Body []*models.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 models.AdminStats `json:"body"` }
swagger:response adminGetStatsResponse
type GetTeamByIDParams ¶
type GetTeamByIDParams struct { // in:path // required:true TeamID string `json:"team_id"` }
swagger:parameters getTeamByID
type GetTeamByIDResponse ¶
type GetTeamByIDResponse struct { // The response message // in: body Body *models.TeamDTO `json:"body"` }
swagger:response getTeamByIDResponse
type GetTeamMembersParams ¶
type GetTeamMembersParams struct { // in:path // required:true TeamID string `json:"team_id"` }
swagger:parameters getTeamMembers
type GetTeamMembersResponse ¶
type GetTeamMembersResponse struct { // The response message // in: body Body []*models.TeamMemberDTO `json:"body"` }
swagger:response getTeamMembersResponse
type GetTeamPreferencesParams ¶
type GetTeamPreferencesParams struct { // in:path // required:true TeamID string `json:"team_id"` }
swagger:parameters getTeamPreferences
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 []*models.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 []*models.TeamDTO `json:"body"` }
swagger:response getUserTeamsResponse
type HTTPServer ¶
type HTTPServer struct { PluginContextProvider *plugincontext.Provider RouteRegister routing.RouteRegister RenderService rendering.Service Cfg *setting.Cfg Features *featuremgmt.FeatureManager SettingsProvider setting.Provider HooksService *hooks.HooksService CacheService *localcache.CacheService DataSourceCache datasources.CacheService AuthTokenService models.UserTokenService QuotaService quota.Service RemoteCacheService *remotecache.RemoteCache ProvisioningService provisioning.ProvisioningService Login login.Service License models.Licensing AccessControl accesscontrol.AccessControl DataProxy *datasourceproxy.DataSourceProxyService PluginRequestValidator models.PluginRequestValidator SearchService search.Service ShortURLService shorturls.Service QueryHistoryService queryhistory.Service CorrelationsService correlations.Service Live *live.GrafanaLive LivePushGateway *pushhttp.Gateway ThumbService thumbs.Service ExportService export.ExportService StorageService store.StorageService SearchV2HTTPService searchV2.SearchHTTPService ContextHandler *contexthandler.ContextHandler SQLStore sqlstore.Store AlertEngine *alerting.AlertEngine 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.NotificationService DashboardService dashboards.DashboardService DatasourcePermissionsService permissions.DatasourcePermissionsService AlertNotificationService *alerting.AlertNotificationService PluginSettings pluginSettings.Service AvatarCacheServer *avatar.AvatarCacheServer Csrf csrf.Service PublicDashboardsApi *publicdashboardsApi.Api Coremodels *registry.Base // contains filtered or unexported fields }
func ProvideHTTPServer ¶
func ProvideHTTPServer(opts ServerOptions, cfg *setting.Cfg, routeRegister routing.RouteRegister, bus bus.Bus, renderService rendering.Service, licensing models.Licensing, hooksService *hooks.HooksService, cacheService *localcache.CacheService, sqlStore *sqlstore.SQLStore, alertEngine *alerting.AlertEngine, pluginRequestValidator models.PluginRequestValidator, pluginStaticRouteResolver plugins.StaticRouteResolver, pluginDashboardService plugindashboards.Service, pluginStore plugins.Store, pluginClient plugins.Client, pluginErrorResolver plugins.ErrorResolver, pluginInstaller plugins.Installer, settingsProvider setting.Provider, dataSourceCache datasources.CacheService, userTokenService models.UserTokenService, cleanUpService *cleanup.CleanUpService, shortURLService shorturls.Service, queryHistoryService queryhistory.Service, correlationsService correlations.Service, thumbService thumbs.Service, remoteCache *remotecache.RemoteCache, provisioningService provisioning.ProvisioningService, loginService login.Service, authenticator loginpkg.Authenticator, accessControl accesscontrol.AccessControl, dataSourceProxy *datasourceproxy.DataSourceProxyService, searchService *search.SearchService, live *live.GrafanaLive, livePushGateway *pushhttp.Gateway, plugCtxProvider *plugincontext.Provider, contextHandler *contexthandler.ContextHandler, features *featuremgmt.FeatureManager, alertNG *ngalert.AlertNG, libraryPanelService librarypanels.Service, libraryElementService libraryelements.Service, quotaService quota.Service, socialService social.Service, tracer tracing.Tracer, exportService export.ExportService, encryptionService encryption.Internal, grafanaUpdateChecker *updatechecker.GrafanaService, pluginsUpdateChecker *updatechecker.PluginsService, searchUsersService searchusers.Service, dataSourcesService datasources.DataSourceService, queryDataService *query.Service, ldapGroups ldap.Groups, teamGuardian teamguardian.TeamGuardian, serviceaccountsService serviceaccounts.Service, authInfoService login.AuthInfoService, storageService store.StorageService, httpObjectStore object.HTTPObjectStore, notificationService *notifications.NotificationService, dashboardService dashboards.DashboardService, dashboardProvisioningService dashboards.DashboardProvisioningService, folderService dashboards.FolderService, datasourcePermissionsService permissions.DatasourcePermissionsService, alertNotificationService *alerting.AlertNotificationService, dashboardsnapshotsService dashboardsnapshots.Service, commentsService *comments.Service, pluginSettings pluginSettings.Service, avatarCacheServer *avatar.AvatarCacheServer, preferenceService pref.Service, teamsPermissionsService accesscontrol.TeamPermissionsService, folderPermissionsService accesscontrol.FolderPermissionsService, dashboardPermissionsService accesscontrol.DashboardPermissionsService, dashboardVersionService dashver.Service, starService star.Service, csrfService csrf.Service, coremodels *registry.Base, 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, dashboardThumbsService thumbs.DashboardThumbService, navTreeService navtree.Service, annotationRepo annotations.Repository, tagService tag.Service, searchv2HTTPService searchV2.SearchHTTPService, userAuthService userauth.Service, ) (*HTTPServer, error)
func (*HTTPServer) AddAPIKey ¶
func (hs *HTTPServer) AddAPIKey(c *models.ReqContext) response.Response
swagger:route POST /auth/keys api_keys addAPIkey
Creates an API key.
Will return details of the created API key.
Responses: 200: postAPIkeyResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 409: conflictError 500: internalServerError
func (*HTTPServer) AddDataSource ¶
func (hs *HTTPServer) AddDataSource(c *models.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 *models.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 *models.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 *models.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) AddTeamMember ¶
func (hs *HTTPServer) AddTeamMember(c *models.ReqContext) response.Response
swagger:route POST /teams/{team_id}/members teams addTeamMember
Add Team Member.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) AdminCreateUser ¶
func (hs *HTTPServer) AdminCreateUser(c *models.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 *models.ReqContext) response.Response
func (*HTTPServer) AdminDeleteUser ¶
func (hs *HTTPServer) AdminDeleteUser(c *models.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 *models.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 *models.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 *models.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 *models.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 *models.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) AdminLogoutUser ¶
func (hs *HTTPServer) AdminLogoutUser(c *models.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 *models.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 *models.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 *models.ReqContext) response.Response
func (*HTTPServer) AdminProvisioningReloadDashboards ¶
func (hs *HTTPServer) AdminProvisioningReloadDashboards(c *models.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 *models.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) AdminProvisioningReloadNotifications ¶
func (hs *HTTPServer) AdminProvisioningReloadNotifications(c *models.ReqContext) response.Response
swagger:route POST /admin/provisioning/notifications/reload admin_provisioning adminProvisioningReloadNotifications
Reload legacy alert notifier provisioning configurations.
Reloads the provisioning config files for legacy alert notifiers 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:notifications`.
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) AdminProvisioningReloadPlugins ¶
func (hs *HTTPServer) AdminProvisioningReloadPlugins(c *models.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 *models.ReqContext) response.Response
func (*HTTPServer) AdminReEncryptSecrets ¶
func (hs *HTTPServer) AdminReEncryptSecrets(c *models.ReqContext) response.Response
func (*HTTPServer) AdminRevokeUserAuthToken ¶
func (hs *HTTPServer) AdminRevokeUserAuthToken(c *models.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 *models.ReqContext) response.Response
func (*HTTPServer) AdminRotateDataEncryptionKeys ¶
func (hs *HTTPServer) AdminRotateDataEncryptionKeys(c *models.ReqContext) response.Response
func (*HTTPServer) AdminUpdateUserPassword ¶
func (hs *HTTPServer) AdminUpdateUserPassword(c *models.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 *models.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) AlertTest ¶
func (hs *HTTPServer) AlertTest(c *models.ReqContext) response.Response
swagger:route POST /alerts/test legacy_alerts testAlert
Test alert.
Responses: 200: testAlertResponse 400: badRequestError 422: unprocessableEntityError 403: forbiddenError 500: internalServerError
func (*HTTPServer) CalculateDashboardDiff ¶
func (hs *HTTPServer) CalculateDashboardDiff(c *models.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 *models.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 *models.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 *models.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 *models.ReqContext)
GET /profile/switch-org/:id
func (*HTTPServer) ChangeUserPassword ¶
func (hs *HTTPServer) ChangeUserPassword(c *models.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 *models.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 *models.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 *models.ReqContext) response.Response
CheckHealth returns the health of a plugin. /api/plugins/:pluginId/health
func (*HTTPServer) ClearHelpFlags ¶
func (hs *HTTPServer) ClearHelpFlags(c *models.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 *models.ReqContext) response.Response
CollectPluginMetrics collect metrics from a plugin.
/api/plugins/:pluginId/metrics
func (*HTTPServer) CompleteInvite ¶
func (hs *HTTPServer) CompleteInvite(c *models.ReqContext) response.Response
func (*HTTPServer) CookieOptionsFromCfg ¶
func (hs *HTTPServer) CookieOptionsFromCfg() cookies.CookieOptions
func (*HTTPServer) CreateAlertNotification ¶
func (hs *HTTPServer) CreateAlertNotification(c *models.ReqContext) response.Response
swagger:route POST /alert-notifications legacy_alerts_notification_channels createAlertNotificationChannel
Create notification channel.
You can find the full list of [supported notifiers](https://grafana.com/docs/grafana/latest/alerting/old-alerting/notifications/#list-of-supported-notifiers) on the alert notifiers page.
Responses: 200: getAlertNotificationChannelResponse 401: unauthorisedError 403: forbiddenError 409: conflictError 500: internalServerError
func (*HTTPServer) CreateDashboardSnapshot ¶
func (hs *HTTPServer) CreateDashboardSnapshot(c *models.ReqContext) response.Response
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 *models.ReqContext) response.Response
swagger:route POST /folders folders createFolder
Create folder.
Responses: 200: folderResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 409: conflictError 500: internalServerError
func (*HTTPServer) CreateOrg ¶
func (hs *HTTPServer) CreateOrg(c *models.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 *models.ReqContext) response.Response
swagger:route POST /playlists playlists createPlaylist
Create playlist.
Responses: 200: createPlaylistResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) CreateTeam ¶
func (hs *HTTPServer) CreateTeam(c *models.ReqContext) response.Response
swagger:route POST /teams teams createTeam
Add Team.
Responses: 200: createTeamResponse 401: unauthorisedError 403: forbiddenError 409: conflictError 500: internalServerError
func (*HTTPServer) DeleteAPIKey ¶
func (hs *HTTPServer) DeleteAPIKey(c *models.ReqContext) response.Response
swagger:route DELETE /auth/keys/{id} api_keys deleteAPIkey
Delete API key.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteAlertNotification ¶
func (hs *HTTPServer) DeleteAlertNotification(c *models.ReqContext) response.Response
swagger:route DELETE /alert-notifications/{notification_channel_id} legacy_alerts_notification_channels deleteAlertNotificationChannel
Delete alert notification by ID.
Deletes an existing notification channel identified by ID.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteAlertNotificationByUID ¶
func (hs *HTTPServer) DeleteAlertNotificationByUID(c *models.ReqContext) response.Response
swagger:route DELETE /alert-notifications/uid/{notification_channel_uid} legacy_alerts_notification_channels deleteAlertNotificationChannelByUID
Delete alert notification by UID.
Deletes an existing notification channel identified by UID.
Responses: 200: deleteAlertNotificationChannelResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteAnnotationByID ¶
func (hs *HTTPServer) DeleteAnnotationByID(c *models.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 *models.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 *models.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 *models.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 *models.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 *models.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 *models.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 *models.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.
Responses: 200: deleteFolderResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) DeleteOrgByID ¶
func (hs *HTTPServer) DeleteOrgByID(c *models.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 *models.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) DeleteTeamByID ¶
func (hs *HTTPServer) DeleteTeamByID(c *models.ReqContext) response.Response
swagger:route DELETE /teams/{team_id} teams deleteTeamByID
Delete Team By ID.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetAPIKeys ¶
func (hs *HTTPServer) GetAPIKeys(c *models.ReqContext) response.Response
swagger:route GET /auth/keys api_keys getAPIkeys
Get auth keys.
Will return auth keys.
Responses: 200: getAPIkeyResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetAlert ¶
func (hs *HTTPServer) GetAlert(c *models.ReqContext) response.Response
swagger:route GET /alerts/{alert_id} legacy_alerts getAlertByID
Get alert by ID.
“evalMatches” data in the response is cached in the db when and only when the state of the alert changes (e.g. transitioning from “ok” to “alerting” state). If data from one server triggers the alert first and, before that server is seen leaving alerting state, a second server also enters a state that would trigger the alert, the second server will not be visible in “evalMatches” data.
Responses: 200: getAlertResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) GetAlertNotificationByID ¶
func (hs *HTTPServer) GetAlertNotificationByID(c *models.ReqContext) response.Response
swagger:route GET /alert-notifications/{notification_channel_id} legacy_alerts_notification_channels getAlertNotificationChannelByID
Get notification channel by ID.
Returns the notification channel given the notification channel ID.
Responses: 200: getAlertNotificationChannelResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetAlertNotificationByUID ¶
func (hs *HTTPServer) GetAlertNotificationByUID(c *models.ReqContext) response.Response
swagger:route GET /alert-notifications/uid/{notification_channel_uid} legacy_alerts_notification_channels getAlertNotificationChannelByUID
Get notification channel by UID.
Returns the notification channel given the notification channel UID.
Responses: 200: getAlertNotificationChannelResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetAlertNotificationLookup ¶
func (hs *HTTPServer) GetAlertNotificationLookup(c *models.ReqContext) response.Response
swagger:route GET /alert-notifications/lookup legacy_alerts_notification_channels getAlertNotificationLookup
Get all notification channels (lookup).
Returns all notification channels, but with less detailed information. Accessible by any authenticated user and is mainly used by providing alert notification channels in Grafana UI when configuring alert rule.
Responses: 200: getAlertNotificationLookupResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetAlertNotifications ¶
func (hs *HTTPServer) GetAlertNotifications(c *models.ReqContext) response.Response
swagger:route GET /alert-notifications legacy_alerts_notification_channels getAlertNotificationChannels
Get all notification channels.
Returns all notification channels that the authenticated user has permission to view.
Responses: 200: getAlertNotificationChannelsResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetAlertNotifiers ¶
func (hs *HTTPServer) GetAlertNotifiers(ngalertEnabled bool) func(*models.ReqContext) response.Response
func (*HTTPServer) GetAlertStatesForDashboard ¶
func (hs *HTTPServer) GetAlertStatesForDashboard(c *models.ReqContext) response.Response
swagger:route GET /alerts/states-for-dashboard legacy_alerts getDashboardStates
Get alert states for a dashboard.
Responses: Responses: 200: getDashboardStatesResponse 400: badRequestError 500: internalServerError
func (*HTTPServer) GetAlerts ¶
func (hs *HTTPServer) GetAlerts(c *models.ReqContext) response.Response
swagger:route GET /alerts legacy_alerts getAlerts
Get legacy alerts.
Responses: 200: getAlertsResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) GetAnnotationByID ¶
func (hs *HTTPServer) GetAnnotationByID(c *models.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 *models.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 *models.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) GetCurrentOrg ¶
func (hs *HTTPServer) GetCurrentOrg(c *models.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 *models.ReqContext) response.Response
func (*HTTPServer) GetDashboard ¶
func (hs *HTTPServer) GetDashboard(c *models.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 *models.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 *models.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 *models.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 *models.ReqContext)
GetDashboardUIDs converts internal ids to UIDs
func (*HTTPServer) GetDashboardVersion ¶
func (hs *HTTPServer) GetDashboardVersion(c *models.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 *models.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 *models.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 *models.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 *models.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 *models.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 *models.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 ¶
func (hs *HTTPServer) GetFolderByID(c *models.ReqContext) response.Response
swagger:route GET /folders/id/{folder_id} folders getFolderByID
Get folder by id.
Returns the folder identified by id.
Responses: 200: folderResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetFolderByUID ¶
func (hs *HTTPServer) GetFolderByUID(c *models.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) GetFolderPermissionList ¶
func (hs *HTTPServer) GetFolderPermissionList(c *models.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 *models.ReqContext) response.Response
swagger:route GET /folders folders getFolders
Get all folders.
Returns all folders that the authenticated user has permission to view.
Responses: 200: getFoldersResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetFrontendSettings ¶
func (hs *HTTPServer) GetFrontendSettings(c *models.ReqContext)
func (*HTTPServer) GetHomeDashboard ¶
func (hs *HTTPServer) GetHomeDashboard(c *models.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 *models.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) GetLDAPStatus ¶
func (hs *HTTPServer) GetLDAPStatus(c *models.ReqContext) response.Response
swagger:route GET /admin/ldap/status admin_ldap getLDAPStatus
Attempts to connect to all the configured LDAP servers and returns information on whenever they're available or not.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.status:read`.
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetOrgByID ¶
func (hs *HTTPServer) GetOrgByID(c *models.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 *models.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 *models.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 *models.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 *models.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 *models.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 *models.ReqContext) response.Response
func (*HTTPServer) GetPendingOrgInvites ¶
func (hs *HTTPServer) GetPendingOrgInvites(c *models.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 *models.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) GetPlaylistDashboards ¶
func (hs *HTTPServer) GetPlaylistDashboards(c *models.ReqContext) response.Response
swagger:route GET /playlists/{uid}/dashboards playlists getPlaylistDashboards
Get playlist dashboards.
Responses: 200: getPlaylistDashboardsResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetPlaylistItems ¶
func (hs *HTTPServer) GetPlaylistItems(c *models.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 *models.ReqContext) response.Response
GetPluginDashboards get plugin dashboards.
/api/plugins/:pluginId/dashboards
func (*HTTPServer) GetPluginErrorsList ¶
func (hs *HTTPServer) GetPluginErrorsList(_ *models.ReqContext) response.Response
func (*HTTPServer) GetPluginList ¶
func (hs *HTTPServer) GetPluginList(c *models.ReqContext) response.Response
func (*HTTPServer) GetPluginMarkdown ¶
func (hs *HTTPServer) GetPluginMarkdown(c *models.ReqContext) response.Response
func (*HTTPServer) GetPluginSettingByID ¶
func (hs *HTTPServer) GetPluginSettingByID(c *models.ReqContext) response.Response
func (*HTTPServer) GetSignedInUser ¶
func (hs *HTTPServer) GetSignedInUser(c *models.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 *models.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 *models.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) GetStars ¶
func (hs *HTTPServer) GetStars(c *models.ReqContext) response.Response
func (*HTTPServer) GetTeamByID ¶
func (hs *HTTPServer) GetTeamByID(c *models.ReqContext) response.Response
swagger:route GET /teams/{team_id} teams getTeamByID
Get Team By ID.
Responses: 200: getTeamByIDResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetTeamMembers ¶
func (hs *HTTPServer) GetTeamMembers(c *models.ReqContext) response.Response
swagger:route GET /teams/{team_id}/members teams getTeamMembers
Get Team Members.
Responses: 200: getTeamMembersResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) GetTeamPreferences ¶
func (hs *HTTPServer) GetTeamPreferences(c *models.ReqContext) response.Response
swagger:route GET /teams/{team_id}/preferences teams getTeamPreferences
Get Team Preferences.
Responses: 200: getPreferencesResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) GetUserAuthTokens ¶
func (hs *HTTPServer) GetUserAuthTokens(c *models.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 *models.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 *models.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) GetUserFromLDAP ¶
func (hs *HTTPServer) GetUserFromLDAP(c *models.ReqContext) response.Response
swagger:route GET /admin/ldap/{user_name} admin_ldap getUserFromLDAP
Finds an user based on a username in LDAP. This helps illustrate how would the particular user be mapped in Grafana when synced.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:read`.
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) GetUserOrgList ¶
func (hs *HTTPServer) GetUserOrgList(c *models.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 *models.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 *models.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 *models.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) Index ¶
func (hs *HTTPServer) Index(c *models.ReqContext)
func (*HTTPServer) InstallPlugin ¶
func (hs *HTTPServer) InstallPlugin(c *models.ReqContext) response.Response
func (*HTTPServer) ListSortOptions ¶
func (hs *HTTPServer) ListSortOptions(c *models.ReqContext) response.Response
swagger:route GET /search/sorting search listSortOptions
List search sorting options.
Responses: 200: listSortOptionsResponse 401: unauthorisedError
func (*HTTPServer) LoadPlaylistDashboards ¶
func (hs *HTTPServer) LoadPlaylistDashboards(ctx context.Context, orgID int64, signedInUser *user.SignedInUser, playlistUID string) (dtos.PlaylistDashboardsSlice, error)
Deprecated -- the frontend can do this better
func (*HTTPServer) LoginAPIPing ¶
func (hs *HTTPServer) LoginAPIPing(c *models.ReqContext) response.Response
func (*HTTPServer) LoginPost ¶
func (hs *HTTPServer) LoginPost(c *models.ReqContext) response.Response
func (*HTTPServer) LoginView ¶
func (hs *HTTPServer) LoginView(c *models.ReqContext)
func (*HTTPServer) Logout ¶
func (hs *HTTPServer) Logout(c *models.ReqContext)
func (*HTTPServer) MassDeleteAnnotations ¶
func (hs *HTTPServer) MassDeleteAnnotations(c *models.ReqContext) response.Response
swagger:route POST /annotations/mass-delete annotations massDeleteAnnotations
Delete multiple annotations.
Responses: 200: okResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) NotFoundHandler ¶
func (hs *HTTPServer) NotFoundHandler(c *models.ReqContext)
func (*HTTPServer) NotificationTest ¶
func (hs *HTTPServer) NotificationTest(c *models.ReqContext) response.Response
swagger:route POST /alert-notifications/test legacy_alerts_notification_channels notificationChannelTest
Test notification channel.
Sends a test notification to the channel.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 412: SMTPNotEnabledError 500: internalServerError
func (*HTTPServer) OAuthLogin ¶
func (hs *HTTPServer) OAuthLogin(ctx *models.ReqContext)
func (*HTTPServer) PatchAnnotation ¶
func (hs *HTTPServer) PatchAnnotation(c *models.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 *models.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 *models.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) PauseAlert ¶
func (hs *HTTPServer) PauseAlert(legacyAlertingEnabled *bool) func(c *models.ReqContext) response.Response
swagger:route POST /alerts/{alert_id}/pause legacy_alerts pauseAlert
Pause/unpause alert by id.
Responses: 200: pauseAlertResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) PauseAllAlerts ¶
func (hs *HTTPServer) PauseAllAlerts(legacyAlertingEnabled *bool) func(c *models.ReqContext) response.Response
swagger:route POST /admin/pause-all-alerts admin pauseAllAlerts
Pause/unpause all (legacy) alerts.
Security: - basic:
Responses: 200: pauseAlertsResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) PostAnnotation ¶
func (hs *HTTPServer) PostAnnotation(c *models.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 *models.ReqContext) response.Response
swagger:route POST /dashboards/db dashboards postDashboard
Create / Update dashboard
Creates a new dashboard or updates an existing dashboard.
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 *models.ReqContext) response.Response
func (*HTTPServer) PostGraphiteAnnotation ¶
func (hs *HTTPServer) PostGraphiteAnnotation(c *models.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) PostSyncUserWithLDAP ¶
func (hs *HTTPServer) PostSyncUserWithLDAP(c *models.ReqContext) response.Response
swagger:route POST /admin/ldap/sync/{user_id} admin_ldap postSyncUserWithLDAP
Enables a single Grafana user to be synchronized against LDAP.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:sync`.
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) ProxyDataSourceRequest
deprecated
func (hs *HTTPServer) ProxyDataSourceRequest(c *models.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 *models.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 *models.ReqContext)
func (*HTTPServer) ProxyPluginRequest ¶
func (hs *HTTPServer) ProxyPluginRequest(c *models.ReqContext)
func (*HTTPServer) QueryMetricsV2 ¶
func (hs *HTTPServer) QueryMetricsV2(c *models.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(ctx *models.ReqContext, err error, v ...interface{}) *response.RedirectResponse
func (*HTTPServer) ReloadLDAPCfg ¶
func (hs *HTTPServer) ReloadLDAPCfg(c *models.ReqContext) response.Response
swagger:route POST /admin/ldap/reload admin_ldap reloadLDAPCfg
Reloads the LDAP configuration.
If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.config:reload`.
Security: - basic:
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) RemoveOrgUser ¶
func (hs *HTTPServer) RemoveOrgUser(c *models.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 *models.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) RemoveTeamMember ¶
func (hs *HTTPServer) RemoveTeamMember(c *models.ReqContext) response.Response
swagger:route DELETE /teams/{team_id}/members/{user_id} teams removeTeamMember
Remove Member From Team.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) RenderToPng ¶
func (hs *HTTPServer) RenderToPng(c *models.ReqContext)
func (*HTTPServer) ResetPassword ¶
func (hs *HTTPServer) ResetPassword(c *models.ReqContext) response.Response
func (*HTTPServer) RestoreDashboardVersion ¶
func (hs *HTTPServer) RestoreDashboardVersion(c *models.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) RevokeInvite ¶
func (hs *HTTPServer) RevokeInvite(c *models.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 *models.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) Search ¶
func (hs *HTTPServer) Search(c *models.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 *models.ReqContext) response.Response
swagger:route GET /dashboard/snapshots snapshots searchDashboardSnapshots
List snapshots.
Responses: 200: searchDashboardSnapshotsResponse 500: internalServerError
func (*HTTPServer) SearchOrgUsersWithPaging ¶
func (hs *HTTPServer) SearchOrgUsersWithPaging(c *models.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 *models.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 *models.ReqContext) response.Response
swagger:route GET /playlists playlists searchPlaylists
Get playlists.
Responses: 200: searchPlaylistsResponse 500: internalServerError
func (*HTTPServer) SearchTeams ¶
func (hs *HTTPServer) SearchTeams(c *models.ReqContext) response.Response
swagger:route GET /teams/search teams searchTeams
Team Search With Paging.
Responses: 200: searchTeamsResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) SendResetPasswordEmail ¶
func (hs *HTTPServer) SendResetPasswordEmail(c *models.ReqContext) response.Response
func (*HTTPServer) SetHelpFlag ¶
func (hs *HTTPServer) SetHelpFlag(c *models.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 *models.ReqContext) response.Response
POST /api/preferences/set-home-dash
func (*HTTPServer) SignUp ¶
func (hs *HTTPServer) SignUp(c *models.ReqContext) response.Response
POST /api/user/signup
func (*HTTPServer) SignUpStep2 ¶
func (hs *HTTPServer) SignUpStep2(c *models.ReqContext) response.Response
func (*HTTPServer) StarDashboard
deprecated
func (hs *HTTPServer) StarDashboard(c *models.ReqContext) response.Response
swagger:route POST /user/stars/dashboard/{dashboard_id} signed_in_user starDashboard
Star a dashboard.
Stars the given Dashboard for the actual user.
Deprecated: true
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) StarDashboardByUID ¶
func (hs *HTTPServer) StarDashboardByUID(c *models.ReqContext) response.Response
swagger:route POST /user/stars/dashboard/uid/{dashboard_uid} signed_in_user starDashboardByUID
Star a dashboard.
Stars the given Dashboard for the actual user.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) SyncUser ¶
func (hs *HTTPServer) SyncUser( ctx *models.ReqContext, extUser *models.ExternalUserInfo, connect social.SocialConnector, ) (*user.User, error)
SyncUser syncs a Grafana user profile with the corresponding OAuth profile.
func (*HTTPServer) TrimDashboard ¶
func (hs *HTTPServer) TrimDashboard(c *models.ReqContext) response.Response
swagger:route POST /dashboards/trim dashboards trimDashboard
Trim defaults from dashboard.
Responses: 200: trimDashboardResponse 401: unauthorisedError 500: internalServerError
func (*HTTPServer) UninstallPlugin ¶
func (hs *HTTPServer) UninstallPlugin(c *models.ReqContext) response.Response
func (*HTTPServer) UnstarDashboard
deprecated
func (hs *HTTPServer) UnstarDashboard(c *models.ReqContext) response.Response
swagger:route DELETE /user/stars/dashboard/{dashboard_id} signed_in_user unstarDashboard
Unstar a dashboard.
Deletes the starring of the given Dashboard for the actual user.
Deprecated: true
Please refer to the [new](#/signed_in_user/unstarDashboardByUID) API instead
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UnstarDashboardByUID ¶
func (hs *HTTPServer) UnstarDashboardByUID(c *models.ReqContext) response.Response
swagger:route DELETE /user/stars/dashboard/uid/{dashboard_uid} signed_in_user unstarDashboardByUID
Unstar a dashboard.
Deletes the starring of the given Dashboard for the actual user.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdateAlertNotification ¶
func (hs *HTTPServer) UpdateAlertNotification(c *models.ReqContext) response.Response
swagger:route PUT /alert-notifications/{notification_channel_id} legacy_alerts_notification_channels updateAlertNotificationChannel
Update notification channel by ID.
Updates an existing notification channel identified by ID.
Responses: 200: getAlertNotificationChannelResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) UpdateAlertNotificationByUID ¶
func (hs *HTTPServer) UpdateAlertNotificationByUID(c *models.ReqContext) response.Response
swagger:route PUT /alert-notifications/uid/{notification_channel_uid} legacy_alerts_notification_channels updateAlertNotificationChannelByUID
Update notification channel by UID.
Updates an existing notification channel identified by uid.
Responses: 200: getAlertNotificationChannelResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) UpdateAnnotation ¶
func (hs *HTTPServer) UpdateAnnotation(c *models.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 *models.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 *models.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 *models.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 *models.ReqContext) response.Response
func (*HTTPServer) UpdateDataSourceByUID ¶
func (hs *HTTPServer) UpdateDataSourceByUID(c *models.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 *models.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 *models.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 *models.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 *models.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 *models.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 *models.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 *models.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 *models.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 *models.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 *models.ReqContext) response.Response
func (*HTTPServer) UpdateSignedInUser ¶
func (hs *HTTPServer) UpdateSignedInUser(c *models.ReqContext) response.Response
swagger:route PUT /user signed_in_user updateSignedInUser
Update signed in User.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 500: internalServerError
func (*HTTPServer) UpdateTeam ¶
func (hs *HTTPServer) UpdateTeam(c *models.ReqContext) response.Response
swagger:route PUT /teams/{team_id} teams updateTeam
Update Team.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 409: conflictError 500: internalServerError
func (*HTTPServer) UpdateTeamMember ¶
func (hs *HTTPServer) UpdateTeamMember(c *models.ReqContext) response.Response
swagger:route PUT /teams/{team_id}/members/{user_id} teams updateTeamMember
Update Team Member.
Responses: 200: okResponse 401: unauthorisedError 403: forbiddenError 404: notFoundError 500: internalServerError
func (*HTTPServer) UpdateTeamPreferences ¶
func (hs *HTTPServer) UpdateTeamPreferences(c *models.ReqContext) response.Response
swagger:route PUT /teams/{team_id}/preferences teams updateTeamPreferences
Update Team Preferences.
Responses: 200: okResponse 400: badRequestError 401: unauthorisedError 500: internalServerError
func (*HTTPServer) UpdateUser ¶
func (hs *HTTPServer) UpdateUser(c *models.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 500: internalServerError
func (*HTTPServer) UpdateUserActiveOrg ¶
func (hs *HTTPServer) UpdateUserActiveOrg(c *models.ReqContext) response.Response
POST /api/users/:id/using/:orgId
func (*HTTPServer) UpdateUserPreferences ¶
func (hs *HTTPServer) UpdateUserPreferences(c *models.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 *models.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 *models.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) ValidateOrgAlert ¶
func (hs *HTTPServer) ValidateOrgAlert(c *models.ReqContext)
func (*HTTPServer) ValidateOrgPlaylist ¶
func (hs *HTTPServer) ValidateOrgPlaylist(c *models.ReqContext)
func (*HTTPServer) ValidateRedirectTo ¶
func (hs *HTTPServer) ValidateRedirectTo(redirectTo string) error
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 LDAPAttribute ¶
type LDAPAttribute struct { ConfigAttributeValue string `json:"cfgAttrValue"` LDAPAttributeValue string `json:"ldapValue"` }
LDAPAttribute is a serializer for user attributes mapped from LDAP. Is meant to display both the serialized value and the LDAP key we received it from.
type LDAPRoleDTO ¶
type LDAPRoleDTO struct { OrgId int64 `json:"orgId"` OrgName string `json:"orgName"` OrgRole org.RoleType `json:"orgRole"` GroupDN string `json:"groupDN"` }
RoleDTO is a serializer for mapped roles from LDAP
type LDAPServerDTO ¶
type LDAPServerDTO struct { Host string `json:"host"` Port int `json:"port"` Available bool `json:"available"` Error string `json:"error"` }
LDAPServerDTO is a serializer for LDAP server statuses
type LDAPUserDTO ¶
type LDAPUserDTO struct { Name *LDAPAttribute `json:"name"` Surname *LDAPAttribute `json:"surname"` Email *LDAPAttribute `json:"email"` Username *LDAPAttribute `json:"login"` IsGrafanaAdmin *bool `json:"isGrafanaAdmin"` IsDisabled bool `json:"isDisabled"` OrgRoles []LDAPRoleDTO `json:"roles"` Teams []models.TeamOrgGroupDTO `json:"teams"` }
LDAPUserDTO is a serializer for users mapped from LDAP
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 LoginError ¶
type LookupAlertNotificationChannelsResponse ¶
type LookupAlertNotificationChannelsResponse struct { // The response message // in: body Body []*dtos.AlertNotificationLookup `json:"body"` }
swagger:response getAlertNotificationLookupResponse
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 NotFoundError ¶
type NotFoundError GenericError
NotFoundError is returned when the requested resource was not found.
swagger:response notFoundError
type NotificationChannelTestParams ¶
type NotificationChannelTestParams struct { // in:body // required:true Body dtos.NotificationTestCommand `json:"body"` }
swagger:parameters notificationChannelTest
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 PauseAlertParams ¶
type PauseAlertParams struct { // in:path // required:true AlertID string `json:"alert_id"` // in:body // required:true Body dtos.PauseAlertCommand `json:"body"` }
swagger:parameters pauseAlert
type PauseAlertResponse ¶
type PauseAlertResponse struct { // in:body Body struct { // required: true AlertID int64 `json:"alertId"` // required: true Message string `json:"message"` // Alert result state // required true State string `json:"state"` } `json:"body"` }
swagger:response pauseAlertResponse
type PauseAllAlertsParams ¶
type PauseAllAlertsParams struct { // in:body // required:true Body dtos.PauseAllAlertsCommand `json:"body"` }
swagger:parameters pauseAllAlerts
type PauseAllAlertsResponse ¶
type PauseAllAlertsResponse struct { // in:body Body struct { // AlertsAffected is the number of the affected alerts. // required: true AlertsAffected int64 `json:"alertsAffected"` // required: true Message string `json:"message"` // Alert result state // required true State string `json:"state"` } `json:"body"` }
swagger:response pauseAlertsResponse
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 models.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 string `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"` } `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 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 RemoveTeamMemberParams ¶
type RemoveTeamMemberParams struct { // in:path // required:true TeamID string `json:"team_id"` // in:path // required:true UserID int64 `json:"user_id"` }
swagger:parameters removeTeamMember
type RenderReportPDFParams ¶
type RenderReportPDFParams struct { // in:path DashboardID int64 }
swagger:parameters renderReportPDF
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 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 models.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 SearchOrgsResponse ¶
type SearchOrgsResponse struct { // The response message // in: body Body []*models.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 // in:query // required: false 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 // in:query // required: false FolderIds []int64 `json:"folderIds"` // 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"` }
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 SearchTeamsParams ¶
type SearchTeamsParams 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 searchTeams
type SearchTeamsResponse ¶
type SearchTeamsResponse struct { // The response message // in: body Body models.SearchTeamQueryResult `json:"body"` }
swagger:response searchTeamsResponse
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 SearchUsersResponse ¶
type SearchUsersResponse struct { // The response message // in: body Body models.SearchUserQueryResult `json:"body"` }
swagger:response searchUsersResponse
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 StarDashboardByUIDParams ¶
type StarDashboardByUIDParams struct { // in:path // required:true DashboardUID string `json:"dashboard_uid"` }
swagger:parameters starDashboardByUID
type StarDashboardParams ¶
type StarDashboardParams struct { // in:path // required:true DashboardID string `json:"dashboard_id"` }
swagger:parameters starDashboard
type SuccessResponseBody ¶
type SuccessResponseBody struct {
Message string `json:"message,omitempty"`
}
swagger:model
type SyncLDAPUserParams ¶
type SyncLDAPUserParams struct { // in:path // required:true UserID int64 `json:"user_id"` }
swagger:parameters postSyncUserWithLDAP
type TestAlertParams ¶
type TestAlertParams struct { // in:body Body dtos.AlertTestCommand `json:"body"` }
swagger:parameters testAlert
type TestAlertResponse ¶
type TestAlertResponse struct { // The response message // in: body Body *dtos.AlertTestResult `json:"body"` }
swagger:response testAlertResponse
type TrimDashboardParams ¶
type TrimDashboardParams struct { // in:body // required:true Body models.TrimDashboardCommand }
swagger:parameters trimDashboard
type TrimDashboardResponse ¶
type TrimDashboardResponse struct { // in: body Body dtos.TrimDashboardFullWithMeta `json:"body"` }
swagger:response trimDashboardResponse
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 UnstarDashboardByUIDParams ¶
type UnstarDashboardByUIDParams struct { // in:path // required:true DashboardUID string `json:"dashboard_uid"` }
swagger:parameters unstarDashboardByUID
type UnstarDashboardParams ¶
type UnstarDashboardParams struct { // in:path // required:true DashboardID string `json:"dashboard_id"` }
swagger:parameters unstarDashboard
type UpdateAlertNotificationChannelByUIDParams ¶
type UpdateAlertNotificationChannelByUIDParams struct { // in:body // required:true Body models.UpdateAlertNotificationWithUidCommand `json:"body"` // in:path // required:true NotificationUID string `json:"notification_channel_uid"` }
swagger:parameters updateAlertNotificationChannelByUID
type UpdateAlertNotificationChannelParams ¶
type UpdateAlertNotificationChannelParams struct { // in:body // required:true Body models.UpdateAlertNotificationCommand `json:"body"` // in:path // required:true NotificationID int64 `json:"notification_channel_id"` }
swagger:parameters updateAlertNotificationChannel
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 models.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 models.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 models.UpdateOrgQuotaCmd `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 models.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 models.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 models.UpdateUserCommand `json:"body"` }
swagger:parameters updateSignedInUser
type UpdateTeamMemberParams ¶
type UpdateTeamMemberParams struct { // in:body // required:true Body models.UpdateTeamMemberCommand `json:"body"` // in:path // required:true TeamID string `json:"team_id"` // in:path // required:true UserID int64 `json:"user_id"` }
swagger:parameters updateTeamMember
type UpdateTeamParams ¶
type UpdateTeamParams struct { // in:body // required:true Body models.UpdateTeamCommand `json:"body"` // in:path // required:true TeamID string `json:"team_id"` }
swagger:parameters updateTeam
type UpdateTeamPreferencesParams ¶
type UpdateTeamPreferencesParams struct { // in:path // required:true TeamID string `json:"team_id"` // in:body // required:true Body dtos.UpdatePrefsCmd `json:"body"` }
swagger:parameters updateTeamPreferences
type UpdateUserParams ¶
type UpdateUserParams struct { // To change the email, name, login, theme, provide another one. // in:body // required:true Body models.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 models.UpdateUserQuotaCmd `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 models.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
- comments.go
- dashboard.go
- dashboard_permission.go
- dashboard_snapshot.go
- dataproxy.go
- datasources.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
- ldap_debug.go
- login.go
- login_oauth.go
- metrics.go
- openapi3.go
- org.go
- org_invite.go
- org_users.go
- password.go
- playlist.go
- playlist_play.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
- stars.go
- swagger.go
- swagger_responses.go
- team.go
- team_members.go
- user.go
- user_token.go
- utils.go