api

package
v0.0.0-...-34a2968 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 75 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ViewIndex            = "index"
	LoginErrorCookieName = "login_error"
)

Variables

View Source
var (
	NotFound = func() Response {
		return Error(404, "Not found", nil)
	}
	ServerError = func(err error) Response {
		return Error(500, "Server error", err)
	}
)
View Source
var ErrPluginNotFound error = errors.New("plugin not found, no installed plugin with that id")

ErrPluginNotFound is returned when an requested plugin is not installed.

View Source
var (
	OauthStateCookieName = "oauth_state"
)

Functions

func AppPluginRoute

func AppPluginRoute(route *plugins.AppPluginRoute, appID string, hs *HTTPServer) macaron.Handler

func BasicAuthenticatedRequest

func BasicAuthenticatedRequest(req macaron.Request, expectedUser, expectedPass string) bool

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 CreateDashboardSnapshot

func CreateDashboardSnapshot(c *models.ReqContext, cmd models.CreateDashboardSnapshotCommand)

POST /api/snapshots

func GenStateString

func GenStateString() (string, error)

func GetAuthProviderLabel

func GetAuthProviderLabel(authModule string) string

func GetDashboardSnapshot

func GetDashboardSnapshot(c *models.ReqContext)

GET /api/snapshots/:key

func GetDashboardTags

func GetDashboardTags(c *models.ReqContext)

func GetSharingOptions

func GetSharingOptions(c *models.ReqContext)

func LoadPlaylistDashboards

func LoadPlaylistDashboards(orgID int64, signedInUser *models.SignedInUser, playlistID int64) (dtos.PlaylistDashboardsSlice, error)

func LoadPlaylistItemDTOs

func LoadPlaylistItemDTOs(id int64) ([]models.PlaylistItemDTO, error)

func LoadPlaylistItems

func LoadPlaylistItems(id int64) ([]models.PlaylistItem, error)

func ProxyGnetRequest

func ProxyGnetRequest(c *models.ReqContext)

func ReverseProxyGnetReq

func ReverseProxyGnetReq(proxyPath string) *httputil.ReverseProxy

func ValidateOrgAlert

func ValidateOrgAlert(c *models.ReqContext)

func ValidateOrgPlaylist

func ValidateOrgPlaylist(c *models.ReqContext)

func Wrap

func Wrap(action interface{}) macaron.Handler

Types

type CreateAnnotationError

type CreateAnnotationError struct {
	// contains filtered or unexported fields
}

func (*CreateAnnotationError) Error

func (e *CreateAnnotationError) Error() string

type CreateExternalSnapshotResponse

type CreateExternalSnapshotResponse struct {
	Key       string `json:"key"`
	DeleteKey string `json:"deleteKey"`
	Url       string `json:"url"`
	DeleteUrl string `json:"deleteUrl"`
}

type HTTPServer

type HTTPServer struct {
	RouteRegister        routing.RouteRegister            `inject:""`
	Bus                  bus.Bus                          `inject:""`
	RenderService        rendering.Service                `inject:""`
	Cfg                  *setting.Cfg                     `inject:""`
	HooksService         *hooks.HooksService              `inject:""`
	CacheService         *localcache.CacheService         `inject:""`
	DatasourceCache      datasources.CacheService         `inject:""`
	AuthTokenService     models.UserTokenService          `inject:""`
	QuotaService         *quota.QuotaService              `inject:""`
	RemoteCacheService   *remotecache.RemoteCache         `inject:""`
	ProvisioningService  provisioning.ProvisioningService `inject:""`
	Login                *login.LoginService              `inject:""`
	License              models.Licensing                 `inject:""`
	BackendPluginManager backendplugin.Manager            `inject:""`
	PluginManager        *plugins.PluginManager           `inject:""`
	SearchService        *search.SearchService            `inject:""`
	Live                 *live.GrafanaLive
	Listener             net.Listener
	// contains filtered or unexported fields
}

func (*HTTPServer) AddAPIKey

func (*HTTPServer) AddMiddleware

func (hs *HTTPServer) AddMiddleware(middleware macaron.Handler)

func (*HTTPServer) AddTeamMember

func (hs *HTTPServer) AddTeamMember(c *models.ReqContext, cmd models.AddTeamMemberCommand) Response

POST /api/teams/:teamId/members

func (*HTTPServer) AdminDisableUser

