definitions

package
v0.0.85-test Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptedResponse

type AcceptedResponse GenericError

AcceptedResponse

swagger:response acceptedResponse

type AddAPIkeyParams

type AddAPIkeyParams struct {
	// in:body
	// required:true
	Body models.AddApiKeyCommand
}

swagger:parameters addAPIkey

type AddDatasourceParam

type AddDatasourceParam struct {
	// in:body
	// required:true
	Body models.AddDataSourceCommand
}

swagger:parameters addDatasource

type AddInviteParam

type AddInviteParam struct {
	// in:body
	// required:true
	Body dtos.AddInviteForm `json:"body"`
}

swagger:parameters addInvite

type AddOrgUser

type AddOrgUser struct {
	// The response message
	// in: body
	Body struct {
		// ID Identifier of the added user.
		// required: true
		// example: 65
		UsedID int64 `json:"id"`

		// Message Message of the added user.
		// required: true
		// example: Data source added
		Message string `json:"message"`
	} `json:"body"`
}

swagger:response addOrgUser

type AddOrgUserParam

type AddOrgUserParam struct {
	// in:body
	// required:true
	Body models.AddOrgUserCommand `json:"body"`
}

swagger:parameters addOrgUser adminAddOrgUser

type AddTeamMemberParam

type AddTeamMemberParam struct {
	// in:body
	// required:true
	Body models.AddTeamMemberCommand `json:"body"`
}

swagger:parameters addTeamMemberTeam

type AlertIDParam

type AlertIDParam struct {
	// in:path
	// required:true
	AlertID string `json:"alert_id"`
}

swagger:parameters getAlertByID pauseAlert

type AnnotationIDParam

type AnnotationIDParam struct {
	// in:path
	// required:true
	AnnotationID string `json:"annotation_id"`
}

swagger:parameters updateAnnotation patchAnnotation deleteAnnotation

type BadRequestError

type BadRequestError GenericError

BadRequestError is returned when the request is invalid and it cannot be processed.

swagger:response badRequestError

type CalcDashboardDiffOptions

type CalcDashboardDiffOptions 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 calcDashboardDiff

type ChangeUserPasswordParam

type ChangeUserPasswordParam struct {
	// To change the email, name, login, theme, provide another one.
	// in:body
	// required:true
	Body models.ChangeUserPasswordCommand `json:"body"`
}

swagger:parameters updateUser changeUserPassword

type ConflictError

type ConflictError GenericError

ConflictError

swagger:response conflictError

type CreateAlertNotificationChannelParam

type CreateAlertNotificationChannelParam struct {
	// in:body
	// required:true
	Body models.CreateAlertNotificationCommand `json:"body"`
}

swagger:parameters createAlertNotificationChannel

type CreateAnnotationParams

type CreateAnnotationParams struct {
	// in:body
	// required:true
	Body dtos.PostAnnotationsCmd `json:"body"`
}

swagger:parameters createAnnotation

type CreateAnnotationResponse

type CreateAnnotationResponse 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 createAnnotationResponse

type CreateFolderParam

type CreateFolderParam struct {
	// in:body
	// required:true
	Body models.CreateFolderCommand `json:"body"`
}

swagger:parameters createFolder

type CreateGraphiteAnnotationParams

type CreateGraphiteAnnotationParams struct {
	// in:body
	// required:true
	Body dtos.PostGraphiteAnnotationsCmd `json:"body"`
}

swagger:parameters createGraphiteAnnotation

type CreateLibraryElementParam

type CreateLibraryElementParam struct {
	// in:body
	// required:true
	Body libraryelements.CreateLibraryElementCommand `json:"body"`
}

swagger:parameters createLibraryElement

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 CreateOrgParam

type CreateOrgParam 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 CreateSnapshotParam

type CreateSnapshotParam struct {
	// in:body
	// required:true
	Body models.CreateDashboardSnapshotCommand `json:"body"`
}

swagger:parameters createSnapshot

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 createSnapshotResponse

type CreateTeamParam

type CreateTeamParam 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 CreateUserParam

type CreateUserParam struct {
	// in:body
	// required:true
	Body dtos.AdminCreateUserForm `json:"body"`
}

swagger:parameters createUser

type CreateUserResponse

type CreateUserResponse struct {
	// in:body
	Body models.UserIdDTO `json:"body"`
}

swagger:response createUserResponse

type DashboardDiffResponse

type DashboardDiffResponse struct {
	// in: body
	Body []byte `json:"body"`
}

