Documentation
¶
Overview ¶
Package api contains API logic.
Index ¶
- Constants
- Variables
- func AddDataSource(c *models.ReqContext, cmd models.AddDataSourceCommand) response.Response
- func AddOrgInvite(c *models.ReqContext, inviteDto dtos.AddInviteForm) response.Response
- func AdminDeleteUser(c *models.ReqContext) response.Response
- func AdminEnableUser(c *models.ReqContext) response.Response
- func AdminGetStats(c *models.ReqContext) response.Response
- func AdminUpdateUserPassword(c *models.ReqContext, form dtos.AdminUpdateUserPasswordForm) response.Response
- func AppPluginRoute(route *plugins.Route, appID string, hs *HTTPServer) web.Handler
- func BasicAuthenticatedRequest(req *http.Request, expectedUser, expectedPass string) bool
- func CalculateDashboardDiff(c *models.ReqContext, apiOptions dtos.CalculateDiffOptions) response.Response
- func ChangeUserPassword(c *models.ReqContext, cmd models.ChangeUserPasswordCommand) response.Response
- func ClearHelpFlags(c *models.ReqContext) response.Response
- func CreateAlertNotification(c *models.ReqContext, cmd models.CreateAlertNotificationCommand) response.Response
- func CreateDashboardSnapshot(c *models.ReqContext, cmd models.CreateDashboardSnapshotCommand)
- func CreatePlaylist(c *models.ReqContext, cmd models.CreatePlaylistCommand) response.Response
- func DeleteAPIKey(c *models.ReqContext) response.Response
- func DeleteAlertNotification(c *models.ReqContext) response.Response
- func DeleteAlertNotificationByUID(c *models.ReqContext) response.Response
- func DeleteAnnotationByID(c *models.ReqContext) response.Response
- func DeleteAnnotations(c *models.ReqContext, cmd dtos.DeleteAnnotationsCmd) response.Response
- func DeleteDashboardSnapshot(c *models.ReqContext) response.Response
- func DeleteDashboardSnapshotByDeleteKey(c *models.ReqContext) response.Response
- func DeleteOrgByID(c *models.ReqContext) response.Response
- func DeletePlaylist(c *models.ReqContext) response.Response
- func GenStateString() (string, error)
- func GetAPIKeys(c *models.ReqContext) response.Response
- func GetAlert(c *models.ReqContext) response.Response
- func GetAlertNotificationByID(c *models.ReqContext) response.Response
- func GetAlertNotificationByUID(c *models.ReqContext) response.Response
- func GetAlertNotificationLookup(c *models.ReqContext) response.Response
- func GetAlertNotifications(c *models.ReqContext) response.Response
- func GetAlertNotifiers(ngalertEnabled bool) func(*models.ReqContext) response.Response
- func GetAlertStatesForDashboard(c *models.ReqContext) response.Response
- func GetAlerts(c *models.ReqContext) response.Response
- func GetAnnotationTags(c *models.ReqContext) response.Response
- func GetAnnotations(c *models.ReqContext) response.Response
- func GetAuthProviderLabel(authModule string) string
- func GetCurrentOrg(c *models.ReqContext) response.Response
- func GetDashboardSnapshot(c *models.ReqContext) response.Response
- func GetDashboardTags(c *models.ReqContext)
- func GetDashboardVersion(c *models.ReqContext) response.Response
- func GetDashboardVersions(c *models.ReqContext) response.Response
- func GetDataSourceById(c *models.ReqContext) response.Response
- func GetDataSourceByName(c *models.ReqContext) response.Response
- func GetDataSourceByUID(c *models.ReqContext) response.Response
- func GetDataSourceIdByName(c *models.ReqContext) response.Response
- func GetInviteInfoByCode(c *models.ReqContext) response.Response
- func GetOrgByID(c *models.ReqContext) response.Response
- func GetPendingOrgInvites(c *models.ReqContext) response.Response
- func GetPlaylist(c *models.ReqContext) response.Response
- func GetPlaylistDashboards(c *models.ReqContext) response.Response
- func GetPlaylistItems(c *models.ReqContext) response.Response
- func GetSharingOptions(c *models.ReqContext)
- func GetSignUpOptions(c *models.ReqContext) response.Response
- func GetSignedInUser(c *models.ReqContext) response.Response
- func GetSignedInUserOrgList(c *models.ReqContext) response.Response
- func GetSignedInUserTeamList(c *models.ReqContext) response.Response
- func GetUserByID(c *models.ReqContext) response.Response
- func GetUserByLoginOrEmail(c *models.ReqContext) response.Response
- func GetUserOrgList(c *models.ReqContext) response.Response
- func GetUserQuotas(c *models.ReqContext) response.Response
- func GetUserTeams(c *models.ReqContext) response.Response
- func LoadPlaylistDashboards(ctx context.Context, orgID int64, signedInUser *models.SignedInUser, ...) (dtos.PlaylistDashboardsSlice, error)
- func LoadPlaylistItemDTOs(ctx context.Context, id int64) ([]models.PlaylistItemDTO, error)
- func LoadPlaylistItems(ctx context.Context, id int64) ([]models.PlaylistItem, error)
- func NewFrontendLogMessageHandler(store *frontendlogging.SourceMapStore) frontendLogMessageHandler
- func NotificationTest(c *models.ReqContext, dto dtos.NotificationTestCommand) response.Response
- func PatchAnnotation(c *models.ReqContext, cmd dtos.PatchAnnotationsCmd) response.Response
- func PauseAlert(c *models.ReqContext, dto dtos.PauseAlertCommand) response.Response
- func PauseAllAlerts(c *models.ReqContext, dto dtos.PauseAllAlertsCommand) response.Response
- func PostAnnotation(c *models.ReqContext, cmd dtos.PostAnnotationsCmd) response.Response
- func PostGraphiteAnnotation(c *models.ReqContext, cmd dtos.PostGraphiteAnnotationsCmd) response.Response
- func ResetPassword(c *models.ReqContext, form dtos.ResetUserPasswordForm) response.Response
- func ReverseProxyGnetReq(proxyPath string, version string) *httputil.ReverseProxy
- func RevokeInvite(c *models.ReqContext) response.Response
- func Search(c *models.ReqContext) response.Response
- func SearchDashboardSnapshots(c *models.ReqContext) response.Response
- func SearchOrgs(c *models.ReqContext) response.Response
- func SearchPlaylists(c *models.ReqContext) response.Response
- func SendResetPasswordEmail(c *models.ReqContext, form dtos.SendResetPasswordEmailForm) response.Response
- func SetHelpFlag(c *models.ReqContext) response.Response
- func SetHomeDashboard(c *models.ReqContext, cmd models.SavePreferencesCommand) response.Response
- func SignUp(c *models.ReqContext, form dtos.SignUpForm) response.Response
- func StarDashboard(c *models.ReqContext) response.Response
- func UnstarDashboard(c *models.ReqContext) response.Response
- func UpdateAnnotation(c *models.ReqContext, cmd dtos.UpdateAnnotationsCmd) response.Response
- func UpdateCurrentOrg(c *models.ReqContext, form dtos.UpdateOrgForm) response.Response
- func UpdateCurrentOrgAddress(c *models.ReqContext, form dtos.UpdateOrgAddressForm) response.Response
- func UpdateOrg(c *models.ReqContext, form dtos.UpdateOrgForm) response.Response
- func UpdateOrgAddress(c *models.ReqContext, form dtos.UpdateOrgAddressForm) response.Response
- func UpdatePlaylist(c *models.ReqContext, cmd models.UpdatePlaylistCommand) response.Response
- func UpdateSignedInUser(c *models.ReqContext, cmd models.UpdateUserCommand) response.Response
- func UpdateUser(c *models.ReqContext, cmd models.UpdateUserCommand) response.Response
- func UpdateUserActiveOrg(c *models.ReqContext) response.Response
- func UpdateUserQuota(c *models.ReqContext, cmd models.UpdateUserQuotaCmd) response.Response
- func UserSetUsingOrg(c *models.ReqContext) response.Response
- func ValidateOrgAlert(c *models.ReqContext)
- func ValidateOrgPlaylist(c *models.ReqContext)
- type CreateAnnotationError
- type CreateExternalSnapshotResponse
- type EnabledPlugins
- type HTTPServer
- func (hs *HTTPServer) AddAPIKey(c *models.ReqContext, cmd models.AddApiKeyCommand) response.Response
- func (hs *HTTPServer) AddMiddleware(middleware web.Handler)
- func (hs *HTTPServer) AddOrgUser(c *models.ReqContext, cmd models.AddOrgUserCommand) response.Response
- func (hs *HTTPServer) AddOrgUserToCurrentOrg(c *models.ReqContext, cmd models.AddOrgUserCommand) response.Response
- func (hs *HTTPServer) AddTeamMember(c *models.ReqContext, cmd models.AddTeamMemberCommand) response.Response
- func (hs *HTTPServer) AdditionalAPIKey(c *models.ReqContext, cmd models.AddApiKeyCommand) response.Response
- func (hs *HTTPServer) AdminCreateUser(c *models.ReqContext, form dtos.AdminCreateUserForm) response.Response
- func (hs *HTTPServer) AdminDisableUser(c *models.ReqContext) response.Response
- func (hs *HTTPServer) AdminGetSettings(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) 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) AdminRevokeUserAuthToken(c *models.ReqContext, cmd models.RevokeAuthTokenCmd) response.Response
- func (hs *HTTPServer) AdminUpdateUserPermissions(c *models.ReqContext, form dtos.AdminUpdateUserPermissionsForm) response.Response
- func (hs *HTTPServer) AlertTest(c *models.ReqContext, dto dtos.AlertTestCommand) response.Response
- func (hs *HTTPServer) CallDatasourceResource(c *models.ReqContext)
- func (hs *HTTPServer) CallResource(c *models.ReqContext)
- func (hs *HTTPServer) ChangeActiveOrgAndRedirectToHome(c *models.ReqContext)
- func (hs *HTTPServer) CheckDatasourceHealth(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CheckHealth(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CollectPluginMetrics(c *models.ReqContext) response.Response
- func (hs *HTTPServer) CompleteInvite(c *models.ReqContext, completeInvite dtos.CompleteInviteForm) response.Response
- func (hs *HTTPServer) CookieOptionsFromCfg() cookies.CookieOptions
- func (hs *HTTPServer) CreateFolder(c *models.ReqContext, cmd models.CreateFolderCommand) response.Response
- func (hs *HTTPServer) CreateOrg(c *models.ReqContext, cmd models.CreateOrgCommand) response.Response
- func (hs *HTTPServer) CreateTeam(c *models.ReqContext, cmd models.CreateTeamCommand) response.Response
- func (hs *HTTPServer) DeleteDashboardBySlug(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDashboardByUID(c *models.ReqContext) response.Response
- func (hs *HTTPServer) DeleteDataSourceById(c *models.ReqContext) response.Response
- 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) DeleteTeamByID(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.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) GetLDAPStatus(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) 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) 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) GetUserFromLDAP(c *models.ReqContext) response.Response
- func (hs *HTTPServer) GetUserPreferences(c *models.ReqContext) response.Response
- func (hs *HTTPServer) ImportDashboard(c *models.ReqContext, apiCmd dtos.ImportDashboardCommand) response.Response
- func (hs *HTTPServer) Index(c *models.ReqContext)
- func (hs *HTTPServer) InstallPlugin(c *models.ReqContext, dto dtos.InstallPluginCommand) response.Response
- func (hs *HTTPServer) ListSortOptions(c *models.ReqContext) response.Response
- 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) NotFoundHandler(c *models.ReqContext)
- func (hs *HTTPServer) OAuthLogin(ctx *models.ReqContext)
- func (hs *HTTPServer) PostDashboard(c *models.ReqContext, cmd models.SaveDashboardCommand) response.Response
- func (hs *HTTPServer) PostFrontendMetrics(c *models.ReqContext, cmd metrics.PostFrontendMetricsCommand) response.Response
- func (hs *HTTPServer) PostSyncUserWithLDAP(c *models.ReqContext) response.Response
- func (hs *HTTPServer) ProxyDataSourceRequest(c *models.ReqContext)
- func (hs *HTTPServer) ProxyGnetRequest(c *models.ReqContext)
- func (hs *HTTPServer) QueryMetrics(c *models.ReqContext, reqDto dtos.MetricRequest) response.Response
- func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext, reqDTO dtos.MetricRequest) response.Response
- func (hs *HTTPServer) RedirectResponseWithError(ctx *models.ReqContext, err error, v ...interface{}) *response.RedirectResponse
- func (hs *HTTPServer) ReloadLDAPCfg() 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) RestoreDashboardVersion(c *models.ReqContext, apiCmd dtos.RestoreDashboardVersionCommand) response.Response
- func (hs *HTTPServer) RevokeUserAuthToken(c *models.ReqContext, cmd models.RevokeAuthTokenCmd) response.Response
- func (hs *HTTPServer) Run(ctx context.Context) error
- func (hs *HTTPServer) SearchOrgUsersWithPaging(ctx context.Context, c *models.ReqContext) response.Response
- func (hs *HTTPServer) SearchTeams(c *models.ReqContext) response.Response
- func (hs *HTTPServer) SignUpStep2(c *models.ReqContext, form dtos.SignUpStep2Form) response.Response
- func (hs *HTTPServer) TrimDashboard(c *models.ReqContext, cmd models.TrimDashboardCommand) response.Response
- func (hs *HTTPServer) UninstallPlugin(c *models.ReqContext) response.Response
- func (hs *HTTPServer) UpdateAlertNotification(c *models.ReqContext, cmd models.UpdateAlertNotificationCommand) response.Response
- func (hs *HTTPServer) UpdateAlertNotificationByUID(c *models.ReqContext, cmd models.UpdateAlertNotificationWithUidCommand) response.Response
- func (hs *HTTPServer) UpdateDashboardPermissions(c *models.ReqContext, apiCmd dtos.UpdateDashboardAclCommand) response.Response
- func (hs *HTTPServer) UpdateDataSource(c *models.ReqContext, cmd models.UpdateDataSourceCommand) response.Response
- func (hs *HTTPServer) UpdateFolder(c *models.ReqContext, cmd models.UpdateFolderCommand) response.Response
- func (hs *HTTPServer) UpdateFolderPermissions(c *models.ReqContext, apiCmd dtos.UpdateDashboardAclCommand) response.Response
- func (hs *HTTPServer) UpdateOrgPreferences(c *models.ReqContext, dtoCmd dtos.UpdatePrefsCmd) response.Response
- func (hs *HTTPServer) UpdateOrgQuota(c *models.ReqContext, cmd models.UpdateOrgQuotaCmd) response.Response
- func (hs *HTTPServer) UpdateOrgUser(c *models.ReqContext, cmd models.UpdateOrgUserCommand) response.Response
- func (hs *HTTPServer) UpdateOrgUserForCurrentOrg(c *models.ReqContext, cmd models.UpdateOrgUserCommand) response.Response
- func (hs *HTTPServer) UpdatePluginSetting(c *models.ReqContext, cmd models.UpdatePluginSettingCmd) response.Response
- func (hs *HTTPServer) UpdateTeam(c *models.ReqContext, cmd models.UpdateTeamCommand) response.Response
- func (hs *HTTPServer) UpdateTeamMember(c *models.ReqContext, cmd models.UpdateTeamMemberCommand) response.Response
- func (hs *HTTPServer) UpdateTeamPreferences(c *models.ReqContext, dtoCmd dtos.UpdatePrefsCmd) response.Response
- func (hs *HTTPServer) UpdateUserPreferences(c *models.ReqContext, dtoCmd dtos.UpdatePrefsCmd) response.Response
- func (hs *HTTPServer) ValidateRedirectTo(redirectTo string) error
- type LDAPAttribute
- type LDAPRoleDTO
- type LDAPServerDTO
- type LDAPUserDTO
- type LoginError
- type PreloadPlugin
- type ServerOptions
Constants ¶
const ( OauthStateCookieName = "oauth_state" OauthPKCECookieName = "oauth_code_verifier" )
const ( ActionProvisioningReload = "provisioning:reload" ActionDatasourcesRead = "datasources:read" ActionDatasourcesQuery = "datasources:query" ActionDatasourcesCreate = "datasources:create" ActionDatasourcesWrite = "datasources:write" ActionDatasourcesDelete = "datasources:delete" ActionDatasourcesIDRead = "datasources.id:read" ActionOrgsRead = "orgs:read" ActionOrgsPreferencesRead = "orgs.preferences:read" ActionOrgsQuotasRead = "orgs.quotas:read" ActionOrgsWrite = "orgs:write" ActionOrgsPreferencesWrite = "orgs.preferences:write" ActionOrgsQuotasWrite = "orgs.quotas:write" ActionOrgsDelete = "orgs:delete" ActionOrgsCreate = "orgs:create" )
API related actions
Variables ¶
var ( ScopeProvisionersAll = accesscontrol.Scope("provisioners", "*") ScopeProvisionersDashboards = accesscontrol.Scope("provisioners", "dashboards") ScopeProvisionersPlugins = accesscontrol.Scope("provisioners", "plugins") ScopeProvisionersDatasources = accesscontrol.Scope("provisioners", "datasources") ScopeProvisionersNotifications = accesscontrol.Scope("provisioners", "notifications") ScopeDatasourcesAll = accesscontrol.Scope("datasources", "*") ScopeDatasourceID = accesscontrol.Scope("datasources", "id", accesscontrol.Parameter(":id")) ScopeDatasourceUID = accesscontrol.Scope("datasources", "uid", accesscontrol.Parameter(":uid")) ScopeDatasourceName = accesscontrol.Scope("datasources", "name", accesscontrol.Parameter(":name")) )
API related scopes
Functions ¶
func AddDataSource ¶
func AddDataSource(c *models.ReqContext, cmd models.AddDataSourceCommand) response.Response
func AddOrgInvite ¶
func AddOrgInvite(c *models.ReqContext, inviteDto dtos.AddInviteForm) response.Response
func AdminDeleteUser ¶
func AdminDeleteUser(c *models.ReqContext) response.Response
func AdminEnableUser ¶
func AdminEnableUser(c *models.ReqContext) response.Response
POST /api/admin/users/:id/enable
func AdminGetStats ¶
func AdminGetStats(c *models.ReqContext) response.Response
func AdminUpdateUserPassword ¶
func AdminUpdateUserPassword(c *models.ReqContext, form dtos.AdminUpdateUserPasswordForm) response.Response
func AppPluginRoute ¶
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 CalculateDashboardDiff ¶
func CalculateDashboardDiff(c *models.ReqContext, apiOptions dtos.CalculateDiffOptions) response.Response
POST /api/dashboards/calculate-diff performs diffs on two dashboards
func ChangeUserPassword ¶
func ChangeUserPassword(c *models.ReqContext, cmd models.ChangeUserPasswordCommand) response.Response
func ClearHelpFlags ¶
func ClearHelpFlags(c *models.ReqContext) response.Response
func CreateAlertNotification ¶
func CreateAlertNotification(c *models.ReqContext, cmd models.CreateAlertNotificationCommand) response.Response
func CreateDashboardSnapshot ¶
func CreateDashboardSnapshot(c *models.ReqContext, cmd models.CreateDashboardSnapshotCommand)
POST /api/snapshots
func CreatePlaylist ¶
func CreatePlaylist(c *models.ReqContext, cmd models.CreatePlaylistCommand) response.Response
func DeleteAPIKey ¶
func DeleteAPIKey(c *models.ReqContext) response.Response
DeleteAPIKey deletes an API key
func DeleteAlertNotification ¶
func DeleteAlertNotification(c *models.ReqContext) response.Response
func DeleteAlertNotificationByUID ¶
func DeleteAlertNotificationByUID(c *models.ReqContext) response.Response
func DeleteAnnotationByID ¶
func DeleteAnnotationByID(c *models.ReqContext) response.Response
func DeleteAnnotations ¶
func DeleteAnnotations(c *models.ReqContext, cmd dtos.DeleteAnnotationsCmd) response.Response
func DeleteDashboardSnapshot ¶
func DeleteDashboardSnapshot(c *models.ReqContext) response.Response
DELETE /api/snapshots/:key
func DeleteDashboardSnapshotByDeleteKey ¶
func DeleteDashboardSnapshotByDeleteKey(c *models.ReqContext) response.Response
GET /api/snapshots-delete/:deleteKey
func DeleteOrgByID ¶
func DeleteOrgByID(c *models.ReqContext) response.Response
DELETE /api/orgs/:orgId
func DeletePlaylist ¶
func DeletePlaylist(c *models.ReqContext) response.Response
func GenStateString ¶
func GetAPIKeys ¶
func GetAPIKeys(c *models.ReqContext) response.Response
GetAPIKeys returns a list of API keys
func GetAlertNotificationByID ¶
func GetAlertNotificationByID(c *models.ReqContext) response.Response
func GetAlertNotificationByUID ¶
func GetAlertNotificationByUID(c *models.ReqContext) response.Response
func GetAlertNotificationLookup ¶
func GetAlertNotificationLookup(c *models.ReqContext) response.Response
func GetAlertNotifications ¶
func GetAlertNotifications(c *models.ReqContext) response.Response
func GetAlertNotifiers ¶
func GetAlertNotifiers(ngalertEnabled bool) func(*models.ReqContext) response.Response
func GetAlertStatesForDashboard ¶
func GetAlertStatesForDashboard(c *models.ReqContext) response.Response
func GetAnnotationTags ¶
func GetAnnotationTags(c *models.ReqContext) response.Response
func GetAnnotations ¶
func GetAnnotations(c *models.ReqContext) response.Response
func GetAuthProviderLabel ¶
func GetDashboardSnapshot ¶
func GetDashboardSnapshot(c *models.ReqContext) response.Response
GET /api/snapshots/:key
func GetDashboardTags ¶
func GetDashboardTags(c *models.ReqContext)
func GetDashboardVersion ¶
func GetDashboardVersion(c *models.ReqContext) response.Response
GetDashboardVersion returns the dashboard version with the given ID.
func GetDashboardVersions ¶
func GetDashboardVersions(c *models.ReqContext) response.Response
GetDashboardVersions returns all dashboard versions as JSON
func GetDataSourceById ¶
func GetDataSourceById(c *models.ReqContext) response.Response
func GetDataSourceByName ¶
func GetDataSourceByName(c *models.ReqContext) response.Response
Get /api/datasources/name/:name
func GetDataSourceByUID ¶
func GetDataSourceByUID(c *models.ReqContext) response.Response
GET /api/datasources/uid/:uid
func GetDataSourceIdByName ¶
func GetDataSourceIdByName(c *models.ReqContext) response.Response
Get /api/datasources/id/:name
func GetInviteInfoByCode ¶
func 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 GetPendingOrgInvites ¶
func GetPendingOrgInvites(c *models.ReqContext) response.Response
func GetPlaylist ¶
func GetPlaylist(c *models.ReqContext) response.Response
func GetPlaylistDashboards ¶
func GetPlaylistDashboards(c *models.ReqContext) response.Response
func GetPlaylistItems ¶
func GetPlaylistItems(c *models.ReqContext) response.Response
func GetSharingOptions ¶
func GetSharingOptions(c *models.ReqContext)
func GetSignUpOptions ¶
func GetSignUpOptions(c *models.ReqContext) response.Response
GET /api/user/signup/options
func GetSignedInUser ¶
func GetSignedInUser(c *models.ReqContext) response.Response
GET /api/user (current authenticated user)
func GetSignedInUserOrgList ¶
func GetSignedInUserOrgList(c *models.ReqContext) response.Response
GET /api/user/orgs
func GetSignedInUserTeamList ¶
func GetSignedInUserTeamList(c *models.ReqContext) response.Response
GET /api/user/teams
func GetUserByLoginOrEmail ¶
func GetUserByLoginOrEmail(c *models.ReqContext) response.Response
GET /api/users/lookup
func GetUserOrgList ¶
func GetUserOrgList(c *models.ReqContext) response.Response
GET /api/users/:id/orgs
func GetUserQuotas ¶
func GetUserQuotas(c *models.ReqContext) response.Response
func GetUserTeams ¶
func GetUserTeams(c *models.ReqContext) response.Response
GET /api/users/:id/teams
func LoadPlaylistDashboards ¶
func LoadPlaylistDashboards(ctx context.Context, orgID int64, signedInUser *models.SignedInUser, playlistID int64) (dtos.PlaylistDashboardsSlice, error)
func LoadPlaylistItemDTOs ¶
func LoadPlaylistItems ¶
func NewFrontendLogMessageHandler ¶
func NewFrontendLogMessageHandler(store *frontendlogging.SourceMapStore) frontendLogMessageHandler
func NotificationTest ¶
func NotificationTest(c *models.ReqContext, dto dtos.NotificationTestCommand) response.Response
POST /api/alert-notifications/test
func PatchAnnotation ¶
func PatchAnnotation(c *models.ReqContext, cmd dtos.PatchAnnotationsCmd) response.Response
func PauseAlert ¶
func PauseAlert(c *models.ReqContext, dto dtos.PauseAlertCommand) response.Response
POST /api/alerts/:alertId/pause
func PauseAllAlerts ¶
func PauseAllAlerts(c *models.ReqContext, dto dtos.PauseAllAlertsCommand) response.Response
POST /api/admin/pause-all-alerts
func PostAnnotation ¶
func PostAnnotation(c *models.ReqContext, cmd dtos.PostAnnotationsCmd) response.Response
func PostGraphiteAnnotation ¶
func PostGraphiteAnnotation(c *models.ReqContext, cmd dtos.PostGraphiteAnnotationsCmd) response.Response
func ResetPassword ¶
func ResetPassword(c *models.ReqContext, form dtos.ResetUserPasswordForm) response.Response
func ReverseProxyGnetReq ¶
func ReverseProxyGnetReq(proxyPath string, version string) *httputil.ReverseProxy
func RevokeInvite ¶
func RevokeInvite(c *models.ReqContext) response.Response
func SearchDashboardSnapshots ¶
func SearchDashboardSnapshots(c *models.ReqContext) response.Response
GET /api/dashboard/snapshots
func SearchOrgs ¶
func SearchOrgs(c *models.ReqContext) response.Response
func SearchPlaylists ¶
func SearchPlaylists(c *models.ReqContext) response.Response
func SendResetPasswordEmail ¶
func SendResetPasswordEmail(c *models.ReqContext, form dtos.SendResetPasswordEmailForm) response.Response
func SetHelpFlag ¶
func SetHelpFlag(c *models.ReqContext) response.Response
func SetHomeDashboard ¶
func SetHomeDashboard(c *models.ReqContext, cmd models.SavePreferencesCommand) response.Response
POST /api/preferences/set-home-dash
func SignUp ¶
func SignUp(c *models.ReqContext, form dtos.SignUpForm) response.Response
POST /api/user/signup
func StarDashboard ¶
func StarDashboard(c *models.ReqContext) response.Response
func UnstarDashboard ¶
func UnstarDashboard(c *models.ReqContext) response.Response
func UpdateAnnotation ¶
func UpdateAnnotation(c *models.ReqContext, cmd dtos.UpdateAnnotationsCmd) response.Response
func UpdateCurrentOrg ¶
func UpdateCurrentOrg(c *models.ReqContext, form dtos.UpdateOrgForm) response.Response
PUT /api/org
func UpdateCurrentOrgAddress ¶
func UpdateCurrentOrgAddress(c *models.ReqContext, form dtos.UpdateOrgAddressForm) response.Response
PUT /api/org/address
func UpdateOrg ¶
func UpdateOrg(c *models.ReqContext, form dtos.UpdateOrgForm) response.Response
PUT /api/orgs/:orgId
func UpdateOrgAddress ¶
func UpdateOrgAddress(c *models.ReqContext, form dtos.UpdateOrgAddressForm) response.Response
PUT /api/orgs/:orgId/address
func UpdatePlaylist ¶
func UpdatePlaylist(c *models.ReqContext, cmd models.UpdatePlaylistCommand) response.Response
func UpdateSignedInUser ¶
func UpdateSignedInUser(c *models.ReqContext, cmd models.UpdateUserCommand) response.Response
POST /api/user
func UpdateUser ¶
func UpdateUser(c *models.ReqContext, cmd models.UpdateUserCommand) response.Response
POST /api/users/:id
func UpdateUserActiveOrg ¶
func UpdateUserActiveOrg(c *models.ReqContext) response.Response
POST /api/users/:id/using/:orgId
func UpdateUserQuota ¶
func UpdateUserQuota(c *models.ReqContext, cmd models.UpdateUserQuotaCmd) response.Response
func UserSetUsingOrg ¶
func UserSetUsingOrg(c *models.ReqContext) response.Response
POST /api/user/using/:id
func ValidateOrgAlert ¶
func ValidateOrgAlert(c *models.ReqContext)
func ValidateOrgPlaylist ¶
func ValidateOrgPlaylist(c *models.ReqContext)
Types ¶
type CreateAnnotationError ¶
type CreateAnnotationError struct {
// contains filtered or unexported fields
}
func (*CreateAnnotationError) Error ¶
func (e *CreateAnnotationError) Error() string
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 HTTPServer ¶
type HTTPServer struct {
PluginContextProvider *plugincontext.Provider
RouteRegister routing.RouteRegister
Bus bus.Bus
RenderService rendering.Service
Cfg *setting.Cfg
SettingsProvider setting.Provider
HooksService *hooks.HooksService
CacheService *localcache.CacheService
DataSourceCache datasources.CacheService
AuthTokenService models.UserTokenService
QuotaService *quota.QuotaService
RemoteCacheService *remotecache.RemoteCache
ProvisioningService provisioning.ProvisioningService
Login login.Service
License models.Licensing
AccessControl accesscontrol.AccessControl
DataProxy *datasourceproxy.DataSourceProxyService
PluginRequestValidator models.PluginRequestValidator
SearchService *search.SearchService
ShortURLService shorturls.Service
Live *live.GrafanaLive
LivePushGateway *pushhttp.Gateway
ContextHandler *contexthandler.ContextHandler
SQLStore *sqlstore.SQLStore
AlertEngine *alerting.AlertEngine
LoadSchemaService *schemaloader.SchemaLoaderService
AlertNG *ngalert.AlertNG
LibraryPanelService librarypanels.Service
LibraryElementService libraryelements.Service
SocialService social.Service
OAuthTokenService oauthtoken.OAuthTokenService
Listener net.Listener
EncryptionService encryption.Internal
SecretsService secrets.Service
DataSourcesService *datasources.Service
// 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, legacyDataRequestHandler legacydata.RequestHandler, alertEngine *alerting.AlertEngine, pluginRequestValidator models.PluginRequestValidator, pluginStaticRouteResolver plugins.StaticRouteResolver, pluginDashboardManager plugins.PluginDashboardManager, pluginStore plugins.Store, pluginClient plugins.Client, pluginErrorResolver plugins.ErrorResolver, settingsProvider setting.Provider, dataSourceCache datasources.CacheService, userTokenService models.UserTokenService, cleanUpService *cleanup.CleanUpService, shortURLService shorturls.Service, remoteCache *remotecache.RemoteCache, provisioningService provisioning.ProvisioningService, loginService login.Service, accessControl accesscontrol.AccessControl, dataSourceProxy *datasourceproxy.DataSourceProxyService, searchService *search.SearchService, live *live.GrafanaLive, livePushGateway *pushhttp.Gateway, plugCtxProvider *plugincontext.Provider, contextHandler *contexthandler.ContextHandler, schemaService *schemaloader.SchemaLoaderService, alertNG *ngalert.AlertNG, libraryPanelService librarypanels.Service, libraryElementService libraryelements.Service, notificationService *notifications.NotificationService, tracingService *tracing.TracingService, internalMetricsSvc *metrics.InternalMetricsService, quotaService *quota.QuotaService, socialService social.Service, oauthTokenService oauthtoken.OAuthTokenService, encryptionService encryption.Internal, updateChecker *updatechecker.Service, searchUsersService searchusers.Service, dataSourcesService *datasources.Service, secretsService secrets.Service, expressionService *expr.Service) (*HTTPServer, error)
func (*HTTPServer) AddAPIKey ¶
func (hs *HTTPServer) AddAPIKey(c *models.ReqContext, cmd models.AddApiKeyCommand) response.Response
AddAPIKey adds an API key
func (*HTTPServer) AddMiddleware ¶
func (hs *HTTPServer) AddMiddleware(middleware web.Handler)
func (*HTTPServer) AddOrgUser ¶
func (hs *HTTPServer) AddOrgUser(c *models.ReqContext, cmd models.AddOrgUserCommand) response.Response
POST /api/orgs/:orgId/users
func (*HTTPServer) AddOrgUserToCurrentOrg ¶
func (hs *HTTPServer) AddOrgUserToCurrentOrg(c *models.ReqContext, cmd models.AddOrgUserCommand) response.Response
POST /api/org/users
func (*HTTPServer) AddTeamMember ¶
func (hs *HTTPServer) AddTeamMember(c *models.ReqContext, cmd models.AddTeamMemberCommand) response.Response
POST /api/teams/:teamId/members
func (*HTTPServer) AdditionalAPIKey ¶
func (hs *HTTPServer) AdditionalAPIKey(c *models.ReqContext, cmd models.AddApiKeyCommand) response.Response
AddAPIKey adds an additional API key to a service account
func (*HTTPServer) AdminCreateUser ¶
func (hs *HTTPServer) AdminCreateUser(c *models.ReqContext, form dtos.AdminCreateUserForm) response.Response
func (*HTTPServer) AdminDisableUser ¶
func (hs *HTTPServer) AdminDisableUser(c *models.ReqContext) response.Response
POST /api/admin/users/:id/disable
func (*HTTPServer) AdminGetSettings ¶
func (hs *HTTPServer) AdminGetSettings(c *models.ReqContext) response.Response
func (*HTTPServer) AdminGetUserAuthTokens ¶
func (hs *HTTPServer) AdminGetUserAuthTokens(c *models.ReqContext) response.Response
GET /api/admin/users/:id/auth-tokens
func (*HTTPServer) AdminLogoutUser ¶
func (hs *HTTPServer) AdminLogoutUser(c *models.ReqContext) response.Response
POST /api/admin/users/:id/logout
func (*HTTPServer) AdminProvisioningReloadDashboards ¶
func (hs *HTTPServer) AdminProvisioningReloadDashboards(c *models.ReqContext) response.Response
func (*HTTPServer) AdminProvisioningReloadDatasources ¶
func (hs *HTTPServer) AdminProvisioningReloadDatasources(c *models.ReqContext) response.Response
func (*HTTPServer) AdminProvisioningReloadNotifications ¶
func (hs *HTTPServer) AdminProvisioningReloadNotifications(c *models.ReqContext) response.Response
func (*HTTPServer) AdminProvisioningReloadPlugins ¶
func (hs *HTTPServer) AdminProvisioningReloadPlugins(c *models.ReqContext) response.Response
func (*HTTPServer) AdminRevokeUserAuthToken ¶
func (hs *HTTPServer) AdminRevokeUserAuthToken(c *models.ReqContext, cmd models.RevokeAuthTokenCmd) response.Response
POST /api/admin/users/:id/revoke-auth-token
func (*HTTPServer) AdminUpdateUserPermissions ¶
func (hs *HTTPServer) AdminUpdateUserPermissions(c *models.ReqContext, form dtos.AdminUpdateUserPermissionsForm) response.Response
PUT /api/admin/users/:id/permissions
func (*HTTPServer) AlertTest ¶
func (hs *HTTPServer) AlertTest(c *models.ReqContext, dto dtos.AlertTestCommand) response.Response
POST /api/alerts/test
func (*HTTPServer) CallDatasourceResource ¶
func (hs *HTTPServer) CallDatasourceResource(c *models.ReqContext)
/api/datasources/:id/resources/*
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) CheckDatasourceHealth ¶
func (hs *HTTPServer) CheckDatasourceHealth(c *models.ReqContext) response.Response
CheckDatasourceHealth sends a health check request to the plugin datasource /api/datasource/:id/health
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) 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, completeInvite dtos.CompleteInviteForm) response.Response
func (*HTTPServer) CookieOptionsFromCfg ¶
func (hs *HTTPServer) CookieOptionsFromCfg() cookies.CookieOptions
func (*HTTPServer) CreateFolder ¶
func (hs *HTTPServer) CreateFolder(c *models.ReqContext, cmd models.CreateFolderCommand) response.Response
func (*HTTPServer) CreateOrg ¶
func (hs *HTTPServer) CreateOrg(c *models.ReqContext, cmd models.CreateOrgCommand) response.Response
POST /api/orgs
func (*HTTPServer) CreateTeam ¶
func (hs *HTTPServer) CreateTeam(c *models.ReqContext, cmd models.CreateTeamCommand) response.Response
POST /api/teams
func (*HTTPServer) DeleteDashboardBySlug ¶
func (hs *HTTPServer) DeleteDashboardBySlug(c *models.ReqContext) response.Response
func (*HTTPServer) DeleteDashboardByUID ¶
func (hs *HTTPServer) DeleteDashboardByUID(c *models.ReqContext) response.Response
func (*HTTPServer) DeleteDataSourceById ¶
func (hs *HTTPServer) DeleteDataSourceById(c *models.ReqContext) response.Response
func (*HTTPServer) DeleteDataSourceByName ¶
func (hs *HTTPServer) DeleteDataSourceByName(c *models.ReqContext) response.Response
func (*HTTPServer) DeleteDataSourceByUID ¶
func (hs *HTTPServer) DeleteDataSourceByUID(c *models.ReqContext) response.Response
DELETE /api/datasources/uid/:uid
func (*HTTPServer) DeleteFolder ¶
func (hs *HTTPServer) DeleteFolder(c *models.ReqContext) response.Response
func (*HTTPServer) DeleteTeamByID ¶
func (hs *HTTPServer) DeleteTeamByID(c *models.ReqContext) response.Response
DELETE /api/teams/:teamId
func (*HTTPServer) GetCurrentOrgQuotas ¶
func (hs *HTTPServer) GetCurrentOrgQuotas(c *models.ReqContext) response.Response
func (*HTTPServer) GetDashboard ¶
func (hs *HTTPServer) GetDashboard(c *models.ReqContext) response.Response
func (*HTTPServer) GetDashboardPermissionList ¶
func (hs *HTTPServer) GetDashboardPermissionList(c *models.ReqContext) response.Response
func (*HTTPServer) GetDataSources ¶
func (hs *HTTPServer) GetDataSources(c *models.ReqContext) response.Response
func (*HTTPServer) GetFolderByID ¶
func (hs *HTTPServer) GetFolderByID(c *models.ReqContext) response.Response
func (*HTTPServer) GetFolderByUID ¶
func (hs *HTTPServer) GetFolderByUID(c *models.ReqContext) response.Response
func (*HTTPServer) GetFolderPermissionList ¶
func (hs *HTTPServer) GetFolderPermissionList(c *models.ReqContext) response.Response
func (*HTTPServer) GetFolders ¶
func (hs *HTTPServer) GetFolders(c *models.ReqContext) response.Response
func (*HTTPServer) GetFrontendSettings ¶
func (hs *HTTPServer) GetFrontendSettings(c *models.ReqContext)
func (*HTTPServer) GetHomeDashboard ¶
func (hs *HTTPServer) GetHomeDashboard(c *models.ReqContext) response.Response
GetHomeDashboard returns the home dashboard.
func (*HTTPServer) GetLDAPStatus ¶
func (hs *HTTPServer) GetLDAPStatus(c *models.ReqContext) response.Response
GetLDAPStatus attempts to connect to all the configured LDAP servers and returns information on whenever they're available or not.
func (*HTTPServer) GetOrgByName ¶
func (hs *HTTPServer) GetOrgByName(c *models.ReqContext) response.Response
GET /api/orgs/name/:name
func (*HTTPServer) GetOrgPreferences ¶
func (hs *HTTPServer) GetOrgPreferences(c *models.ReqContext) response.Response
GET /api/org/preferences
func (*HTTPServer) GetOrgQuotas ¶
func (hs *HTTPServer) GetOrgQuotas(c *models.ReqContext) response.Response
func (*HTTPServer) GetOrgUsers ¶
func (hs *HTTPServer) GetOrgUsers(c *models.ReqContext) response.Response
GET /api/orgs/:orgId/users
func (*HTTPServer) GetOrgUsersForCurrentOrg ¶
func (hs *HTTPServer) GetOrgUsersForCurrentOrg(c *models.ReqContext) response.Response
GET /api/org/users
func (*HTTPServer) GetOrgUsersForCurrentOrgLookup ¶
func (hs *HTTPServer) GetOrgUsersForCurrentOrgLookup(c *models.ReqContext) response.Response
GET /api/org/users/lookup
func (*HTTPServer) GetPluginDashboards ¶
func (hs *HTTPServer) GetPluginDashboards(c *models.ReqContext) response.Response
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) GetTeamByID ¶
func (hs *HTTPServer) GetTeamByID(c *models.ReqContext) response.Response
GET /api/teams/:teamId
func (*HTTPServer) GetTeamMembers ¶
func (hs *HTTPServer) GetTeamMembers(c *models.ReqContext) response.Response
GET /api/teams/:teamId/members
func (*HTTPServer) GetTeamPreferences ¶
func (hs *HTTPServer) GetTeamPreferences(c *models.ReqContext) response.Response
GET /api/teams/:teamId/preferences
func (*HTTPServer) GetUserAuthTokens ¶
func (hs *HTTPServer) GetUserAuthTokens(c *models.ReqContext) response.Response
GET /api/user/auth-tokens
func (*HTTPServer) GetUserFromLDAP ¶
func (hs *HTTPServer) GetUserFromLDAP(c *models.ReqContext) response.Response
GetUserFromLDAP finds an user based on a username in LDAP. This helps illustrate how would the particular user be mapped in Grafana when synced.
func (*HTTPServer) GetUserPreferences ¶
func (hs *HTTPServer) GetUserPreferences(c *models.ReqContext) response.Response
GET /api/user/preferences
func (*HTTPServer) ImportDashboard ¶
func (hs *HTTPServer) ImportDashboard(c *models.ReqContext, apiCmd dtos.ImportDashboardCommand) response.Response
func (*HTTPServer) Index ¶
func (hs *HTTPServer) Index(c *models.ReqContext)
func (*HTTPServer) InstallPlugin ¶
func (hs *HTTPServer) InstallPlugin(c *models.ReqContext, dto dtos.InstallPluginCommand) response.Response
func (*HTTPServer) ListSortOptions ¶
func (hs *HTTPServer) ListSortOptions(c *models.ReqContext) response.Response
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) NotFoundHandler ¶
func (hs *HTTPServer) NotFoundHandler(c *models.ReqContext)
func (*HTTPServer) OAuthLogin ¶
func (hs *HTTPServer) OAuthLogin(ctx *models.ReqContext)
func (*HTTPServer) PostDashboard ¶
func (hs *HTTPServer) PostDashboard(c *models.ReqContext, cmd models.SaveDashboardCommand) response.Response
func (*HTTPServer) PostFrontendMetrics ¶
func (hs *HTTPServer) PostFrontendMetrics(c *models.ReqContext, cmd metrics.PostFrontendMetricsCommand) response.Response
func (*HTTPServer) PostSyncUserWithLDAP ¶
func (hs *HTTPServer) PostSyncUserWithLDAP(c *models.ReqContext) response.Response
PostSyncUserWithLDAP enables a single Grafana user to be synchronized against LDAP
func (*HTTPServer) ProxyDataSourceRequest ¶
func (hs *HTTPServer) ProxyDataSourceRequest(c *models.ReqContext)
func (*HTTPServer) ProxyGnetRequest ¶
func (hs *HTTPServer) ProxyGnetRequest(c *models.ReqContext)
func (*HTTPServer) QueryMetrics ¶
func (hs *HTTPServer) QueryMetrics(c *models.ReqContext, reqDto dtos.MetricRequest) response.Response
QueryMetrics returns query metrics POST /api/tsdb/query
func (*HTTPServer) QueryMetricsV2 ¶
func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext, reqDTO dtos.MetricRequest) response.Response
QueryMetricsV2 returns query metrics. POST /api/ds/query DataSource query w/ expressions
func (*HTTPServer) RedirectResponseWithError ¶
func (hs *HTTPServer) RedirectResponseWithError(ctx *models.ReqContext, err error, v ...interface{}) *response.RedirectResponse
func (*HTTPServer) ReloadLDAPCfg ¶
func (hs *HTTPServer) ReloadLDAPCfg() response.Response
ReloadLDAPCfg reloads the LDAP configuration
func (*HTTPServer) RemoveOrgUser ¶
func (hs *HTTPServer) RemoveOrgUser(c *models.ReqContext) response.Response
DELETE /api/orgs/:orgId/users/:userId
func (*HTTPServer) RemoveOrgUserForCurrentOrg ¶
func (hs *HTTPServer) RemoveOrgUserForCurrentOrg(c *models.ReqContext) response.Response
DELETE /api/org/users/:userId
func (*HTTPServer) RemoveTeamMember ¶
func (hs *HTTPServer) RemoveTeamMember(c *models.ReqContext) response.Response
DELETE /api/teams/:teamId/members/:userId
func (*HTTPServer) RenderToPng ¶
func (hs *HTTPServer) RenderToPng(c *models.ReqContext)
func (*HTTPServer) RestoreDashboardVersion ¶
func (hs *HTTPServer) RestoreDashboardVersion(c *models.ReqContext, apiCmd dtos.RestoreDashboardVersionCommand) response.Response
RestoreDashboardVersion restores a dashboard to the given version.
func (*HTTPServer) RevokeUserAuthToken ¶
func (hs *HTTPServer) RevokeUserAuthToken(c *models.ReqContext, cmd models.RevokeAuthTokenCmd) response.Response
POST /api/user/revoke-auth-token
func (*HTTPServer) SearchOrgUsersWithPaging ¶
func (hs *HTTPServer) SearchOrgUsersWithPaging(ctx context.Context, c *models.ReqContext) response.Response
SearchOrgUsersWithPaging is an HTTP handler to search for org users with paging. GET /api/org/users/search
func (*HTTPServer) SearchTeams ¶
func (hs *HTTPServer) SearchTeams(c *models.ReqContext) response.Response
GET /api/teams/search
func (*HTTPServer) SignUpStep2 ¶
func (hs *HTTPServer) SignUpStep2(c *models.ReqContext, form dtos.SignUpStep2Form) response.Response
func (*HTTPServer) TrimDashboard ¶
func (hs *HTTPServer) TrimDashboard(c *models.ReqContext, cmd models.TrimDashboardCommand) response.Response
func (*HTTPServer) UninstallPlugin ¶
func (hs *HTTPServer) UninstallPlugin(c *models.ReqContext) response.Response
func (*HTTPServer) UpdateAlertNotification ¶
func (hs *HTTPServer) UpdateAlertNotification(c *models.ReqContext, cmd models.UpdateAlertNotificationCommand) response.Response
func (*HTTPServer) UpdateAlertNotificationByUID ¶
func (hs *HTTPServer) UpdateAlertNotificationByUID(c *models.ReqContext, cmd models.UpdateAlertNotificationWithUidCommand) response.Response
func (*HTTPServer) UpdateDashboardPermissions ¶
func (hs *HTTPServer) UpdateDashboardPermissions(c *models.ReqContext, apiCmd dtos.UpdateDashboardAclCommand) response.Response
func (*HTTPServer) UpdateDataSource ¶
func (hs *HTTPServer) UpdateDataSource(c *models.ReqContext, cmd models.UpdateDataSourceCommand) response.Response
func (*HTTPServer) UpdateFolder ¶
func (hs *HTTPServer) UpdateFolder(c *models.ReqContext, cmd models.UpdateFolderCommand) response.Response
func (*HTTPServer) UpdateFolderPermissions ¶
func (hs *HTTPServer) UpdateFolderPermissions(c *models.ReqContext, apiCmd dtos.UpdateDashboardAclCommand) response.Response
func (*HTTPServer) UpdateOrgPreferences ¶
func (hs *HTTPServer) UpdateOrgPreferences(c *models.ReqContext, dtoCmd dtos.UpdatePrefsCmd) response.Response
PUT /api/org/preferences
func (*HTTPServer) UpdateOrgQuota ¶
func (hs *HTTPServer) UpdateOrgQuota(c *models.ReqContext, cmd models.UpdateOrgQuotaCmd) response.Response
func (*HTTPServer) UpdateOrgUser ¶
func (hs *HTTPServer) UpdateOrgUser(c *models.ReqContext, cmd models.UpdateOrgUserCommand) response.Response
PATCH /api/orgs/:orgId/users/:userId
func (*HTTPServer) UpdateOrgUserForCurrentOrg ¶
func (hs *HTTPServer) UpdateOrgUserForCurrentOrg(c *models.ReqContext, cmd models.UpdateOrgUserCommand) response.Response
PATCH /api/org/users/:userId
func (*HTTPServer) UpdatePluginSetting ¶
func (hs *HTTPServer) UpdatePluginSetting(c *models.ReqContext, cmd models.UpdatePluginSettingCmd) response.Response
func (*HTTPServer) UpdateTeam ¶
func (hs *HTTPServer) UpdateTeam(c *models.ReqContext, cmd models.UpdateTeamCommand) response.Response
PUT /api/teams/:teamId
func (*HTTPServer) UpdateTeamMember ¶
func (hs *HTTPServer) UpdateTeamMember(c *models.ReqContext, cmd models.UpdateTeamMemberCommand) response.Response
PUT /:teamId/members/:userId
func (*HTTPServer) UpdateTeamPreferences ¶
func (hs *HTTPServer) UpdateTeamPreferences(c *models.ReqContext, dtoCmd dtos.UpdatePrefsCmd) response.Response
PUT /api/teams/:teamId/preferences
func (*HTTPServer) UpdateUserPreferences ¶
func (hs *HTTPServer) UpdateUserPreferences(c *models.ReqContext, dtoCmd dtos.UpdatePrefsCmd) response.Response
PUT /api/user/preferences
func (*HTTPServer) ValidateRedirectTo ¶
func (hs *HTTPServer) ValidateRedirectTo(redirectTo string) error
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 models.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
func (*LDAPUserDTO) FetchOrgs ¶
func (user *LDAPUserDTO) FetchOrgs() error
FetchOrgs fetches the organization(s) information by executing a single query to the database. Then, populating the DTO with the information retrieved.
type LoginError ¶
type PreloadPlugin ¶
type ServerOptions ¶
Source Files
¶
- acl.go
- admin.go
- admin_provisioning.go
- admin_users.go
- alerting.go
- annotations.go
- api.go
- apikey.go
- app_routes.go
- basic_auth.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
- org.go
- org_invite.go
- org_users.go
- password.go
- playlist.go
- playlist_play.go
- plugins.go
- preferences.go
- quota.go
- render.go
- roles.go
- search.go
- short_url.go
- signup.go
- stars.go
- team.go
- team_members.go
- user.go
- user_token.go
- utils.go