func (server *HTTPServer) AdminDisableUser(c *models.ReqContext) Response

POST /api/admin/users/:id/disable

func (*HTTPServer) AdminGetUserAuthTokens

func (server *HTTPServer) AdminGetUserAuthTokens(c *models.ReqContext) Response

GET /api/admin/users/:id/auth-tokens

func (*HTTPServer) AdminLogoutUser

func (server *HTTPServer) AdminLogoutUser(c *models.ReqContext) Response

POST /api/admin/users/:id/logout

func (*HTTPServer) AdminProvisioningReloadDashboards

func (server *HTTPServer) AdminProvisioningReloadDashboards(c *models.ReqContext) Response

func (*HTTPServer) AdminProvisioningReloadDatasources

func (server *HTTPServer) AdminProvisioningReloadDatasources(c *models.ReqContext) Response

func (*HTTPServer) AdminProvisioningReloadNotifications

func (server *HTTPServer) AdminProvisioningReloadNotifications(c *models.ReqContext) Response

func (*HTTPServer) AdminProvisioningReloadPlugins

func (server *HTTPServer) AdminProvisioningReloadPlugins(c *models.ReqContext) Response

func (*HTTPServer) AdminRevokeUserAuthToken

func (server *HTTPServer) AdminRevokeUserAuthToken(c *models.ReqContext, cmd models.RevokeAuthTokenCmd) Response

POST /api/admin/users/:id/revoke-auth-token

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

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

CheckHealth returns the health of a plugin. /api/plugins/:pluginId/health

func (*HTTPServer) CollectPluginMetrics

func (hs *HTTPServer) CollectPluginMetrics(c *models.ReqContext) 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

func (*HTTPServer) CookieOptionsFromCfg

func (hs *HTTPServer) CookieOptionsFromCfg() middleware.CookieOptions

func (*HTTPServer) CreateFolder

func (hs *HTTPServer) CreateFolder(c *models.ReqContext, cmd models.CreateFolderCommand) Response

func (*HTTPServer) CreateTeam

func (hs *HTTPServer) CreateTeam(c *models.ReqContext, cmd models.CreateTeamCommand) Response

POST /api/teams

func (*HTTPServer) DeleteTeamByID

func (hs *HTTPServer) DeleteTeamByID(c *models.ReqContext) Response

DELETE /api/teams/:teamId

func (*HTTPServer) GetDashboard

func (hs *HTTPServer) GetDashboard(c *models.ReqContext) Response

func (*HTTPServer) GetFrontendSettings

func (hs *HTTPServer) GetFrontendSettings(c *models.ReqContext)

func (*HTTPServer) GetHomeDashboard

func (hs *HTTPServer) GetHomeDashboard(c *models.ReqContext) Response

GetHomeDashboard returns the home dashboard.

func (*HTTPServer) GetLDAPStatus

func (server *HTTPServer) GetLDAPStatus(c *models.ReqContext) Response

GetLDAPStatus attempts to connect to all the configured LDAP servers and returns information on whenever they're available or not.

func (*HTTPServer) GetPluginList

func (hs *HTTPServer) GetPluginList(c *models.ReqContext) Response

func (*HTTPServer) GetTeamMembers

func (hs *HTTPServer) GetTeamMembers(c *models.ReqContext) Response

GET /api/teams/:teamId/members

func (*HTTPServer) GetTeamPreferences

func (hs *HTTPServer) GetTeamPreferences(c *models.ReqContext) Response

GET /api/teams/:teamId/preferences

func (*HTTPServer) GetUserAuthTokens

func (server *HTTPServer) GetUserAuthTokens(c *models.ReqContext) Response

GET /api/user/auth-tokens

func (*HTTPServer) GetUserFromLDAP

func (server *HTTPServer) GetUserFromLDAP(c *models.ReqContext) 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) Index

func (hs *HTTPServer) Index(c *models.ReqContext)

func (*HTTPServer) Init

func (hs *HTTPServer) Init() error

func (*HTTPServer) ListSortOptions

func (hs *HTTPServer) ListSortOptions(c *models.ReqContext) Response

func (*HTTPServer) LoginAPIPing

func (hs *HTTPServer) LoginAPIPing(c *models.ReqContext) Response

func (*HTTPServer) LoginPost

func (hs *HTTPServer) LoginPost(c *models.ReqContext, cmd dtos.LoginCommand) 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

func (*HTTPServer) PostSyncUserWithLDAP