Calculate dashboard diff response. swagger:response dashboardDiffResponse

type DashboardIDParam

type DashboardIDParam struct {
	// in:path
	// required:true
	DashboardID string `json:"dashboard_id"`
}

swagger:parameters starDashboard unstarDashboard

type DashboardIdParam

type DashboardIdParam struct {
	// in:path
	DashboardID int64
}

swagger:parameters getDashboardVersions getDashboardVersion restoreDashboardVersion swagger:parameters getDashboardPermissions postDashboardPermissions swagger:parameters renderReportPDF

type DashboardResponse

type DashboardResponse struct {
	// The response message
	// in: body
	Body dtos.DashboardFullWithMeta `json:"body"`
}

swagger:response dashboardResponse

type DashboardVersionIdParam

type DashboardVersionIdParam struct {
	// in:path
	DashboardVersionID int64
}

swagger:parameters getDashboardVersion

type DashboardVersionResponse

type DashboardVersionResponse struct {
	// in: body
	Body *models.DashboardVersionMeta `json:"body"`
}

swagger:response dashboardVersionResponse

type DashboardVersionsResponse

type DashboardVersionsResponse struct {
	// in: body
	Body []*models.DashboardVersionDTO `json:"body"`
}

swagger:response dashboardVersionsResponse

type DashboardsTagsResponse

type DashboardsTagsResponse struct {
	// in: body
	Body []*models.DashboardTagCloudItem `json:"body"`
}

swagger:response dashboardsTagsResponse

type DatasourceID

type DatasourceID struct {
	// in:path
	// required:true
	DatasourceID string `json:"datasource_id"`
}

swagger:parameters updateDatasource deleteDatasourceByID getDatasourceByID datasourceProxyGETcalls datasourceProxyPOSTcalls datasourceProxyDELETEcalls swagger:parameters enablePermissions disablePermissions getPermissions deletePermissions

type DatasourceName

type DatasourceName struct {
	// in:path
	// required:true
	DatasourceName string `json:"datasource_name"`
}

swagger:parameters getDatasourceByName deleteDatasourceByName getDatasourceIdByName

type DatasourceProxyParam

type DatasourceProxyParam struct {
	// in:body
	// required:true
	DatasourceProxyParam interface{}
}

swagger:parameters datasourceProxyPOSTcalls

type DatasourceProxyRouteParam

type DatasourceProxyRouteParam struct {
	// in:path
	// required:true
	DatasourceProxyRoute string `json:"datasource_proxy_route"`
}

swagger:parameters datasourceProxyGETcalls datasourceProxyPOSTcalls datasourceProxyDELETEcalls

type DatasourceUID

type DatasourceUID struct {
	// in:path
	// required:true
	DatasourceUID string `json:"datasource_uid"`
}

swagger:parameters deleteDatasourceByUID getDatasourceByUID

type DeleteAPIkeyParams

type DeleteAPIkeyParams struct {
	// in:path
	// required:true
	ID int64 `json:"id"`
}

swagger:parameters deleteAPIkey

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 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 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 DeleteFolderParam

type DeleteFolderParam struct {
	// 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 DeleteSnapshotByDeleteKeyParam

type DeleteSnapshotByDeleteKeyParam struct {
	// in:path
	DeleteKey string `json:"deleteKey"`
}

swagger:parameters deleteSnapshotByDeleteKey

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 FlagIDParam

type FlagIDParam struct {
	// in:path
	// required:true
	FlagID string `json:"flag_id"`
}

swagger:parameters setHelpFlag

type FolderIDParam

type FolderIDParam struct {
	// in:path
	// required:true
	FolderID int64 `json:"folder_id"`
}

swagger:parameters getFolderByID

type FolderResponse

type FolderResponse struct {
	// The response message
	// in: body
	Body dtos.Folder `json:"body"`
}

swagger:response folderResponse

type FolderUIDParam

type FolderUIDParam struct {
	// in:path
	// required:true
	FolderUID string `json:"folder_uid"`
}

swagger:parameters getFolderByUID updateFolder deleteFolder swagger:parameters getFolderPermissions updateFolderPermissions

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 []*models.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 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 GetAnnotationTagsResponse

type GetAnnotationTagsResponse struct {
	// The response message
	// in: body
	Body annotations.GetAnnotationTagsResponse `json:"body"`
}

swagger:response getAnnotationTagsResponse

type GetAnnotationTagssParams

type GetAnnotationTagssParams 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 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 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 GetAuthTokensResponse

type GetAuthTokensResponse struct {
	// in:body
	Body []*models.UserToken `json:"body"`
}

swagger:response getAuthTokensResponse

type GetDashboardPermissionsResponse

type GetDashboardPermissionsResponse struct {
	// in: body
	Body []*models.DashboardAclInfoDTO `json:"body"`
}

swagger:response getDashboardPermissionsResponse

type GetDashboardStatesParam

type GetDashboardStatesParam 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 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

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 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 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"`
}