func (server *HTTPServer) PostSyncUserWithLDAP(c *models.ReqContext) Response

PostSyncUserWithLDAP enables a single Grafana user to be synchronized against LDAP

func (*HTTPServer) ProxyDataSourceRequest

func (hs *HTTPServer) ProxyDataSourceRequest(c *models.ReqContext)

ProxyDataSourceRequest proxies datasource requests

func (*HTTPServer) QueryMetrics

func (hs *HTTPServer) QueryMetrics(c *models.ReqContext, reqDto dtos.MetricRequest) Response

QueryMetrics returns query metrics POST /api/tsdb/query

func (*HTTPServer) QueryMetricsV2

func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext, reqDto dtos.MetricRequest) 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{}) *RedirectResponse

func (*HTTPServer) ReloadLDAPCfg

func (server *HTTPServer) ReloadLDAPCfg() Response

ReloadLDAPCfg reloads the LDAP configuration

func (*HTTPServer) RemoveTeamMember

func (hs *HTTPServer) RemoveTeamMember(c *models.ReqContext) 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

RestoreDashboardVersion restores a dashboard to the given version.

func (*HTTPServer) RevokeUserAuthToken

func (server *HTTPServer) RevokeUserAuthToken(c *models.ReqContext, cmd models.RevokeAuthTokenCmd) Response

POST /api/user/revoke-auth-token

func (*HTTPServer) Run

func (hs *HTTPServer) Run(ctx context.Context) error

func (*HTTPServer) SearchTeams

func (hs *HTTPServer) SearchTeams(c *models.ReqContext) Response

GET /api/teams/search

func (*HTTPServer) SendLoginLog

func (hs *HTTPServer) SendLoginLog(cmd *models.SendLoginLogCommand)

func (*HTTPServer) SignUpStep2

func (hs *HTTPServer) SignUpStep2(c *models.ReqContext, form dtos.SignUpStep2Form) Response

func (*HTTPServer) UpdateTeam

func (hs *HTTPServer) UpdateTeam(c *models.ReqContext, cmd models.UpdateTeamCommand) Response

PUT /api/teams/:teamId

func (*HTTPServer) UpdateTeamMember

func (hs *HTTPServer) UpdateTeamMember(c *models.ReqContext, cmd models.UpdateTeamMemberCommand) Response

PUT /:teamId/members/:userId

func (*HTTPServer) UpdateTeamPreferences

func (hs *HTTPServer) UpdateTeamPreferences(c *models.ReqContext, dtoCmd dtos.UpdatePrefsCmd) Response

PUT /api/teams/:teamId/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 LoginError struct {
	HttpStatus    int
	PublicMessage string
	Err           error
}

type LoginInformation

type LoginInformation struct {
	Action      string
	User        *models.User
	ExtUserInfo *models.ExternalUserInfo
}

type NormalResponse

type NormalResponse struct {
	// contains filtered or unexported fields
}

func Empty

func Empty(status int) *NormalResponse

Empty create an empty response

func Error

func Error(status int, message string, err error) *NormalResponse

Error create a erroneous response

func JSON

func JSON(status int, body interface{}) *NormalResponse

JSON create a JSON response

func Respond

func Respond(status int, body interface{}) *NormalResponse

Respond create a response

func Success

func Success(message string) *NormalResponse

Success create a successful response

func (*NormalResponse) Cache

func (r *NormalResponse) Cache(ttl string) *NormalResponse

func (*NormalResponse) Header

func (r *NormalResponse) Header(key, value string) *NormalResponse

func (*NormalResponse) WriteTo

func (r *NormalResponse) WriteTo(ctx *models.ReqContext)

type RedirectResponse

type RedirectResponse struct {
	// contains filtered or unexported fields
}

func Redirect

func Redirect(location string) *RedirectResponse

func (*RedirectResponse) WriteTo

func (r *RedirectResponse) WriteTo(ctx *models.ReqContext)

type Response

type Response interface {
	WriteTo(ctx *models.ReqContext)
}

func AddOrgInvite

func AddOrgInvite(c *models.ReqContext, inviteDto dtos.AddInviteForm) Response

func AddOrgUser

POST /api/orgs/:orgId/users

func AddOrgUserToCurrentOrg

func AddOrgUserToCurrentOrg(c *models.ReqContext, cmd models.AddOrgUserCommand) Response

POST /api/org/users

func AdminCreateUser

func AdminCreateUser(c *models.ReqContext, form dtos.AdminCreateUserForm) Response

func AdminDeleteUser

func AdminDeleteUser(c *models.ReqContext) Response

func AdminEnableUser

func AdminEnableUser(c *models.ReqContext) Response

POST /api/admin/users/:id/enable

func AdminGetSettings

func AdminGetSettings(c *models.ReqContext) Response

func AdminGetStats

func AdminGetStats(c *models.ReqContext) Response

func AdminUpdateUserPermissions

func AdminUpdateUserPermissions(c *models.ReqContext, form dtos.AdminUpdateUserPermissionsForm) Response

PUT /api/admin/users/:id/permissions

func AlertTest

func AlertTest(c *models.ReqContext, dto dtos.AlertTestCommand) Response

POST /api/alerts/test

func CalculateDashboardDiff

func CalculateDashboardDiff(c *models.ReqContext, apiOptions dtos.CalculateDiffOptions) Response

POST /api/dashboards/calculate-diff performs diffs on two dashboards

func ClearHelpFlags

func ClearHelpFlags(c *models.ReqContext) Response

func CreateOrg

POST /api/orgs

func DeleteAPIKey

func DeleteAPIKey(c *models.ReqContext) Response

func DeleteAlertNotification

func DeleteAlertNotification(c *models.ReqContext) Response

func DeleteAlertNotificationByUID

func DeleteAlertNotificationByUID(c *models.ReqContext) Response

func DeleteAnnotationByID

func DeleteAnnotationByID(c *models.ReqContext) Response

func DeleteAnnotations

func DeleteAnnotations(c *models.ReqContext, cmd dtos.DeleteAnnotationsCmd) Response

func DeleteDashboardBySlug

func DeleteDashboardBySlug(c *models.ReqContext) Response

func DeleteDashboardByUID

func DeleteDashboardByUID(c *models.ReqContext) Response

func DeleteDashboardSnapshot

func DeleteDashboardSnapshot(c *models.ReqContext) Response

DELETE /api/snapshots/:key

func DeleteDashboardSnapshotByDeleteKey

func DeleteDashboardSnapshotByDeleteKey(c *models.ReqContext) Response

GET /api/snapshots-delete/:deleteKey

func DeleteDataSourceById

func DeleteDataSourceById(c *models.ReqContext) Response

func DeleteDataSourceByName

func DeleteDataSourceByName(c *models.ReqContext) Response

func DeleteFolder

func DeleteFolder(c *models.ReqContext) Response

func DeleteOrgByID

func DeleteOrgByID(c *models.ReqContext) Response

GET /api/orgs/:orgId

func DeletePlaylist

func DeletePlaylist(c *models.ReqContext) Response

func GenerateError

func GenerateError(c *models.ReqContext) Response

GenerateError generates a index out of range error

func GenerateSQLTestData

func GenerateSQLTestData(c *models.ReqContext) Response

GET /api/tsdb/testdata/gensql

func GetAPIKeys

func GetAPIKeys(c *models.ReqContext) Response

func GetAlert

func GetAlert(c *models.ReqContext) Response

GET /api/alerts/:id

func GetAlertNotificationByID

func GetAlertNotificationByID(c *models.ReqContext) Response

func GetAlertNotificationByUID

func GetAlertNotificationByUID(c *models.ReqContext) Response

func GetAlertNotificationLookup

func GetAlertNotificationLookup(c *models.ReqContext) Response

func GetAlertNotifications

func GetAlertNotifications(c *models.ReqContext) Response

func GetAlertNotifiers

func GetAlertNotifiers(c *models.ReqContext) Response

func GetAlertStatesForDashboard

func GetAlertStatesForDashboard(c *models.ReqContext) Response

func GetAlerts

func GetAlerts(c *models.ReqContext) Response

GET /api/alerts

func GetAnnotations

func GetAnnotations(c *models.ReqContext) Response

func GetDashboardPermissionList

func GetDashboardPermissionList(c *models.ReqContext) Response

func GetDashboardVersion

func GetDashboardVersion(c *models.ReqContext) Response

GetDashboardVersion returns the dashboard version with the given ID.

func GetDashboardVersions

func GetDashboardVersions(c *models.ReqContext) Response

GetDashboardVersions returns all dashboard versions as JSON

func GetDataSourceById

func GetDataSourceById(c *models.ReqContext) Response