Home dashboard response. 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 GetInvitesResponse

type GetInvitesResponse struct {
	// The response message
	// in: body
	Body []*models.TempUserDTO `json:"body"`
}

swagger:response getInvitesResponse

type GetLibraryElementConnectionsResponse

type GetLibraryElementConnectionsResponse struct {
	// in: body
	Body libraryelements.LibraryElementConnectionsResponse `json:"body"`
}

swagger:response getLibraryElementConnectionsResponse

type GetLibraryElementResponse

type GetLibraryElementResponse struct {
	// in: body
	Body libraryelements.LibraryElementResponse `json:"body"`
}

swagger:response getLibraryElementResponse

type GetLibraryElementsParams

type GetLibraryElementsParams struct {
	// Part of the name or description searched for.
	// in:query
	// required:false
	SearchString string `json:"searchString"`
	// Kind of element to search for.
	// in:query
	// required:false
	// Description:
	// * 1 - library panels
	// * 2 - library variables
	// enum: 1,2
	Kind int `json:"kind"`
	// Sort order of elements.
	// in:query
	// required:false
	// Description:
	// * alpha-asc: ascending
	// * alpha-desc: descending
	// Enum: alpha-asc,alpha-desc
	SortDirection string `json:"sortDirection"`
	// A comma separated list of types to filter the elements by
	// in:query
	// required:false
	TypeFilter string `json:"typeFilter"`
	// Element UID to exclude from search results.
	// in:query
	// required:false
	ExcludeUID string `json:"excludeUid"`
	// A comma separated list of folder ID(s) to filter the elements by.
	// in:query
	// required:false
	FolderFilter string `json:"folderFilter"`
	// The number of results per page.
	// in:query
	// required:false
	// default: 100
	PerPage int `json:"perPage"`
	// The page for a set of records, given that only perPage records are returned at a time. Numbering starts at 1.
	// in:query
	// required:false
	// default: 1
	Page int `json:"page"`
}

swagger:parameters getLibraryElements

type GetLibraryElementsResponse

type GetLibraryElementsResponse struct {
	// in: body
	Body libraryelements.LibraryElementSearchResponse `json:"body"`
}

swagger:response getLibraryElementsResponse

type GetOrgResponse

type GetOrgResponse struct {
	// The response message
	// in: body
	Body models.OrgDetailsDTO `json:"body"`
}

swagger:response getOrgResponse

type GetOrgUsersResponse

type GetOrgUsersResponse struct {
	// The response message
	// in: body
	Body []*models.OrgUserDTO `json:"body"`
}

swagger:response getOrgUsersResponse

type GetPreferencesResponse

type GetPreferencesResponse struct {
	// in:body
	Body dtos.Prefs `json:"body"`
}

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 getSettingsResponse

type GetSnapshotSharingOptionsResponse

type GetSnapshotSharingOptionsResponse struct {
	// in:body
	Body struct {
		ExternalSnapshotURL  string `json:"externalSnapshotURL"`
		ExternalSnapshotName string `json:"externalSnapshotName"`
		ExternalEnabled      bool   `json:"externalEnabled"`
	} `json:"body"`
}

swagger:response getSnapshotSharingOptionsResponse

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 getSnapshots

type GetSnapshotsResponse

type GetSnapshotsResponse struct {
	// in:body
	Body []*models.DashboardSnapshotDTO `json:"body"`
}

swagger:response getSnapshotsResponse

type GetStatsResponse

type GetStatsResponse struct {
	// in:body
	Body models.AdminStats `json:"body"`
}

swagger:response getStatsResponse

type GetTeamMembersResponse

type GetTeamMembersResponse struct {
	// The response message
	// in: body
	Body []*models.TeamMemberDTO `json:"body"`
}

swagger:response getTeamMembersResponse

type GetTeamResponse

type GetTeamResponse struct {
	// The response message
	// in: body
	Body *models.TeamDTO `json:"body"`
}

swagger:response getTeamResponse

type GetUserByLoginOrEmailParam

type GetUserByLoginOrEmailParam struct {
	// loginOrEmail of the user
	// in:query
	// required:true
	LoginOrEmail string `json:"loginOrEmail"`
}

swagger:parameters getUserByLoginOrEmail

type GetUserOrgListResponse

type GetUserOrgListResponse struct {
	// The response message
	// in: body
	Body []*models.UserOrgDTO `json:"body"`
}

swagger:response getUserOrgListResponse

type GetUserTeamsResponse

type GetUserTeamsResponse struct {
	// The response message
	// in: body
	Body []*models.TeamDTO `json:"body"`
}

swagger:response getUserTeamsResponse

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 ImportDashboardParam

type ImportDashboardParam struct {
	// in:body
	// required:true
	Body dashboardimport.ImportDashboardRequest
}

swagger:parameters importDashboard

type ImportDashboardResponse

type ImportDashboardResponse struct {
	// in: body
	Body dashboardimport.ImportDashboardResponse `json:"body"`
}

swagger:response importDashboardResponse

type InternalServerError

type InternalServerError GenericError

InternalServerError is a general error indicating something went wrong internally.

swagger:response internalServerError

type LibraryElementByName

type LibraryElementByName struct {
	// in:path
	// required:true
	Name string `json:"library_element_name"`
}

swagger:parameters getLibraryElementByName

type LibraryElementByUID

type LibraryElementByUID struct {
	// in:path
	// required:true
	UID string `json:"library_element_uid"`
}

swagger:parameters getLibraryElementByUID getLibraryElementConnections updateLibraryElement deleteLibraryElementByUID

type LookupAlertNotificationChannelsResponse

type LookupAlertNotificationChannelsResponse struct {
	// The response message
	// in: body
	Body []*dtos.AlertNotificationLookup `json:"body"`
}

swagger:response lookupAlertNotificationChannelsResponse

type LookupOrgUsersParams

type LookupOrgUsersParams struct {
	// in:query
	// required:false
	Query string `json:"query"`
	// in:query
	// required:false
	Limit int `json:"limit"`
}

swagger:parameters lookupOrgUsers

type LookupOrgUsersResponse

type LookupOrgUsersResponse struct {
	// The response message
	// in: body
	Body []*dtos.UserLookupDTO `json:"body"`
}

swagger:response lookupOrgUsersResponse

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 NotificationChannelTestParam

type NotificationChannelTestParam struct {
	// in:body
	// required:true
	Body dtos.NotificationTestCommand `json:"body"`
}

swagger:parameters notificationChannelTest

type NotificationIDParam

type NotificationIDParam struct {
	// in:path
	// required:true
	NotificationID int64 `json:"notification_channel_id"`
}

swagger:parameters updateAlertNotificationChannel getAlertNotificationChannelByID deleteAlertNotificationChannel

type NotificationUIDParam

type NotificationUIDParam struct {
	// in:path
	// required:true
	NotificationUID string `json:"notification_channel_uid"`
}

swagger:parameters getAlertNotificationChannelByUID updateAlertNotificationChannelBYUID deleteAlertNotificationChannelByUID

type OKResponse

type OKResponse struct {
	// in: body
	Body SuccessResponseBody `json:"body"`
}

An OKResponse is returned if the request was successful.

swagger:response okResponse

type OrgIDParam

type OrgIDParam struct {
	// in:path
	// required:true
	OrgID int64 `json:"org_id"`
}

swagger:parameters getOrgByID adminUpdateOrg adminUpdateOrgAddress adminDeleteOrg adminGetOrgUsers swagger:parameters adminAddOrgUser adminUpdateOrgUser adminDeleteOrgUser swagger:parameters getOrgQuota updateOrgQuota userSetUsingOrg

type OrgNameParam

type OrgNameParam struct {
	// in:path
	// required:true
	OrgName string `json:"org_name"`
}

swagger:parameters getOrgByName

type PatchAnnotationParams

type PatchAnnotationParams struct {
	// in:body
	// required:true
	Body dtos.PatchAnnotationsCmd `json:"body"`
}

swagger:parameters patchAnnotation

type PatchUserPreferencesParam

type PatchUserPreferencesParam struct {
	// in:body
	// required:true
	Body dtos.PatchPrefsCmd `json:"body"`
}

swagger:parameters patchUserPreferences patchOrgPreferences patchTeamPreferences

type PauseAlertParam

type PauseAlertParam struct {
	// 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 PauseAllAlertsParam

type PauseAllAlertsParam 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 PostDashboardParam

type PostDashboardParam struct {
	// in:body
	// required:true
	Body models.SaveDashboardCommand
}

swagger:parameters postDashboard

type PostDashboardPermissionsParam

type PostDashboardPermissionsParam struct {
	// in:body
	// required:true
	Body dtos.UpdateDashboardAclCommand
}

swagger:parameters postDashboardPermissions updateFolderPermissions

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"`
}

Create/update dashboard response. swagger:response postDashboardResponse

type PreconditionFailedError

type PreconditionFailedError GenericError

PreconditionFailedError

swagger:response preconditionFailedError

type QueryDataResponseResponse

type QueryDataResponseResponse struct {
	// The response message
	// in: body
	Body *backend.QueryDataResponse `json:"body"`
}

swagger:response queryDataResponse

type QueryDatasource

type QueryDatasource struct {
	// in:body
	// required:true
	Body dtos.MetricRequest
}

swagger:parameters queryDatasource

type QueryDatasourceResponse

type QueryDatasourceResponse struct {
	// The response message
	// in: body
	//nolint: staticcheck // plugins.DataResponse deprecated
	Body legacydata.DataResponse `json:"body"`
}

swagger:response queryDatasourceResponse

type QueryMetricsWithExpressionsBodyParam

type QueryMetricsWithExpressionsBodyParam struct {
	// in:body
	// required:true
	Body dtos.MetricRequest `json:"body"`
}

swagger:parameters queryMetricsWithExpressions

type RevokeAuthTokenParam

type RevokeAuthTokenParam struct {
	// in:body
	// required:true
	Body models.RevokeAuthTokenCmd `json:"body"`
}

swagger:parameters revokeAuthToken revokeSignedINAuthTokenCmd

type RevokeInviteParam

type RevokeInviteParam struct {
	// in:path
	// required:true
	Code string `json:"invitation_code"`
}

swagger:parameters revokeInvite

type SMTPNotEnabledError

type SMTPNotEnabledError PreconditionFailedError

swagger:response SMTPNotEnabledError

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 searchOrg searchTeams

type SearchOrgResponse

type SearchOrgResponse struct {
	// The response message
	// in: body
	Body []*models.OrgDTO `json:"body"`
}

swagger:response searchOrgResponse

type SearchParameters

type SearchParameters 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 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 SearchResponse

type SearchResponse struct {
	// in: body
	Body models.HitList `json:"body"`
}

swagger:response searchResponse

type SearchSortingResponse

type SearchSortingResponse 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 searchSortingResponse

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 SetPasswordParam

type SetPasswordParam struct {
	// in:body
	// required:true
	Body dtos.AdminUpdateUserPasswordForm `json:"body"`
}

swagger:parameters setPassword

type SetPermissionsParam

type SetPermissionsParam struct {
	// in:body
	// required:true
	Body dtos.AdminUpdateUserPermissionsForm `json:"body"`
}

swagger:parameters setPermissions

type SnapshotByKeyParam

type SnapshotByKeyParam struct {
	// in:path
	Key string `json:"key"`
}

swagger:parameters getSnapshotByKey deleteSnapshotByKey

type SnapshotResponse

type SnapshotResponse DashboardResponse

swagger:response snapshotResponse

type SuccessResponseBody

type SuccessResponseBody struct {
	Message string `json:"message,omitempty"`
}

swagger:model

type TargeQuotaParam

type TargeQuotaParam struct {
	// in:path
	// required:true
	QuotaTarget string `json:"quota_target"`
}

swagger:parameters updateUserQuota updateOrgQuota

type TeamIDParam

type TeamIDParam struct {
	// in:path
	// required:true
	TeamID string `json:"team_id"`
}

swagger:parameters getTeam updateTeam deleteTeamByID getTeamMembers addTeamMember updateTeamMember swagger:parameters removeTeamMember getTeamPreferences updateTeamPreferences

type TestAlertParam

type TestAlertParam 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 TrimDashboardParam

type TrimDashboardParam struct {
	// in:body
	// required:true
	Body models.TrimDashboardCommand
}

swagger:parameters trimDashboard

type TrimDashboardResponse

type TrimDashboardResponse struct {
	// in: body
	Body dtos.TrimDashboardFullWithMeta `json:"body"`
}

Trimmed dashboard response. swagger:response trimDashboardResponse

type UID

type UID struct {
	// in:path
	// required:true
	UID string `json:"uid"`
}

swagger:parameters getDashboardByUID deleteDashboardByUID

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 UpdateAlertNotificationChannelBYUIDParam

type UpdateAlertNotificationChannelBYUIDParam struct {
	// in:body
	// required:true
	Body models.UpdateAlertNotificationWithUidCommand `json:"body"`
}

swagger:parameters updateAlertNotificationChannelBYUID

type UpdateAlertNotificationChannelParam

type UpdateAlertNotificationChannelParam struct {
	// in:body
	// required:true
	Body models.UpdateAlertNotificationCommand `json:"body"`
}

swagger:parameters updateAlertNotificationChannel

type UpdateAnnotationParams

type UpdateAnnotationParams struct {
	// in:body
	// required:true
	Body dtos.UpdateAnnotationsCmd `json:"body"`
}

swagger:parameters updateAnnotation

type UpdateDatasource

type UpdateDatasource struct {
	// in:body
	// required:true
	Body models.UpdateDataSourceCommand
}

swagger:parameters updateDatasource

type UpdateFolderParam

type UpdateFolderParam struct {
	// 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 UpdateLibraryElementParam

type UpdateLibraryElementParam struct {
	// in:body
	// required:true
	Body libraryelements.PatchLibraryElementCommand `json:"body"`
}

swagger:parameters updateLibraryElement

type UpdateOrgAddressParam

type UpdateOrgAddressParam struct {
	// in:body
	// required:true
	Body dtos.UpdateOrgAddressForm `json:"body"`
}

swagger:parameters updateOrgAddress adminUpdateOrgAddress

type UpdateOrgParam

type UpdateOrgParam struct {
	// in:body
	// required:true
	Body dtos.UpdateOrgForm `json:"body"`
}

swagger:parameters updateOrg adminUpdateOrg

type UpdateOrgQuotaParam

type UpdateOrgQuotaParam struct {
	// in:body
	// required:true
	Body models.UpdateOrgQuotaCmd `json:"body"`
}

swagger:parameters updateOrgQuota

type UpdateOrgUserParam

type UpdateOrgUserParam struct {
	// in:body
	// required:true
	Body models.UpdateOrgUserCommand `json:"body"`
}

swagger:parameters updateOrgUser adminUpdateOrgUser

type UpdateTeamMember

type UpdateTeamMember struct {
	// in:body
	// required:true
	Body models.UpdateTeamMemberCommand `json:"body"`
}

swagger:parameters updateTeamMember

type UpdateTeamParam

type UpdateTeamParam struct {
	// in:body
	// required:true
	Body models.UpdateTeamCommand `json:"body"`
}

swagger:parameters updateTeam

type UpdateUserParam

type UpdateUserParam struct {
	// To change the email, name, login, theme, provide another one.
	// in:body
	// required:true
	Body models.UpdateUserCommand `json:"body"`
}

swagger:parameters updateUser updateSignedInUser

type UpdateUserPreferencesParam

type UpdateUserPreferencesParam struct {
	// in:body
	// required:true
	Body dtos.UpdatePrefsCmd `json:"body"`
}

swagger:parameters updateUserPreferences updateOrgPreferences updateTeamPreferences

type UpdateUserQuotaParam

type UpdateUserQuotaParam struct {
	// in:body
	// required:true
	Body models.UpdateUserQuotaCmd `json:"body"`
}

swagger:parameters updateUserQuota

type UserIDParam

type UserIDParam struct {
	// in:path
	// required:true
	UserID int64 `json:"user_id"`
}

swagger:parameters getUserByID updateUser getUserOrgList getUserTeams swagger:parameters setPassword setPermissions deleteUser getAuthTokens logoutUser revokeAuthToken swagger:parameters syncLDAPUser disableUser enableUser getUserQuota updateUserQuota swagger:parameters updateOrgUser deleteOrgUser adminUpdateOrgUser adminDeleteOrgUser swagger:parameters updateTeamMember removeTeamMember swagger:parameters listUserRoles addUserRole swagger:parameters listUserRoles addUserRole removeUserRole setUserRoles listUserRoles

type UserNameParam

type UserNameParam struct {
	// in:path
	// required:true
	UserID string `json:"user_name"`
}

swagger:parameters getLDAPUser

type UserResponse

type UserResponse struct {
	// The response message
	// in: body
	Body models.UserProfileDTO `json:"body"`
}

swagger:response userResponse

Jump to

Keyboard shortcuts

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