func GetDataSourceByName

func GetDataSourceByName(c *models.ReqContext) Response

Get /api/datasources/name/:name

func GetDataSourceIdByName

func GetDataSourceIdByName(c *models.ReqContext) Response

Get /api/datasources/id/:name

func GetDataSources

func GetDataSources(c *models.ReqContext) Response

func GetFolderByID

func GetFolderByID(c *models.ReqContext) Response

func GetFolderByUID

func GetFolderByUID(c *models.ReqContext) Response

func GetFolderPermissionList

func GetFolderPermissionList(c *models.ReqContext) Response

func GetFolders

func GetFolders(c *models.ReqContext) Response

func GetInviteInfoByCode

func GetInviteInfoByCode(c *models.ReqContext) 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 GetOrgByID

func GetOrgByID(c *models.ReqContext) Response

GET /api/orgs/:orgId

func GetOrgByName

func GetOrgByName(c *models.ReqContext) Response

Get /api/orgs/name/:name

func GetOrgCurrent

func GetOrgCurrent(c *models.ReqContext) Response

GET /api/org

func GetOrgPreferences

func GetOrgPreferences(c *models.ReqContext) Response

GET /api/org/preferences

func GetOrgQuotas

func GetOrgQuotas(c *models.ReqContext) Response

func GetOrgUsers

func GetOrgUsers(c *models.ReqContext) Response

GET /api/orgs/:orgId/users

func GetOrgUsersForCurrentOrg

func GetOrgUsersForCurrentOrg(c *models.ReqContext) Response

GET /api/org/users

func GetOrgUsersForCurrentOrgLookup

func GetOrgUsersForCurrentOrgLookup(c *models.ReqContext) Response

GET /api/org/users/lookup

func GetPendingOrgInvites

func GetPendingOrgInvites(c *models.ReqContext) Response

func GetPlaylist

func GetPlaylist(c *models.ReqContext) Response

func GetPlaylistDashboards

func GetPlaylistDashboards(c *models.ReqContext) Response

func GetPlaylistItems

func GetPlaylistItems(c *models.ReqContext) Response

func GetPluginDashboards

func GetPluginDashboards(c *models.ReqContext) Response

func GetPluginMarkdown

func GetPluginMarkdown(c *models.ReqContext) Response

func GetPluginSettingByID

func GetPluginSettingByID(c *models.ReqContext) Response

func GetSignUpOptions

func GetSignUpOptions(c *models.ReqContext) Response

GET /api/user/signup/options

func GetSignedInUser

func GetSignedInUser(c *models.ReqContext) Response

GET /api/user (current authenticated user)

func GetSignedInUserOrgList

func GetSignedInUserOrgList(c *models.ReqContext) Response

GET /api/user/orgs

func GetSignedInUserTeamList

func GetSignedInUserTeamList(c *models.ReqContext) Response

GET /api/user/teams

func GetTeamByID

func GetTeamByID(c *models.ReqContext) Response

GET /api/teams/:teamId

func GetTestDataRandomWalk

func GetTestDataRandomWalk(c *models.ReqContext) Response

GET /api/tsdb/testdata/random-walk

func GetTestDataScenarios

func GetTestDataScenarios(c *models.ReqContext) Response

GET /api/tsdb/testdata/scenarios

func GetUserByID

func GetUserByID(c *models.ReqContext) Response

GET /api/users/:id

func GetUserByLoginOrEmail

func GetUserByLoginOrEmail(c *models.ReqContext) Response

GET /api/users/lookup

func GetUserOrgList

func GetUserOrgList(c *models.ReqContext) Response

GET /api/users/:id/orgs

func GetUserPreferences

func GetUserPreferences(c *models.ReqContext) Response

GET /api/user/preferences

func GetUserQuotas

func GetUserQuotas(c *models.ReqContext) Response

func GetUserTeams

func GetUserTeams(c *models.ReqContext) Response

GET /api/users/:id/teams

func ImportDashboard

func ImportDashboard(c *models.ReqContext, apiCmd dtos.ImportDashboardCommand) Response

func NotificationTest

func NotificationTest(c *models.ReqContext, dto dtos.NotificationTestCommand) Response

POST /api/alert-notifications/test

func PatchAnnotation

func PatchAnnotation(c *models.ReqContext, cmd dtos.PatchAnnotationsCmd) Response

func PauseAlert

func PauseAlert(c *models.ReqContext, dto dtos.PauseAlertCommand) Response

POST /api/alerts/:alertId/pause

func PauseAllAlerts

func PauseAllAlerts(c *models.ReqContext, dto dtos.PauseAllAlertsCommand) Response

POST /api/admin/pause-all-alerts

func PostAnnotation

func PostAnnotation(c *models.ReqContext, cmd dtos.PostAnnotationsCmd) Response

func RemoveOrgUser

func RemoveOrgUser(c *models.ReqContext) Response

DELETE /api/orgs/:orgId/users/:userId

func RemoveOrgUserForCurrentOrg

func RemoveOrgUserForCurrentOrg(c *models.ReqContext) Response

DELETE /api/org/users/:userId

func RevokeInvite

func RevokeInvite(c *models.ReqContext) Response
func Search(c *models.ReqContext) Response

func SearchDashboardSnapshots

func SearchDashboardSnapshots(c *models.ReqContext) Response

GET /api/dashboard/snapshots

func SearchOrgs

func SearchOrgs(c *models.ReqContext) Response

func SearchPlaylists

func SearchPlaylists(c *models.ReqContext) Response

func SearchUsers

func SearchUsers(c *models.ReqContext) Response

GET /api/users

func SearchUsersWithPaging

func SearchUsersWithPaging(c *models.ReqContext) Response

GET /api/users/search

func SetHelpFlag

func SetHelpFlag(c *models.ReqContext) Response

func SetHomeDashboard

func SetHomeDashboard(c *models.ReqContext, cmd models.SavePreferencesCommand) Response

POST /api/preferences/set-home-dash

func SignUp

func SignUp(c *models.ReqContext, form dtos.SignUpForm) Response

POST /api/user/signup

func StarDashboard

func StarDashboard(c *models.ReqContext) Response

func UnstarDashboard

func UnstarDashboard(c *models.ReqContext) Response

func UpdateAnnotation

func UpdateAnnotation(c *models.ReqContext, cmd dtos.UpdateAnnotationsCmd) Response

func UpdateDashboardPermissions

func UpdateDashboardPermissions(c *models.ReqContext, apiCmd dtos.UpdateDashboardAclCommand) Response

func UpdateFolderPermissions

func UpdateFolderPermissions(c *models.ReqContext, apiCmd dtos.UpdateDashboardAclCommand) Response

func UpdateOrg

func UpdateOrg(c *models.ReqContext, form dtos.UpdateOrgForm) Response

PUT /api/orgs/:orgId

func UpdateOrgAddress

func UpdateOrgAddress(c *models.ReqContext, form dtos.UpdateOrgAddressForm) Response

PUT /api/orgs/:orgId/address

func UpdateOrgAddressCurrent

func UpdateOrgAddressCurrent(c *models.ReqContext, form dtos.UpdateOrgAddressForm) Response

PUT /api/org/address

func UpdateOrgCurrent

func UpdateOrgCurrent(c *models.ReqContext, form dtos.UpdateOrgForm) Response

PUT /api/org

func UpdateOrgPreferences

func UpdateOrgPreferences(c *models.ReqContext, dtoCmd dtos.UpdatePrefsCmd) Response

PUT /api/org/preferences

func UpdateOrgQuota

func UpdateOrgQuota(c *models.ReqContext, cmd models.UpdateOrgQuotaCmd) Response

func UpdateOrgUser

func UpdateOrgUser(c *models.ReqContext, cmd models.UpdateOrgUserCommand) Response

PATCH /api/orgs/:orgId/users/:userId

func UpdateOrgUserForCurrentOrg

func UpdateOrgUserForCurrentOrg(c *models.ReqContext, cmd models.UpdateOrgUserCommand) Response

PATCH /api/org/users/:userId

func UpdateSignedInUser

func UpdateSignedInUser(c *models.ReqContext, cmd models.UpdateUserCommand) Response

POST /api/user

func UpdateUser

POST /api/users/:id

func UpdateUserActiveOrg

func UpdateUserActiveOrg(c *models.ReqContext) Response

POST /api/users/:id/using/:orgId

func UpdateUserPreferences

func UpdateUserPreferences(c *models.ReqContext, dtoCmd dtos.UpdatePrefsCmd) Response

PUT /api/user/preferences

func UserSetUsingOrg

func UserSetUsingOrg(c *models.ReqContext) Response

POST /api/user/using/:id

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL