Documentation ¶
Index ¶
- Constants
- func DeleteAction(w http.ResponseWriter, r *http.Request)
- func DeleteCalendar(w http.ResponseWriter, r *http.Request)
- func DeleteConnectorConfig(w http.ResponseWriter, r *http.Request)
- func DeleteElasticSearchConfig(w http.ResponseWriter, r *http.Request)
- func DeleteExternalConfig(w http.ResponseWriter, r *http.Request)
- func DeleteFact(w http.ResponseWriter, r *http.Request)
- func DeleteJobSchedule(w http.ResponseWriter, r *http.Request)
- func DeleteModel(w http.ResponseWriter, r *http.Request)
- func DeletePermission(w http.ResponseWriter, r *http.Request)
- func DeleteRole(w http.ResponseWriter, r *http.Request)
- func DeleteRootCause(w http.ResponseWriter, r *http.Request)
- func DeleteRule(w http.ResponseWriter, r *http.Request)
- func DeleteSituation(w http.ResponseWriter, r *http.Request)
- func DeleteSituationTemplateInstance(w http.ResponseWriter, r *http.Request)
- func DeleteUser(w http.ResponseWriter, r *http.Request)
- func DeleteVariableConfig(w http.ResponseWriter, r *http.Request)
- func ExecuteFact(w http.ResponseWriter, r *http.Request)
- func ExecuteFactFromSource(w http.ResponseWriter, r *http.Request)
- func ExportFactStreamed(w http.ResponseWriter, r *http.Request)
- func FactToESQuery(w http.ResponseWriter, r *http.Request)
- func FuncGetLogLevel()
- func FuncLogin()
- func FuncSetLogLevel()
- func GetAction(w http.ResponseWriter, r *http.Request)
- func GetActions(w http.ResponseWriter, r *http.Request)
- func GetAuthenticationMode(w http.ResponseWriter, r *http.Request)
- func GetCalendar(w http.ResponseWriter, r *http.Request)
- func GetCalendars(w http.ResponseWriter, r *http.Request)
- func GetConnectorConfig(w http.ResponseWriter, r *http.Request)
- func GetConnectorConfigs(w http.ResponseWriter, r *http.Request)
- func GetDefaultElasticSearchConfig(w http.ResponseWriter, r *http.Request)
- func GetElasticSearchConfig(w http.ResponseWriter, r *http.Request)
- func GetElasticSearchConfigByName(w http.ResponseWriter, r *http.Request)
- func GetElasticSearchConfigs(w http.ResponseWriter, r *http.Request)
- func GetExternalConfig(w http.ResponseWriter, r *http.Request)
- func GetExternalConfigByName(w http.ResponseWriter, r *http.Request)
- func GetExternalConfigs(w http.ResponseWriter, r *http.Request)
- func GetFact(w http.ResponseWriter, r *http.Request)
- func GetFactHits(w http.ResponseWriter, r *http.Request)
- func GetFactResultByDateCriteria(w http.ResponseWriter, r *http.Request)
- func GetFactResultForTodayByCriteria(w http.ResponseWriter, r *http.Request)
- func GetFacts(w http.ResponseWriter, r *http.Request)
- func GetIssue(w http.ResponseWriter, r *http.Request)
- func GetIssueFactsHistory(w http.ResponseWriter, r *http.Request)
- func GetIssueFeedbackTree(w http.ResponseWriter, r *http.Request)
- func GetIssueHistory(w http.ResponseWriter, r *http.Request)
- func GetIssues(w http.ResponseWriter, r *http.Request)
- func GetIssuesByStatesByPage(w http.ResponseWriter, r *http.Request)
- func GetIssuesByStatesByPageUnProtected(w http.ResponseWriter, r *http.Request)
- func GetJobSchedule(w http.ResponseWriter, r *http.Request)
- func GetJobSchedules(w http.ResponseWriter, r *http.Request)
- func GetModel(w http.ResponseWriter, r *http.Request)
- func GetModels(w http.ResponseWriter, r *http.Request)
- func GetNotifications(w http.ResponseWriter, r *http.Request)
- func GetPermission(w http.ResponseWriter, r *http.Request)
- func GetPermissions(w http.ResponseWriter, r *http.Request)
- func GetResolvedCalendar(w http.ResponseWriter, r *http.Request)
- func GetRole(w http.ResponseWriter, r *http.Request)
- func GetRolePermissions(w http.ResponseWriter, r *http.Request)
- func GetRoles(w http.ResponseWriter, r *http.Request)
- func GetRootCause(w http.ResponseWriter, r *http.Request)
- func GetRootCauses(w http.ResponseWriter, r *http.Request)
- func GetRule(w http.ResponseWriter, r *http.Request)
- func GetRuleByVersion(w http.ResponseWriter, r *http.Request)
- func GetRuleSituations(w http.ResponseWriter, r *http.Request)
- func GetRules(w http.ResponseWriter, r *http.Request)
- func GetSituation(w http.ResponseWriter, r *http.Request)
- func GetSituationEvaluation(w http.ResponseWriter, r *http.Request)
- func GetSituationFacts(w http.ResponseWriter, r *http.Request)
- func GetSituationRules(w http.ResponseWriter, r *http.Request)
- func GetSituationTemplateInstances(w http.ResponseWriter, r *http.Request)
- func GetSituationTemplateInstancesUnprotected(w http.ResponseWriter, r *http.Request)
- func GetSituations(w http.ResponseWriter, r *http.Request)
- func GetUser(w http.ResponseWriter, r *http.Request)
- func GetUserFromContext(r *http.Request) (users.UserWithPermissions, bool)
- func GetUserSelf(w http.ResponseWriter, r *http.Request)
- func GetUsers(w http.ResponseWriter, r *http.Request)
- func GetVariableConfig(w http.ResponseWriter, r *http.Request)
- func GetVariableConfigByKey(w http.ResponseWriter, r *http.Request)
- func GetVariablesConfig(w http.ResponseWriter, r *http.Request)
- func GetlastConnectorExecutionDateTime(w http.ResponseWriter, r *http.Request)
- func HandleOIDCCallback(w http.ResponseWriter, r *http.Request)
- func HandleOIDCRedirect(w http.ResponseWriter, r *http.Request)
- func IsAlive(w http.ResponseWriter, r *http.Request)
- func IsInCalendarPeriod(w http.ResponseWriter, r *http.Request)
- func LogoutHandler(deleteSessionMiddleware func(http.Handler) http.Handler) http.Handler
- func NotImplemented(w http.ResponseWriter, r *http.Request)
- func NotificationsSSERegister(w http.ResponseWriter, r *http.Request)
- func NotificationsWSRegister(w http.ResponseWriter, r *http.Request)
- func ParseDuration(dStr string) (time.Duration, error)
- func ParseFactParameters(factParameters string) (map[string]string, error)
- func ParseInt(tStr string) (int, error)
- func ParseSortBy(rawSortByStr string, allowedFields []string) ([]models.SortOption, error)
- func ParseTime(tStr string) (time.Time, error)
- func PostAction(w http.ResponseWriter, r *http.Request)
- func PostCalendar(w http.ResponseWriter, r *http.Request)
- func PostConnectorConfig(w http.ResponseWriter, r *http.Request)
- func PostElasticSearchConfig(w http.ResponseWriter, r *http.Request)
- func PostExternalConfig(w http.ResponseWriter, r *http.Request)
- func PostFact(w http.ResponseWriter, r *http.Request)
- func PostIssue(w http.ResponseWriter, r *http.Request)
- func PostIssueCloseWithFeedback(w http.ResponseWriter, r *http.Request)
- func PostIssueCloseWithoutFeedback(w http.ResponseWriter, r *http.Request)
- func PostIssueDetectionFeedback(w http.ResponseWriter, r *http.Request)
- func PostIssueDraft(w http.ResponseWriter, r *http.Request)
- func PostIssuesCloseWithoutFeedback(w http.ResponseWriter, r *http.Request)
- func PostIssuesDraft(w http.ResponseWriter, r *http.Request)
- func PostJobSchedule(w http.ResponseWriter, r *http.Request)
- func PostModel(w http.ResponseWriter, r *http.Request)
- func PostObjects(w http.ResponseWriter, r *http.Request)
- func PostPermission(w http.ResponseWriter, r *http.Request)
- func PostRole(w http.ResponseWriter, r *http.Request)
- func PostRootCause(w http.ResponseWriter, r *http.Request)
- func PostRule(w http.ResponseWriter, r *http.Request)
- func PostRuleSituations(w http.ResponseWriter, r *http.Request)
- func PostSituation(w http.ResponseWriter, r *http.Request)
- func PostSituationTemplateInstance(w http.ResponseWriter, r *http.Request)
- func PostUser(w http.ResponseWriter, r *http.Request)
- func PostVariableConfig(w http.ResponseWriter, r *http.Request)
- func PutAction(w http.ResponseWriter, r *http.Request)
- func PutCalendar(w http.ResponseWriter, r *http.Request)
- func PutConnectorConfig(w http.ResponseWriter, r *http.Request)
- func PutElasticSearchConfig(w http.ResponseWriter, r *http.Request)
- func PutExternalConfig(w http.ResponseWriter, r *http.Request)
- func PutFact(w http.ResponseWriter, r *http.Request)
- func PutJobSchedule(w http.ResponseWriter, r *http.Request)
- func PutModel(w http.ResponseWriter, r *http.Request)
- func PutPermission(w http.ResponseWriter, r *http.Request)
- func PutRole(w http.ResponseWriter, r *http.Request)
- func PutRootCause(w http.ResponseWriter, r *http.Request)
- func PutRule(w http.ResponseWriter, r *http.Request)
- func PutSituation(w http.ResponseWriter, r *http.Request)
- func PutSituationTemplateInstance(w http.ResponseWriter, r *http.Request)
- func PutSituationTemplateInstances(w http.ResponseWriter, r *http.Request)
- func PutUser(w http.ResponseWriter, r *http.Request)
- func PutVariableConfig(w http.ResponseWriter, r *http.Request)
- func QueryParamToOptionalBool(r *http.Request, name string, orDefault bool) (bool, error)
- func QueryParamToOptionalDuration(r *http.Request, name string, orDefault time.Duration) (time.Duration, error)
- func QueryParamToOptionalInt(r *http.Request, name string, orDefault int) (int, error)
- func QueryParamToOptionalInt64(r *http.Request, name string, orDefault int64) (int64, error)
- func QueryParamToOptionalInt64Array(r *http.Request, name, separator string, allowDuplicates bool, ...) ([]int64, error)
- func QueryParamToOptionalKeyValues(r *http.Request, name string, orDefault map[string]string) (map[string]string, error)
- func QueryParamToOptionalStringArray(r *http.Request, name string, separator string, orDefault []string) []string
- func QueryParamToOptionalTime(r *http.Request, name string, orDefault time.Time) (time.Time, error)
- func QueryParamToTime(r *http.Request, name string) (time.Time, error)
- func SearchLast(w http.ResponseWriter, r *http.Request)
- func SearchLastByCustomInterval(w http.ResponseWriter, r *http.Request)
- func SearchLastByInterval(w http.ResponseWriter, r *http.Request)
- func SetRolePermissions(w http.ResponseWriter, r *http.Request)
- func SetSituationRules(w http.ResponseWriter, r *http.Request)
- func SetUserRoles(w http.ResponseWriter, r *http.Request)
- func StartScheduler(w http.ResponseWriter, r *http.Request)
- func TestRule(w http.ResponseWriter, r *http.Request)
- func TriggerJobSchedule(w http.ResponseWriter, r *http.Request)
- func TriggerNotification(w http.ResponseWriter, r *http.Request)
- func UpdateIssueComment(w http.ResponseWriter, r *http.Request)
- func UpdateRead(w http.ResponseWriter, r *http.Request)
- func ValidateAction(w http.ResponseWriter, r *http.Request)
- func ValidateFact(w http.ResponseWriter, r *http.Request)
- func ValidateJobSchedule(w http.ResponseWriter, r *http.Request)
- func ValidateModel(w http.ResponseWriter, r *http.Request)
- func ValidatePermission(w http.ResponseWriter, r *http.Request)
- func ValidateRole(w http.ResponseWriter, r *http.Request)
- func ValidateRootCause(w http.ResponseWriter, r *http.Request)
- func ValidateRule(w http.ResponseWriter, r *http.Request)
- func ValidateSituation(w http.ResponseWriter, r *http.Request)
- func ValidateUser(w http.ResponseWriter, r *http.Request)
- type CustomExportRequest
- type ExportHandler
- func (e *ExportHandler) DeleteExport(w http.ResponseWriter, r *http.Request)
- func (e *ExportHandler) DownloadExport(w http.ResponseWriter, r *http.Request)
- func (e *ExportHandler) ExportCustom(w http.ResponseWriter, r *http.Request)
- func (e *ExportHandler) ExportFact(w http.ResponseWriter, r *http.Request)
- func (e *ExportHandler) GetExport(w http.ResponseWriter, r *http.Request)
- func (e *ExportHandler) GetExports(w http.ResponseWriter, r *http.Request)
- type ExportRequest
- type ProcessorHandler
- type ServiceHandler
- func (sh *ServiceHandler) GetServices(w http.ResponseWriter, r *http.Request)
- func (sh *ServiceHandler) GetStatus(w http.ResponseWriter, r *http.Request)
- func (sh *ServiceHandler) Reload(w http.ResponseWriter, r *http.Request)
- func (sh *ServiceHandler) Restart(w http.ResponseWriter, r *http.Request)
Constants ¶
const ( ExpectedStateErr = "Error to generate a random State for OIDC Authentification" InvalidStateErr = "OIDC authentication invalid state" TokenExchangeErr = "OIDC authentication Failed to exchange token" NoIDTokenErr = "OIDC authentication No ID token found" IDTokenVerifyErr = "OIDC authentication Failed to verify ID token" TokenName = "token" AllowedCookiePath = "/" EnableParsingQueryParamName = "parsinggvalenabled" )
Variables ¶
This section is empty.
Functions ¶
func DeleteAction ¶
func DeleteAction(w http.ResponseWriter, r *http.Request)
DeleteAction godoc @Summary Delete a action definition @Description Delete a action definition @Tags Actions @Produce json @Param id path string true "Action ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/actions/{id} [delete]
func DeleteCalendar ¶
func DeleteCalendar(w http.ResponseWriter, r *http.Request)
DeleteCalendar godoc @Summary Delete calendar @Description Delete calendar @Tags Calendars @Produce json @Param id path string true "Calendar ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status Internal Server Error" @Router /engine/calendars/{id} [delete]
func DeleteConnectorConfig ¶ added in v5.0.9
func DeleteConnectorConfig(w http.ResponseWriter, r *http.Request)
DeleteConnectorConfig godoc @Summary Delete an connectorConfig definition @Description Delete an connectorConfig definition @Tags ConnectorConfigs @Produce json @Param name path string true "ConnectorConfig ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/connectorconfigs/{name} [delete]
func DeleteElasticSearchConfig ¶ added in v5.5.0
func DeleteElasticSearchConfig(w http.ResponseWriter, r *http.Request)
DeleteElasticSearchConfig godoc @Summary Delete an elasticSearchConfig definition @Description Delete an elasticSearchConfig definition @Tags ElasticSearchConfigs @Produce json @Param id path string true "ElasticSearchConfig ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/esconfigs/{id} [delete]
func DeleteExternalConfig ¶
func DeleteExternalConfig(w http.ResponseWriter, r *http.Request)
DeleteExternalConfig godoc @Summary Delete an externalConfig definition @Description Delete an externalConfig definition @Tags ExternalConfigs @Produce json @Param name path string true "ExternalConfig ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/externalconfigs/{name} [delete]
func DeleteFact ¶
func DeleteFact(w http.ResponseWriter, r *http.Request)
DeleteFact godoc @Summary Delete a fact definition @Description Delete a fact definition @Tags Facts @Produce json @Param id path string true "Fact ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/facts/{id} [delete]
func DeleteJobSchedule ¶
func DeleteJobSchedule(w http.ResponseWriter, r *http.Request)
DeleteJobSchedule godoc @Summary delete JobSchedule @Description delete JobSchedule @Tags Scheduler @Produce json @Param id path string true "JobSchedule ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status Internal Server Error" @Router /engine/scheduler/jobs/{id} [delete]
func DeleteModel ¶
func DeleteModel(w http.ResponseWriter, r *http.Request)
DeleteModel godoc @Summary Delete a model definition @Description Delete a model definition @Tags Models @Produce json @Param id path string true "Model ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/models/{id} [delete]
func DeletePermission ¶
func DeletePermission(w http.ResponseWriter, r *http.Request)
DeletePermission godoc @Summary Delete permission @Description Deletes an user permission @Tags Permissions @Produce json @Param id path string true "permission ID" @Security Bearer @Success 200 {string} string "status OK" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/permissions/{id} [delete]
func DeleteRole ¶
func DeleteRole(w http.ResponseWriter, r *http.Request)
DeleteRole godoc @Summary Delete role @Description Deletes an user role @Tags Roles @Produce json @Param id path string true "role ID" @Security Bearer @Success 200 {string} string "status OK" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/roles/{id} [delete]
func DeleteRootCause ¶
func DeleteRootCause(w http.ResponseWriter, r *http.Request)
DeleteRootCause godoc @Summary Delete a rootcause definition @Description Delete a rootcause definition @Tags RootCauses @Produce json @Param id path string true "RootCause ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/rootcauses/{id} [delete]
func DeleteRule ¶
func DeleteRule(w http.ResponseWriter, r *http.Request)
DeleteRule godoc @Summary delete rule @Description delete rule @Tags Rules @Produce json @Param id path string true "Rule ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status Internal Server Error" @Router /engine/rules/{id} [delete]
func DeleteSituation ¶
func DeleteSituation(w http.ResponseWriter, r *http.Request)
DeleteSituation godoc @Summary Delete a situation definition @Description Delete a situation definition @Tags Situations @Param id path string true "Situation ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/situations/{id} [delete]
func DeleteSituationTemplateInstance ¶
func DeleteSituationTemplateInstance(w http.ResponseWriter, r *http.Request)
DeleteSituationTemplateInstance godoc @Summary Delete a situation template instance @Description Delete a situation template instance @Tags Situations @Param id path string true "Situation ID" @Param instanceid path string true "Situation Template Instance ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/situations/{id}/instances/{instanceid} [delete]
func DeleteUser ¶
func DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser godoc @Summary Delete user @Description Deletes an user user @Tags Users @Produce json @Param id path string true "user ID" @Security Bearer @Success 200 {string} string "status OK" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/users/{id} [delete]
func DeleteVariableConfig ¶ added in v5.3.5
func DeleteVariableConfig(w http.ResponseWriter, r *http.Request)
DeleteVariableConfig godoc @Summary Delete an Variable Config definition @Description Delete an Variable Config definition @Tags VariablesConfig @Produce json @Param id path string true "VariableConfig ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/variablesconfig/{id} [delete]
func ExecuteFact ¶
func ExecuteFact(w http.ResponseWriter, r *http.Request)
ExecuteFact godoc @Summary Execute a fact with a given timestamp @Description Execute a fact with a given timestamp @Tags Facts @Produce json @Param id path string true "Fact ID" @Param byName query string false "Find fact by it's name" @Param time query string false "Timestamp used for the fact execution" @Param cache query string false "Cache maximum age in minutes(go duration: 10m, 1h, ...). If unset, use cache with no limit of age. If set to 0, disable cache" @Param nhit query int false "Hit per page" @Param offset query int false "Offset number" @Param placeholders query string false "Placeholders (format: key1:value1,key2:value2)" @Param debug query string false "Debug true/false" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/facts/{id}/execute [get]
func ExecuteFactFromSource ¶
func ExecuteFactFromSource(w http.ResponseWriter, r *http.Request)
ExecuteFactFromSource godoc @Summary Execute a fact with a given timestamp @Description Execute a fact with a given timestamp @Tags Facts @Consumme json @Produce json @Param fact body interface{} true "Fact definition (json)" @Param time query string true "Timestamp used for the fact execution" @Param nhit query int false "Hit per page" @Param offset query int false "Offset number" @Param placeholders query string false "Placeholders (format key1:value1,key2:value2)" @Param debug query string false "Debug true/false" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/facts/execute [post]
func ExportFactStreamed ¶ added in v5.3.6
func ExportFactStreamed(w http.ResponseWriter, r *http.Request)
ExportFactStreamed godoc @Summary CSV streamed export facts in chunks @Description CSV Streamed export for facts in chunks @Tags ExportFactStreamed @Produce octet-stream @Security Bearer @Param request body handlers.ExportRequest true "request (json)" @Success 200 {file} Returns data to be saved into a file @Failure 500 "internal server error" @Router /engine/facts/streamedexport [post]
func FactToESQuery ¶
func FactToESQuery(w http.ResponseWriter, r *http.Request)
FactToESQuery godoc @Summary Execute a fact with a given timestamp @Description Execute a fact with a given timestamp @Tags Facts @Produce json @Param id path string true "Fact ID" @Param byName query string false "Find fact by it's name" @Param situationid query string false "Optional SituationID" @Param instanceid query string false "Optional InstanceID" @Param time query string true "Timestamp used for the fact execution" @Param cache query string false "Cache maximum age in minutes(go duration: 10m, 1h, ...). If unset, use cache with no limit of age. If set to 0, disable cache" @Param nhit query int false "Hit per page" @Param offset query int false "Offset number" @Param placeholders query string false "Placeholders (format: key1:value1,key2:value2)" @Param debug query string false "Debug true/false" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/facts/{id}/es [get]
func FuncGetLogLevel ¶
func FuncGetLogLevel()
FuncGetLogLevel godoc (only for swagger doc) @Summary Get Log Level @Description Get current logging level @Tags Logs @Produce json @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /log_level [get]
func FuncLogin ¶
func FuncLogin()
FuncLogin godoc (only for swagger doc) @Summary Login @Description Authenticate using basic auth @Description Example : @Description <pre>{"login":"myuser","password":"mypassword"}</pre> @Tags Security @Produce json @Param job body interface{} true "Credentials (json)" @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /login [post]
func FuncSetLogLevel ¶
func FuncSetLogLevel()
FuncSetLogLevel godoc (only for swagger doc) @Summary Set Log Level @Description Set logging level @Description Example : @Description <pre>{"level":"info"}</pre> @Tags Logs @Consumme json @Produce json @Param level body interface{} true "Level (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /log_level [put]
func GetAction ¶
func GetAction(w http.ResponseWriter, r *http.Request)
GetAction godoc @Summary Get a action definition @Description Get a action definition @Tags Actions @Produce json @Param id path string true "Action ID" @Security Bearer @Success 200 {object} models.Action "action" @Failure 400 "Status Bad Request" @Router /engine/actions/{id} [get]
func GetActions ¶
func GetActions(w http.ResponseWriter, r *http.Request)
GetActions godoc @Summary Get all action definitions @Description Get all action definitions @Tags Actions @Produce json @Security Bearer @Success 200 {array} models.Action "list of all actions" @Failure 500 "internal server error" @Router /engine/actions [get]
func GetAuthenticationMode ¶ added in v5.3.2
func GetAuthenticationMode(w http.ResponseWriter, r *http.Request)
GetAuthenticationMode godoc @Summary Get the current authentication mode @Description Retrieves the current mode used for authentication. @Tags Admin @Produce json @Security Bearer @Success 200 {object} routerauth.AuthenticationMode @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /engine/authmode [get]
func GetCalendar ¶
func GetCalendar(w http.ResponseWriter, r *http.Request)
GetCalendar godoc @Summary Get a Calendar @Description Get an calendar @Tags Calendars @Produce json @Param id path string true "Calendar ID" @Security Bearer @Success 200 {object} calendar.Calendar "calendar" @Failure 400 "Status Bad Request" @Router /engine/calendars/{id} [get]
func GetCalendars ¶
func GetCalendars(w http.ResponseWriter, r *http.Request)
GetCalendars godoc @Summary Get all calendars @Description Get all calendars @Tags Calendars @Produce json @Security Bearer @Success 200 {array} calendar.Calendar "list of calendars" @Failure 500 "internal server error" @Router /engine/calendars [get]
func GetConnectorConfig ¶ added in v5.0.9
func GetConnectorConfig(w http.ResponseWriter, r *http.Request)
GetConnectorConfig godoc @Summary Get an connectorConfig definition @Description Get an connectorConfig definition @Tags ConnectorConfigs @Produce json @Param id path string true "ConnectorConfig ID" @Security Bearer @Success 200 {object} models.ConnectorConfig "connectorConfig" @Failure 400 "Status Bad Request" @Router /engine/connectorconfigs/{id} [get]
func GetConnectorConfigs ¶ added in v5.0.9
func GetConnectorConfigs(w http.ResponseWriter, r *http.Request)
GetConnectorConfigs godoc @Summary Get all connectorConfig definitions @Description Get all connectorConfig definitions @Tags ConnectorConfigs @Produce json @Security Bearer @Success 200 {array} models.ConnectorConfig "list of all connectorConfigs" @Failure 500 "internal server error" @Router /engine/connectorconfigs [get]
func GetDefaultElasticSearchConfig ¶ added in v5.5.0
func GetDefaultElasticSearchConfig(w http.ResponseWriter, r *http.Request)
GetDefaultElasticSearchConfig godoc @Summary Get the default elasticSearchConfig definition @Description Get the default elasticSearchConfig definition @Tags ElasticSearchConfigs @Produce json @Security Bearer @Success 200 {object} models.ElasticSearchConfig "elasticSearchConfig" @Failure 400 "Status Bad Request" @Router /engine/esconfigs/default [get]
func GetElasticSearchConfig ¶ added in v5.5.0
func GetElasticSearchConfig(w http.ResponseWriter, r *http.Request)
GetElasticSearchConfig godoc @Summary Get an elasticSearchConfig definition @Description Get an elasticSearchConfig definition @Tags ElasticSearchConfigs @Produce json @Param id path string true "ElasticSearchConfig ID" @Security Bearer @Success 200 {object} models.ElasticSearchConfig "elasticSearchConfig" @Failure 400 "Status Bad Request" @Router /engine/esconfigs/{id} [get]
func GetElasticSearchConfigByName ¶ added in v5.5.0
func GetElasticSearchConfigByName(w http.ResponseWriter, r *http.Request)
GetElasticSearchConfigByName godoc @Summary Get an elasticSearchConfig definition @Description Get an elasticSearchConfig definition @Tags ElasticSearchConfigs @Produce json @Param name path string true "ElasticSearchConfig Name (escaped html accepted)" @Security Bearer @Success 200 {object} models.ElasticSearchConfig "elasticSearchConfig" @Failure 400 "Status Bad Request" @Router /engine/esconfigs/name/{name} [get]
func GetElasticSearchConfigs ¶ added in v5.5.0
func GetElasticSearchConfigs(w http.ResponseWriter, r *http.Request)
GetElasticSearchConfigs godoc @Summary Get all elasticSearchConfig definitions @Description Get all elasticSearchConfig definitions @Tags ElasticSearchConfigs @Produce json @Security Bearer @Success 200 {array} models.ElasticSearchConfig "list of all elasticSearchConfigs" @Failure 500 "internal server error" @Router /engine/esconfigs [get]
func GetExternalConfig ¶
func GetExternalConfig(w http.ResponseWriter, r *http.Request)
GetExternalConfig godoc @Summary Get an externalConfig definition @Description Get an externalConfig definition @Tags ExternalConfigs @Produce json @Param id path string true "ExternalConfig ID" @Security Bearer @Success 200 {object} models.ExternalConfig "externalConfig" @Failure 400 "Status Bad Request" @Router /engine/externalconfigs/{id} [get]
func GetExternalConfigByName ¶ added in v5.0.9
func GetExternalConfigByName(w http.ResponseWriter, r *http.Request)
GetExternalConfigByName godoc @Summary Get an externalConfig definition @Description Get an externalConfig definition @Tags ExternalConfigs @Produce json @Param name path string true "ExternalConfig Name (escaped html accepted)" @Security Bearer @Success 200 {object} models.ExternalConfig "externalConfig" @Failure 400 "Status Bad Request" @Router /engine/externalconfigs/name/{name} [get]
func GetExternalConfigs ¶
func GetExternalConfigs(w http.ResponseWriter, r *http.Request)
GetExternalConfigs godoc @Summary Get all externalConfig definitions @Description Get all externalConfig definitions @Tags ExternalConfigs @Produce json @Security Bearer @Success 200 {array} models.ExternalConfig "list of all externalConfigs" @Failure 500 "internal server error" @Router /engine/externalconfigs [get]
func GetFact ¶
func GetFact(w http.ResponseWriter, r *http.Request)
GetFact godoc @Summary Get a fact definition @Description Get a fact definition @Tags Facts @Produce json @Param id path string true "Fact ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/facts/{id} [get]
func GetFactHits ¶
func GetFactHits(w http.ResponseWriter, r *http.Request)
GetFactHits godoc @Summary Execute a fact and restitue the hits @Description Execute a fact and restitue the hits @Tags Facts @Produce json @Param id path string true "Fact ID" @Param time query string true "Timestamp used for the fact execution" @Param nhit query int false "Hit per page" @Param offset query int false "Offset number" @Param situationId query string false "Situation Id, necessary if the fact is template" @Param situationInstanceId query string false "Situation instance Id if applicable" @Param debug query string false "Debug true/false" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/facts/{id}/hits [get]
func GetFactResultByDateCriteria ¶ added in v5.3.6
func GetFactResultByDateCriteria(w http.ResponseWriter, r *http.Request)
@Summary Get Fact Result by Date Criteria @Description Fetches the result of a historical fact based on provided criteria within specified date range. The dates should be in the format "2006-01-02 15:04:05". @Tags Facts_history @Accept json @Produce json @Param factHistory body history.ParamGetFactHistoryByDate true "JSON payload containing criteria and date range for fetching history fact result, with dates in '2006-01-02 15:04:05' format." @Security Bearer @Success 200 {object} history.FactResult "Successfully fetched result" @Failure 400 "Status Bad Request" @Failure 500 "Status Internal Server Error" @Router /engine/history/facts/date/result [post]
func GetFactResultForTodayByCriteria ¶ added in v5.3.0
func GetFactResultForTodayByCriteria(w http.ResponseWriter, r *http.Request)
@Summary Get Today's Fact Result by Criteria @Description Fetches the result of a historical fact based on provided criteria for today's date. @Tags Facts_history @Accept json @Produce json @Param factHistory body history.ParamGetFactHistory true "JSON payload containing criteria for fetching today's history fact result." @Security Bearer @Success 200 {object} history.FactResult "Successfully fetched result" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/history/facts/today/result [post]
func GetFacts ¶
func GetFacts(w http.ResponseWriter, r *http.Request)
GetFacts godoc @Summary Get all fact definitions @Description Get all fact definitions @Tags Facts @Produce json @Security Bearer @Success 200 "Status OK" @Failure 500 "internal server error" @Router /engine/facts [get]
func GetIssue ¶
func GetIssue(w http.ResponseWriter, r *http.Request)
GetIssue godoc @Summary Get an issue @Description Get an issue @Tags Issues @Produce json @Param id path string true "Issue ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/issues/{id} [get]
func GetIssueFactsHistory ¶
func GetIssueFactsHistory(w http.ResponseWriter, r *http.Request)
GetIssueFactsHistory godoc @Summary Get the facts history for an issue @Description Get the facts history for an issue @Tags Issues @Produce json @Param id path string true "Issue ID" @Security Bearer @Success 200 "Status OK" @Failure 500 "Status Internal Server Error" @Failure 404 "Status Not Found" @Router /engine/issues/{id}/facts_history [get]
func GetIssueFeedbackTree ¶
func GetIssueFeedbackTree(w http.ResponseWriter, r *http.Request)
GetIssueFeedbackTree godoc @Summary Generate the rootcauses/actions recommendation tree @Description Generate the rootcauses/actions recommendation tree for an issue @Tags Issues @Accept json @Produce json @Param id path string true "Issue ID" @Security Bearer @Success 200 {object} models.FrontRecommendation "recommendation" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/issues/{id}/recommendation [get]
func GetIssueHistory ¶
func GetIssueHistory(w http.ResponseWriter, r *http.Request)
GetIssueHistory godoc @Summary Get an issue history @Description Get an issue history @Tags Issues @Produce json @Param id path string true "Issue ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/issues/{id}/history [get]
func GetIssues ¶
func GetIssues(w http.ResponseWriter, r *http.Request)
GetIssues godoc @Summary Get all issues @Description Get all issues @Tags Issues @Produce json @Security Bearer @Success 200 "Status OK" @Failure 500 "internal server error" @Router /admin/engine/issues_all [get]
func GetIssuesByStatesByPage ¶
func GetIssuesByStatesByPage(w http.ResponseWriter, r *http.Request)
GetIssuesByStatesByPage godoc @Summary Get issues by issues states (paginated) @Description Get issues by issues states (paginated) @Tags Issues @Produce json @Param states query string true "Issue states (comma separated) (Available: open, draft, closedfeedback, closednofeedback, closedtimeout)" @Param limit query string false "Result limit (default: 50)" @Param offset query string false "Result offset (default: 0)" @Param sort_by query string false "Result offset (example: 'sort_by=desc(last_modified),asc(id)')" @Security Bearer @Success 200 "Status OK" @Failure 500 "internal server error" @Router /engine/issues [get]
func GetIssuesByStatesByPageUnProtected ¶ added in v5.3.6
func GetIssuesByStatesByPageUnProtected(w http.ResponseWriter, r *http.Request)
GetIssuesByStatesByPageUnProtected godoc @Summary Get issues by issues states (paginated) @Description Get issues by issues states (paginated) @Tags Issues @Produce json @Param states query string true "Issue states (comma separated) (Available: open, draft, closedfeedback, closednofeedback, closedtimeout)" @Param limit query string false "Result limit (default: 50)" @Param offset query string false "Result offset (default: 0)" @Param sort_by query string false "Result offset (example: 'sort_by=desc(last_modified),asc(id)')" @Security Bearer @Success 200 "Status OK" @Failure 500 "internal server error" @Router /engine/issues/unprotected [get]
func GetJobSchedule ¶
func GetJobSchedule(w http.ResponseWriter, r *http.Request)
GetJobSchedule godoc @Summary Get a JobSchedule @Description Get a specific JobSchedule by it's ID @Tags Scheduler @Produce json @Param id path string true "job ID" @Security Bearer @Success 200 {object} scheduler.InternalSchedule "schedule" @Failure 500 "internal server error" @Router /engine/scheduler/jobs/{id} [get]
func GetJobSchedules ¶
func GetJobSchedules(w http.ResponseWriter, r *http.Request)
GetJobSchedules godoc @Summary Get all JobSchedules @Description Get all JobSchedules from scheduler repository @Tags Scheduler @Produce json @Security Bearer @Success 200 {array} scheduler.InternalSchedule "list of schedules" @Failure 500 "internal server error" @Router /engine/scheduler/jobs [get]
func GetModel ¶
func GetModel(w http.ResponseWriter, r *http.Request)
GetModel godoc @Summary Get a model definition @Description Get a model definition @Tags Models @Produce json @Param id path string true "Model ID" @Param byName query string false "Find model by it's name" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/models/{id} [get]
func GetModels ¶
func GetModels(w http.ResponseWriter, r *http.Request)
GetModels godoc @Summary Get all model definitions @Description Get all model definitions @Tags Models @Produce json @Security Bearer @Success 200 "Status OK" @Failure 500 "internal server error" @Router /engine/models [get]
func GetNotifications ¶
func GetNotifications(w http.ResponseWriter, r *http.Request)
GetNotifications godoc @Summary Get all notifications @Description Get all notifications of the authentified user @Tags Notifications @Produce json @Param maxage query string false "Notification maximum age (use duration format, ex: 48h)" @Param nhit query int false "Hit per page" @Param offset query int false "Offset number for pagination" @Security Bearer @Failure 500 "internal server error" @Router /engine/notifications [get]
func GetPermission ¶
func GetPermission(w http.ResponseWriter, r *http.Request)
GetPermission godoc @Summary Get an user permission @Description Gets an user permission with the specified id @Tags Permissions @Produce json @Param id path string true "permission ID" @Security Bearer @Success 200 {object} permissions.Permission "permission" @Failure 400 {string} string "Bad Request" @Failure 404 {string} string "Not Found" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/permissions/{id} [get]
func GetPermissions ¶
func GetPermissions(w http.ResponseWriter, r *http.Request)
GetPermissions godoc @Summary Get all user permissions @Description Gets a list of all user permissions. @Tags Permissions @Produce json @Security Bearer @Success 200 {array} permissions.Permission "list of permissions" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/permissions [get]
func GetResolvedCalendar ¶
func GetResolvedCalendar(w http.ResponseWriter, r *http.Request)
GetResolvedCalendar godoc @Summary Get a resolved Calendar @Description Get a resolved Calendar @Tags Calendars @Produce json @Param id path string true "Calendar ID" @Security Bearer @Success 200 {object} calendar.Calendar "calendar" @Failure 400 "Status Bad Request" @Router /engine/calendars/resolved/{id} [get]
func GetRole ¶
func GetRole(w http.ResponseWriter, r *http.Request)
GetRole godoc @Summary Get an user role @Description Gets an user role with the specified id @Tags Roles @Produce json @Param id path string true "role ID" @Security Bearer @Success 200 {object} roles.Role "role" @Failure 400 {string} string "Bad Request" @Failure 404 {string} string "Not Found" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/roles/{id} [get]
func GetRolePermissions ¶
func GetRolePermissions(w http.ResponseWriter, r *http.Request)
GetRolePermissions godoc @Summary Get all permissions associated with a role @Description Get all permissions associated with a specified role id @Tags Roles @Produce json @Param id path string true "role ID" @Security Bearer @Success 200 {array} permissions.Permission "permission" @Failure 400 {string} string "Bad Request" @Failure 404 {string} string "Not Found" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/roles/{id}/permissions [get]
func GetRoles ¶
func GetRoles(w http.ResponseWriter, r *http.Request)
GetRoles godoc @Summary Get all user roles @Description Gets a list of all user roles. @Tags Roles @Produce json @Security Bearer @Success 200 {array} roles.Role "list of roles" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/roles [get]
func GetRootCause ¶
func GetRootCause(w http.ResponseWriter, r *http.Request)
GetRootCause godoc @Summary Get a rootcause definition @Description Get a rootcause definition @Tags RootCauses @Produce json @Param id path string true "RootCause ID" @Security Bearer @Success 200 {object} models.RootCause "rootcause" @Failure 400 "Status Bad Request" @Router /engine/rootcauses/{id} [get]
func GetRootCauses ¶
func GetRootCauses(w http.ResponseWriter, r *http.Request)
GetRootCauses godoc @Summary Get all rootcause definitions @Description Get all rootcause definitions @Tags RootCauses @Produce json @Security Bearer @Success 200 {array} models.RootCause "list of rootcauses" @Failure 500 "internal server error" @Router /engine/rootcauses [get]
func GetRule ¶
func GetRule(w http.ResponseWriter, r *http.Request)
GetRule godoc @Summary Get a rule @Description Get a specific rule by it's ID @Tags Rules @Produce json @Param id path string true "Rule ID" @Security Bearer @Success 200 {object} rule.Rule "rule" @Failure 500 "internal server error" @Router /engine/rules/{id} [get]
func GetRuleByVersion ¶
func GetRuleByVersion(w http.ResponseWriter, r *http.Request)
GetRuleByVersion godoc @Summary Get a rule @Description Get a specific rule by it's ID @Tags Rules @Produce json @Param id path string true "Rule ID" @Security Bearer @Success 200 {object} rule.Rule "rule" @Failure 500 "internal server error" @Router /engine/rules/{id}/versions/{versionid} [get]
func GetRuleSituations ¶
func GetRuleSituations(w http.ResponseWriter, r *http.Request)
GetRuleSituations godoc @Summary Get the list of situatons associated to a rule @Description Get the list of situatons associated to a rule @Tags Rules @Produce json @Param id path string true "Rule ID" @Security Bearer @Success 200 "list of situations" @Failure 400 "Status Bad Request" @Failure 401 "Status Unauthorized" @Router /engine/rules/{id}/situations [get]
func GetRules ¶
func GetRules(w http.ResponseWriter, r *http.Request)
GetRules godoc @Summary Get all rules @Description Get all rules from rules repository @Tags Rules @Produce json @Security Bearer @Success 200 {array} rule.Rule "list of rules" @Failure 500 "internal server error" @Router /engine/rules [get]
func GetSituation ¶
func GetSituation(w http.ResponseWriter, r *http.Request)
GetSituation godoc @Summary Get a situation definition @Description Get a situation definition @Tags Situations @Produce json @Param id path string true "Situation ID" @Security Bearer @Success 200 {object} situation.Situation "situation" @Failure 400 "Status Bad Request" @Router /engine/situations/{id} [get]
func GetSituationEvaluation ¶
func GetSituationEvaluation(w http.ResponseWriter, r *http.Request)
GetSituationEvaluation godoc @Summary Get the last evaluation of a situation @Description Get the last evaluation of a situation @Tags Situations @Produce json @Param id path string true "Situation ID" @Param instanceid path string true "Situation Template Instance ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/situations/{id}/evaluation/{instanceid} [get]
func GetSituationFacts ¶
func GetSituationFacts(w http.ResponseWriter, r *http.Request)
GetSituationFacts godoc @Summary Get the list of facts for the evaluation of a situation @Description Get the list of facts for the evaluation of a situation @Tags Situations @Produce json @Param id path string true "Situation ID" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 401 "Status Unauthorized" @Router /engine/situations/{id}/facts [get]
func GetSituationRules ¶
func GetSituationRules(w http.ResponseWriter, r *http.Request)
GetSituationRules godoc @Summary Get the list of rules for the evaluation of a situation @Description Get the list of rules for the evaluation of a situation @Tags Situations @Produce json @Param id path string true "Situation ID" @Security Bearer @Success 200 {array} rule.Rule @Failure 400 "Status Bad Request" @Failure 401 "Status Unauthorized" @Router /engine/situations/{id}/rules [get]
func GetSituationTemplateInstances ¶
func GetSituationTemplateInstances(w http.ResponseWriter, r *http.Request)
GetSituationTemplateInstances godoc @Summary Get the list of situation template instances @Description Get the list of situation template instances @Tags Situations @Produce json @Param id path string true "Situation ID" @Security Bearer @Success 200 {array} situation.TemplateInstance @Failure 400 "Status Bad Request" @Failure 401 "Status Unauthorized" @Router /engine/situations/{id}/instances [get]
func GetSituationTemplateInstancesUnprotected ¶ added in v5.3.6
func GetSituationTemplateInstancesUnprotected(w http.ResponseWriter, r *http.Request)
GetSituationTemplateInstancesUnprotected godoc @Summary Get the list of situation template instances @Description Get the list of situation template instances @Tags Situations @Produce json @Param id path string true "Situation ID" @Security Bearer @Success 200 {array} situation.TemplateInstance @Failure 400 "Status Bad Request" @Failure 401 "Status Unauthorized" @Router /engine/situations/{id}/instances/unprotected [get]
func GetSituations ¶
func GetSituations(w http.ResponseWriter, r *http.Request)
GetSituations godoc @Summary Get all situation definitions @Description Get all situation definitions @Tags Situations @Produce json @Security Bearer @Success 200 {array} situation.Situation "list of situations" @Failure 500 "internal server error" @Router /engine/situations [get]
func GetUser ¶
func GetUser(w http.ResponseWriter, r *http.Request)
GetUser godoc @Summary Get an user user @Description Gets an user user with the specified id @Tags Users @Produce json @Param id path string true "user ID" @Security Bearer @Success 200 {object} users.User "user" @Failure 400 {string} string "Bad Request" @Failure 404 {string} string "Not Found" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/users/{id} [get]
func GetUserFromContext ¶
func GetUserFromContext(r *http.Request) (users.UserWithPermissions, bool)
GetUserFromContext extract the logged user from the request context
func GetUserSelf ¶
func GetUserSelf(w http.ResponseWriter, r *http.Request)
GetUserSelf godoc @Summary Get an user @Description Gets un user with the specified id. @Tags Users @Produce json @Security Bearer @Success 200 {string} string "status OK" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /engine/security/myself [get]
func GetUsers ¶
func GetUsers(w http.ResponseWriter, r *http.Request)
GetUsers godoc @Summary Get all user users @Description Gets a list of all user users. @Tags Users @Produce json @Security Bearer @Success 200 {array} users.User "list of users" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/users [get]
func GetVariableConfig ¶ added in v5.3.5
func GetVariableConfig(w http.ResponseWriter, r *http.Request)
GetVariableConfig godoc @Summary Get an Variable Config definition @Description Get an Variable Config definition @Tags VariablesConfig @Produce json @Param id path string true "Variable Config ID" @Security Bearer @Success 200 {object} models.VariablesConfig "One Variable Config getted by id" @Failure 400 "Status Bad Request" @Router /engine/variablesconfig/{id} [get]
func GetVariableConfigByKey ¶ added in v5.3.5
func GetVariableConfigByKey(w http.ResponseWriter, r *http.Request)
GetVariableConfigByKey godoc @Summary Get an Variable Config definition @Description Get an Variable Config definition @Tags VariablesConfig @Produce json @Param key path string true "Variable Config key" @Security Bearer @Success 200 {object} models.VariablesConfig " One Variable Config getted by key" @Failure 400 "Status Bad Request" @Router /engine/variablesconfig/key/{key} [get]
func GetVariablesConfig ¶ added in v5.3.5
func GetVariablesConfig(w http.ResponseWriter, r *http.Request)
GetVariablesConfig godoc @Summary Get all Variables Config definitions @Description Get all VariableConfig definitions @Tags VariablesConfig @Produce json @Security Bearer @Success 200 {array} models.VariablesConfig "list of all Variables with it's config" @Failure 500 "internal server error" @Router /engine/variablesconfig [get]
func GetlastConnectorExecutionDateTime ¶
func GetlastConnectorExecutionDateTime(w http.ResponseWriter, r *http.Request)
GetlastConnectorExecutionDateTime godoc @Summary Get the DateTime of the last connections readings @Description Gets the DateTime of the last connections readings. @Tags Admin @Produce json @Param id path string true "Connector ID" @Param successOnly query string false "true to ignore failed connector executions" @Param maxage query string false "maximum age of data (duration)" @Security Bearer @Success 200 {string} string "Status OK" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /engine/connector/{id}/executions/last [get]
func HandleOIDCCallback ¶ added in v5.3.2
func HandleOIDCCallback(w http.ResponseWriter, r *http.Request)
func HandleOIDCRedirect ¶ added in v5.3.2
func HandleOIDCRedirect(w http.ResponseWriter, r *http.Request)
func IsAlive ¶
func IsAlive(w http.ResponseWriter, r *http.Request)
IsAlive godoc @Summary Check if alive @Description allows to check if the API is alive @Tags System @Success 200 "Status OK" @Router /isalive [get]
func IsInCalendarPeriod ¶
func IsInCalendarPeriod(w http.ResponseWriter, r *http.Request)
IsInCalendarPeriod godoc @Summary Determines wether a timestamp is within a valid calendar period @Description Determines wether a timestamp is within a valid calendar period @Tags Calendars @Produce json @Param id path string true "Calendar ID" @Param time query string true "Timestamp to be found within a calendar period" @Security Bearer @Success 200 {object} calendar.InPeriodContains "InPeriodContains" @Failure 400 "Status Bad Request" @Router /engine/calendars/{id}/contains [get]
func LogoutHandler ¶ added in v5.2.6
LogoutHandler godoc @Summary Logout @Description Logs out the current user. @Tags Admin @Produce plain @Security Bearer @Success 200 {string} string "Logged out successfully." @Failure 500 {string} string "Internal Server Error" @Router /engine/logout [post]
func NotImplemented ¶
func NotImplemented(w http.ResponseWriter, r *http.Request)
NotImplemented returns a basic message "Not Implemented" when called, and should be use a filler for future handler
func NotificationsSSERegister ¶
func NotificationsSSERegister(w http.ResponseWriter, r *http.Request)
NotificationsSSERegister godoc @Summary Register a new client to the notifications system using SSE @Description Register a new client to the notifications system using SSE @Tags Notifications @Produce json @Param jwt query string false "Json Web Token" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/notifications/sse [get]
func NotificationsWSRegister ¶
func NotificationsWSRegister(w http.ResponseWriter, r *http.Request)
NotificationsWSRegister godoc @Summary Register a new client to the notifications system using WS @Description Register a new client to the notifications system using WS @Tags Notifications @Produce json @Param jwt query string false "Json Web Token" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/notifications/ws [get]
func ParseDuration ¶
ParseDuration try to parse a string as an int or returns 0
func ParseFactParameters ¶ added in v5.4.3
ParsefactParameters takes a string of encoded parameters and returns a map of these decoded parameters.
func ParseSortBy ¶
func ParseSortBy(rawSortByStr string, allowedFields []string) ([]models.SortOption, error)
ParseSortBy parse multiple <order>(<field>) entries separated by commas from a string
func PostAction ¶
func PostAction(w http.ResponseWriter, r *http.Request)
PostAction godoc @Summary Create a new action definition @Description Create a new action definition @Tags Actions @Accept json @Produce json @Param action body models.Action true "Action definition (json)" @Security Bearer @Success 200 {object} models.Action "action" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/actions [post]
func PostCalendar ¶
func PostCalendar(w http.ResponseWriter, r *http.Request)
PostCalendar godoc @Summary Creates a Calendar @Description Creates a Calendar @Tags Calendars @Accept json @Produce json @Param calendar body interface{} true "Calendar (json)" @Security Bearer @Success 200 {object} calendar.Calendar "calendar" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/calendars [post]
func PostConnectorConfig ¶ added in v5.0.9
func PostConnectorConfig(w http.ResponseWriter, r *http.Request)
PostConnectorConfig godoc @Summary Create a new connectorConfig definition @Description Create a new connectorConfig definition @Tags ConnectorConfigs @Accept json @Produce json @Param connectorConfig body models.ConnectorConfig true "ConnectorConfig definition (json)" @Security Bearer @Success 200 {object} models.ConnectorConfig "connectorConfig" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/connectorconfigs [post]
func PostElasticSearchConfig ¶ added in v5.5.0
func PostElasticSearchConfig(w http.ResponseWriter, r *http.Request)
PostElasticSearchConfig godoc @Summary Create a new elasticSearchConfig definition @Description Create a new elasticSearchConfig definition @Tags ElasticSearchConfigs @Accept json @Produce json @Param elasticSearchConfig body models.ElasticSearchConfig true "ElasticSearchConfig definition (json)" @Security Bearer @Success 200 {object} models.ElasticSearchConfig "elasticSearchConfig" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/esconfigs [post]
func PostExternalConfig ¶
func PostExternalConfig(w http.ResponseWriter, r *http.Request)
PostExternalConfig godoc @Summary Create a new externalConfig definition @Description Create a new externalConfig definition @Tags ExternalConfigs @Accept json @Produce json @Param externalConfig body models.ExternalConfig true "ExternalConfig definition (json)" @Security Bearer @Success 200 {object} models.ExternalConfig "externalConfig" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/externalconfigs [post]
func PostFact ¶
func PostFact(w http.ResponseWriter, r *http.Request)
PostFact godoc @Summary Create a new fact definition @Description Create a new fact definition @Tags Facts @Accept json @Produce json @Param fact body interface{} true "Fact definition (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/facts [post]
func PostIssue ¶
func PostIssue(w http.ResponseWriter, r *http.Request)
PostIssue godoc @Summary Creates an issue @Description Creates an issue @Tags Issues @Accept json @Produce json @Param issue body interface{} true "Issue (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/issues [post]
func PostIssueCloseWithFeedback ¶
func PostIssueCloseWithFeedback(w http.ResponseWriter, r *http.Request)
PostIssueCloseWithFeedback godoc @Summary Send a rootcauses/actions feedback on an issue @Description Post a rootcauses/actions recommendation tree as a feedback on an issue @Tags Issues @Accept json @Produce json @Param id path string true "Issue ID" @Param issue body interface{} true "Recommendation tree (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/issues/{id}/feedback [post]
func PostIssueCloseWithoutFeedback ¶
func PostIssueCloseWithoutFeedback(w http.ResponseWriter, r *http.Request)
PostIssueCloseWithoutFeedback godoc @Summary Close an issue without feedback @Description Close an issue without feedback @Tags Issues @Accept json @Produce json @Param id path string true "Issue ID" @Param reason body interface{} false "Close reason (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/issues/{id}/close [post]
func PostIssueDetectionFeedback ¶
func PostIssueDetectionFeedback(w http.ResponseWriter, r *http.Request)
PostIssueDetectionFeedback godoc @Summary Add a new detection feedback @Description Add a new detection feedback on an issue (or replace an existing one if the user already made a feedback) @Tags Issues @Accept json @Produce json @Param id path string true "Issue ID" @Param reason body interface{} false "Rating" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/issues/{id}/detection/feedback [post]
func PostIssueDraft ¶
func PostIssueDraft(w http.ResponseWriter, r *http.Request)
PostIssueDraft godoc @Summary Send a rootcauses/actions feedback draft on an issue @Description Post a rootcauses/actions recommendation tree as a feedback draft on an issue @Tags Issues @Accept json @Produce json @Param id path string true "Issue ID" @Param issue body models.FrontRecommendation true "Draft Recommendation tree (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/issues/{id}/draft [post]
func PostIssuesCloseWithoutFeedback ¶ added in v5.2.3
func PostIssuesCloseWithoutFeedback(w http.ResponseWriter, r *http.Request)
PostIssuesCloseWithoutFeedback godoc @Summary Close many issues without feedback @Description Close many issues without feedback @Tags Issues @Accept json @Produce json @Param issue body models.IssuesIdsToClose true "Issues IDs" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/issues/close [post]
func PostIssuesDraft ¶ added in v5.2.3
func PostIssuesDraft(w http.ResponseWriter, r *http.Request)
PostIssuesDraft godoc @Summary Send a rootcauses/actions feedback draft on many issues @Description Post a rootcauses/actions recommendation tree as a feedback draft on many issues @Tags Issues @Accept json @Produce json @Param issue body models.IssuesIdsToDraf true "Issues IDs" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/issues/draft [post]
func PostJobSchedule ¶
func PostJobSchedule(w http.ResponseWriter, r *http.Request)
PostJobSchedule godoc @Summary create JobSchedule @Description creates new JobSchedule @Tags Scheduler @Accept json @Produce json @Param job body scheduler.InternalSchedule true "JobSchedule definition (json)" @Security Bearer @Success 200 {object} scheduler.InternalSchedule "schedule" @Failure 400 "Status Bad Request" @Failure 500 "Status Internal Server Error" @Router /engine/scheduler/jobs [post]
func PostModel ¶
func PostModel(w http.ResponseWriter, r *http.Request)
PostModel godoc @Summary Create a new model definition @Description Create a new model definition @Tags Models @Accept json @Produce json @Param model body interface{} true "Model definition (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/models [post]
func PostObjects ¶
func PostObjects(w http.ResponseWriter, r *http.Request)
PostObjects godoc @Summary Receive objects to be evaluated @Description Receive objects to be evaluated @Tags Service @Produce json @Param fact query string true "Fact object name" @Security Bearer @Success 200 "Status OK" @Failure 500 "internal server error" @Router /service/objects [post]
func PostPermission ¶
func PostPermission(w http.ResponseWriter, r *http.Request)
PostPermission godoc @Summary Create a new permission @Description Add an user permission to the user permissions @Tags Permissions @Accept json @Produce json @Param permission body permissions.Permission true "permission (json)" @Security Bearer @Success 200 {object} permissions.Permission "permission" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/permissions [post]
func PostRole ¶
func PostRole(w http.ResponseWriter, r *http.Request)
PostRole godoc @Summary Create a new role @Description Add an user role to the user roles @Tags Roles @Accept json @Produce json @Param role body roles.Role true "role (json)" @Security Bearer @Success 200 {object} roles.Role "role" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/roles [post]
func PostRootCause ¶
func PostRootCause(w http.ResponseWriter, r *http.Request)
PostRootCause godoc @Summary Create a new rootcause definition @Description Create a new rootcause definition @Tags RootCauses @Accept json @Produce json @Param rootcause body models.RootCause true "RootCause definition (json)" @Security Bearer @Success 200 {object} models.RootCause "rootcause" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/rootcauses [post]
func PostRule ¶
func PostRule(w http.ResponseWriter, r *http.Request)
PostRule godoc @Summary create rule @Description creates new rule @Tags Rules @Accept json @Produce json @Param rule body rule.Rule true "Rule definition (json)" @Security Bearer @Success 200 {object} rule.Rule "rule" @Failure 400 "Status Bad Request" @Failure 500 "Status Internal Server Error" @Router /engine/rules [post]
func PostRuleSituations ¶
func PostRuleSituations(w http.ResponseWriter, r *http.Request)
PostRuleSituations godoc @Summary Add the rule at the end of the rules list of each situation @Description Add the rule at the end of the rules list of each situation @Tags Rules @Produce json @Param id path string true "Rule ID" @Param situationIds body []int64 true "Situation association" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 401 "Status Unauthorized" @Router /engine/rules/{id}/situations [post]
func PostSituation ¶
func PostSituation(w http.ResponseWriter, r *http.Request)
PostSituation godoc @Summary Creates a situation definition @Description Creates a situation definition @Tags Situations @Accept json @Produce json @Param factsByName query string false "Find fact by it's name" @Param situation body situation.Situation true "Situation definition (json)" @Security Bearer @Success 200 {object} situation.Situation "situation" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/situations [post]
func PostSituationTemplateInstance ¶
func PostSituationTemplateInstance(w http.ResponseWriter, r *http.Request)
PostSituationTemplateInstance godoc @Summary Creates a situation template instance @Description Creates a situation template instance @Tags Situations @Accept json @Produce json @Param id path string true "Situation ID" @Param templateInstance body situation.TemplateInstance true "Situation template instance (json)" @Security Bearer @Success 200 {object} situation.TemplateInstance "situation template instance" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/situations/{id}/instances [post]
func PostUser ¶
func PostUser(w http.ResponseWriter, r *http.Request)
PostUser godoc @Summary Create a new user @Description Add an user user to the user users @Tags Users @Accept json @Produce json @Param user body users.User true "user (json)" @Security Bearer @Success 200 {object} users.User "user" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/users [post]
func PostVariableConfig ¶ added in v5.3.5
func PostVariableConfig(w http.ResponseWriter, r *http.Request)
PostVariableConfig godoc @Summary Create a new VariableConfig definition @Description Create a new VariableConfig definition @Tags VariablesConfig @Accept json @Produce json @Param VariableConfig body models.VariablesConfig true "VariableConfig definition (json)" @Security Bearer @Success 200 {object} models.VariablesConfig "Ppost VariableConfig" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/variablesconfig [post]
func PutAction ¶
func PutAction(w http.ResponseWriter, r *http.Request)
PutAction godoc @Summary Create or remplace a action definition @Description Create or remplace a action definition @Tags Actions @Accept json @Produce json @Param id path string true "Action ID" @Param action body models.Action true "Action definition (json)" @Security Bearer @Success 200 {object} models.Action "action" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/actions/{id} [put]
func PutCalendar ¶
func PutCalendar(w http.ResponseWriter, r *http.Request)
PutCalendar godoc @Summary Update a calendar @Description Updates the calendar @Tags Calendars @Accept json @Produce json @Param id path string true "Calendar ID" @Param user body interface{} true "calendar (json)" @Security Bearer @Success 200 {object} calendar.Calendar "calendar" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /engine/calendars/{id} [put]
func PutConnectorConfig ¶ added in v5.0.9
func PutConnectorConfig(w http.ResponseWriter, r *http.Request)
PutConnectorConfig godoc @Summary Create or remplace an connectorConfig definition @Description Create or remplace an connectorConfig definition @Tags ConnectorConfigs @Accept json @Produce json @Param name path string true "ConnectorConfig ID" @Param connectorConfig body models.ConnectorConfig true "ConnectorConfig definition (json)" @Security Bearer @Success 200 {object} models.ConnectorConfig "connectorConfig" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/connectorconfigs/{name} [put]
func PutElasticSearchConfig ¶ added in v5.5.0
func PutElasticSearchConfig(w http.ResponseWriter, r *http.Request)
PutElasticSearchConfig godoc @Summary Create or remplace an elasticSearchConfig definition @Description Create or remplace an elasticSearchConfig definition @Tags ElasticSearchConfigs @Accept json @Produce json @Param id path string true "ElasticSearchConfig ID" @Param elasticSearchConfig body models.ElasticSearchConfig true "ElasticSearchConfig definition (json)" @Security Bearer @Success 200 {object} models.ElasticSearchConfig "elasticSearchConfig" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/esconfigs/{id} [put]
func PutExternalConfig ¶
func PutExternalConfig(w http.ResponseWriter, r *http.Request)
PutExternalConfig godoc @Summary Create or remplace an externalConfig definition @Description Create or remplace an externalConfig definition @Tags ExternalConfigs @Accept json @Produce json @Param name path string true "ExternalConfig ID" @Param externalConfig body models.ExternalConfig true "ExternalConfig definition (json)" @Security Bearer @Success 200 {object} models.ExternalConfig "externalConfig" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/externalconfigs/{name} [put]
func PutFact ¶
func PutFact(w http.ResponseWriter, r *http.Request)
PutFact godoc @Summary Create or remplace a fact definition @Description Create or remplace a fact definition @Tags Facts @Accept json @Produce json @Param id path string true "Fact ID" @Param fact body interface{} true "Fact definition (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/facts/{id} [put]
func PutJobSchedule ¶
func PutJobSchedule(w http.ResponseWriter, r *http.Request)
PutJobSchedule godoc @Summary Create or remplace a JobSchedule @Description Create or remplace a JobSchedule @Tags Scheduler @Accept json @Produce json @Param id path string true "JobSchedule ID" @Param rule body interface{} true "JobSchedule (json)" @Security Bearer @Success 200 {object} scheduler.InternalSchedule "schedule" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/scheduler/jobs/{id} [put]
func PutModel ¶
func PutModel(w http.ResponseWriter, r *http.Request)
PutModel godoc @Summary Create or remplace a model definition @Description Create or remplace a model definition @Tags Models @Accept json @Produce json @Param id path string true "Model ID" @Param model body interface{} true "Model definition (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/models/{id} [put]
func PutPermission ¶
func PutPermission(w http.ResponseWriter, r *http.Request)
PutPermission godoc @Summary Update permission @Description Updates the user permission information concerning the user permission with id @Tags Permissions @Accept json @Produce json @Param id path string true "permission ID" @Param permission body permissions.Permission true "permission (json)" @Security Bearer @Success 200 {object} permissions.Permission "permission" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/permissions/{id} [put]
func PutRole ¶
func PutRole(w http.ResponseWriter, r *http.Request)
PutRole godoc @Summary Update role @Description Updates the user role information concerning the user role with id @Tags Roles @Accept json @Produce json @Param id path string true "role ID" @Param role body roles.Role true "role (json)" @Security Bearer @Success 200 {object} roles.Role "role" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/roles/{id} [put]
func PutRootCause ¶
func PutRootCause(w http.ResponseWriter, r *http.Request)
PutRootCause godoc @Summary Create or remplace a rootcause definition @Description Create or remplace a rootcause definition @Tags RootCauses @Accept json @Produce json @Param id path string true "RootCause ID" @Param rootcause body models.RootCause true "RootCause definition (json)" @Security Bearer @Success 200 {object} models.RootCause "rootcause" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/rootcauses/{id} [put]
func PutRule ¶
func PutRule(w http.ResponseWriter, r *http.Request)
PutRule godoc @Summary Create or remplace a rule definition @Description Create or remplace a rule definition @Tags Rules @Accept json @Produce json @Param id path string true "Rule ID" @Param rule body rule.Rule true "Rule definition (json)" @Security Bearer @Success 200 {object} rule.Rule "rule" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/rules/{id} [put]
func PutSituation ¶
func PutSituation(w http.ResponseWriter, r *http.Request)
PutSituation godoc @Summary replace a situation definition @Description replace a situation definition @Tags Situations @Accept json @Produce json @Param id path string true "Situation ID" @Param situation body situation.Situation true "Situation definition (json)" @Security Bearer @Success 200 {object} situation.Situation "situation" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/situations/{id} [put]
func PutSituationTemplateInstance ¶
func PutSituationTemplateInstance(w http.ResponseWriter, r *http.Request)
PutSituationTemplateInstance godoc @Summary replace a situation template instance @Description replace a situation template instance @Tags Situations @Accept json @Produce json @Param id path string true "Situation ID" @Param instanceid path string true "Situation Template Instance ID" @Param templateInstance body situation.TemplateInstance true "Situation template instance (json)" @Security Bearer @Success 200 {object} situation.TemplateInstance "situation template instance" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/situations/{id}/instances/{instanceid} [put]
func PutSituationTemplateInstances ¶
func PutSituationTemplateInstances(w http.ResponseWriter, r *http.Request)
PutSituationTemplateInstances godoc @Summary set the template instances of the situation @Description set the template instances of the situation @Tags Situations @Accept json @Produce json @Param id path string true "Situation ID" @Param templateInstances body []situation.TemplateInstance true "Situation template instance list (json array)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/situations/{id}/instances [put]
func PutUser ¶
func PutUser(w http.ResponseWriter, r *http.Request)
PutUser godoc @Summary Update user @Description Updates the user user information concerning the user user with id @Tags Users @Accept json @Produce json @Param id path string true "user ID" @Param user body users.User true "user (json)" @Security Bearer @Success 200 {object} users.User "user" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/users/{id} [put]
func PutVariableConfig ¶ added in v5.3.5
func PutVariableConfig(w http.ResponseWriter, r *http.Request)
PutVariableConfig godoc @Summary update an Variable Config definition @Description update an Variable Config definition @Tags VariablesConfig @Accept json @Produce json @Param id path string true "VariableConfig ID" @Param VariableConfig body models.VariablesConfig true "VariableConfig definition (json)" @Security Bearer @Success 200 {object} models.VariablesConfig "VariableConfig" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/variablesconfig/{id} [put]
func QueryParamToOptionalBool ¶ added in v5.2.2
func QueryParamToOptionalDuration ¶ added in v5.2.2
func QueryParamToOptionalInt ¶ added in v5.2.2
QueryParamToOptionalInt parse a string from a string
func QueryParamToOptionalInt64 ¶ added in v5.2.2
QueryParamToOptionalInt64 parse an int64 from a string
func QueryParamToOptionalInt64Array ¶ added in v5.2.7
func QueryParamToOptionalInt64Array(r *http.Request, name, separator string, allowDuplicates bool, orDefault []int64) ([]int64, error)
QueryParamToOptionalInt64Array parse multiple int64 entries separated by a separator from a string
func QueryParamToOptionalKeyValues ¶ added in v5.2.2
func QueryParamToOptionalKeyValues(r *http.Request, name string, orDefault map[string]string) (map[string]string, error)
QueryParamToOptionalKeyValues parse multiple key:value entries separated by commas from a string
func QueryParamToOptionalStringArray ¶ added in v5.2.2
func QueryParamToOptionalTime ¶ added in v5.2.2
func SearchLast ¶
func SearchLast(w http.ResponseWriter, r *http.Request)
Search godoc @Summary query situation history data @Description query situation history data @Tags Search @Accept json @Produce json @Param situationid query int false "situationid" @Param situationinstanceid query int false "situationinstanceid" @Param maxdate query string false "time.Time" @Param mindate query string false "time.Time" @Security Bearer @Success 200 {array} search.QueryResult "query result" @Failure 500 "internal server error" @Router /engine/search/last [get]
func SearchLastByCustomInterval ¶
func SearchLastByCustomInterval(w http.ResponseWriter, r *http.Request)
SearchLastByCustomInterval godoc @Summary query situation history data @Description query situation history data @Tags Search @Accept json @Produce json @Param situationid query int false "situationid" @Param situationinstanceid query int false "situationinstanceid" @Param maxdate query string false "time.Time" @Param mindate query string false "time.Time" @Param referencedate query string true "time.Time" @Param interval query string true "time.Duration" @Security Bearer @Success 200 {array} search.QueryResult "query result" @Failure 500 "internal server error" @Router /engine/search/last/bycustominterval [get]
func SearchLastByInterval ¶
func SearchLastByInterval(w http.ResponseWriter, r *http.Request)
SearchLastByInterval godoc @Summary query situation history data @Description query situation history data @Tags Search @Accept json @Produce json @Param situationid query int false "situationid" @Param situationinstanceid query int false "situationinstanceid" @Param maxdate query string false "time.Time" @Param mindate query string false "time.Time" @Param interval query string true "year | quarter | month | week | day | hour | minute" @Security Bearer @Success 200 {array} search.QueryResult "query result" @Failure 500 "internal server error" @Router /engine/search/last/byinterval [get]
func SetRolePermissions ¶
func SetRolePermissions(w http.ResponseWriter, r *http.Request)
SetRolePermissions godoc @Summary Set permissions on a role @Description Set permissions on a role @Tags Roles @Accept json @Produce json @Param id path string true "role ID" @Param role body []string true "List of permissions UUIDs" @Security Bearer @Success 200 {object} roles.Role "role" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/roles/{id}/permissions [put]
func SetSituationRules ¶
func SetSituationRules(w http.ResponseWriter, r *http.Request)
SetSituationRules godoc @Summary Set the list of rules for the evaluation of a situation @Description Set the list of rules for the evaluation of a situation @Tags Situations @Param id path string true "Situation ID" @Param ruleIds body []int64 true "Situation Rules" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 401 "Status Unauthorized" @Router /engine/situations/{id}/rules [put]
func SetUserRoles ¶
func SetUserRoles(w http.ResponseWriter, r *http.Request)
SetUserRoles godoc @Summary Set roles on a user @Description Set roles on a user @Tags Users @Accept json @Produce json @Param id path string true "user ID" @Param user body []string true "List of roles UUIDs" @Security Bearer @Success 200 {object} users.User "user" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/users/{id}/roles [put]
func StartScheduler ¶
func StartScheduler(w http.ResponseWriter, r *http.Request)
StartScheduler godoc @Summary Start the scheduler @Description Start the fact scheduler @Tags Scheduler @Success 200 "Status OK" @Security Bearer @Router /engine/scheduler/start [POST]
func TestRule ¶
func TestRule(w http.ResponseWriter, r *http.Request)
TODO: Add handler annotation on TestRuleHandler
func TriggerJobSchedule ¶
func TriggerJobSchedule(w http.ResponseWriter, r *http.Request)
TriggerJobSchedule godoc @Summary Force facts calculation pipeline @Description <b>Force facts calculation pipeline</b> @Description Example : @Description <pre>{"jobtype":"fact","job":{"facts_ids":["fact_1","fact_2"]}} @Description {"jobtype":"baseline","job":{"baselines":{"3":["by_day","by_day_week"]}}}</pre> @Tags Scheduler @Produce json @Param job body scheduler.InternalSchedule true "JobSchedule definition (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /engine/scheduler/trigger [post]
func TriggerNotification ¶
func TriggerNotification(w http.ResponseWriter, r *http.Request)
TriggerNotification godoc @Summary Send a notification @Description Generate a new NotifyTask with a default message for testing @Tags Notifications @Accept json @Param key query string true "Notifier cache key" @Param notification body interface{} true "Notify task definition (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/notifications/trigger [post]
func UpdateIssueComment ¶
func UpdateIssueComment(w http.ResponseWriter, r *http.Request)
UpdateIssueComment godoc @Summary Update an issue comment @Description Update an issue comment @Tags Issues @Accept json @Produce json @Param id path string true "Issue ID" @Param reason body interface{} false "Comment to update" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/issues/{id}/comment [put]
func UpdateRead ¶
func UpdateRead(w http.ResponseWriter, r *http.Request)
UpdateRead godoc @Summary Update the "read" status of the notification @Description Mark a notification as "read" @Tags Notifications @Produce json @Param id path int false "notification ID" @Param status query boolean false "notification's read property given value" @Security Bearer @Success 200 "Status OK" @Failure 500 "internal server error" @Failure 400 "Status bad request" @Router /engine/notifications/{id}/read [put]
func ValidateAction ¶
func ValidateAction(w http.ResponseWriter, r *http.Request)
ValidateAction godoc @Summary Validate a new action definition @Description Validate a new action definition @Tags Actions @Accept json @Produce json @Param action body models.Action true "Action definition (json)" @Security Bearer @Success 200 {object} models.Action "action" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/actions/validate [post]
func ValidateFact ¶
func ValidateFact(w http.ResponseWriter, r *http.Request)
ValidateFact godoc @Summary Validate a new fact definition @Description Validate a new fact definition @Tags Facts @Accept json @Produce json @Param fact body interface{} true "Fact definition (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/facts/validate [post]
func ValidateJobSchedule ¶
func ValidateJobSchedule(w http.ResponseWriter, r *http.Request)
ValidateJobSchedule godoc @Summary validate a new JobSchedule definition @Description validate a new JobSchedule definition @Tags Scheduler @Accept json @Produce json @Param job body scheduler.InternalSchedule true "JobSchedule definition (json)" @Security Bearer @Success 200 {object} scheduler.InternalSchedule "schedule" @Failure 400 "Status Bad Request" @Router /engine/scheduler/jobs/validate [post]
func ValidateModel ¶
func ValidateModel(w http.ResponseWriter, r *http.Request)
ValidateModel godoc @Summary Validate a new model definition @Description Validate a new model definition @Tags Models @Accept json @Produce json @Param model body interface{} true "Model definition (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/models/validate [post]
func ValidatePermission ¶
func ValidatePermission(w http.ResponseWriter, r *http.Request)
ValidatePermission godoc @Summary Validate a new permission definition @Description Validate a new permission definition @Tags Permissions @Accept json @Produce json @Param permission body permissions.Permission true "permission (json)" @Security Bearer @Success 200 {object} permissions.Permission "permission" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/permissions/validate [post]
func ValidateRole ¶
func ValidateRole(w http.ResponseWriter, r *http.Request)
ValidateRole godoc @Summary Validate a new role definition @Description Validate a new role definition @Tags Roles @Accept json @Produce json @Param role body roles.Role true "role (json)" @Security Bearer @Success 200 {object} roles.Role "role" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/roles/validate [post]
func ValidateRootCause ¶
func ValidateRootCause(w http.ResponseWriter, r *http.Request)
ValidateRootCause godoc @Summary Validate a new rootcause definition @Description Validate a new rootcause definition @Tags RootCauses @Accept json @Produce json @Param rootcause body models.RootCause true "RootCause definition (json)" @Security Bearer @Success 200 {object} models.RootCause "rootcause" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/rootcauses/validate [post]
func ValidateRule ¶
func ValidateRule(w http.ResponseWriter, r *http.Request)
ValidateRule godoc @Summary validate a new rule definition @Description validate a new rule definition @Tags Rules @Accept json @Produce json @Param rule body rule.Rule true "Rule definition (json)" @Security Bearer @Success 200 {object} rule.Rule "rule" @Failure 400 "Status Bad Request" @Failure 500 "Status Internal Server Error" @Router /engine/rules/validate [post]
func ValidateSituation ¶
func ValidateSituation(w http.ResponseWriter, r *http.Request)
ValidateSituation godoc @Summary Validate a new situation definition @Description Validate a new situation definition @Tags Situations @Accept json @Produce json @Param situation body situation.Situation true "Situation definition (json)" @Security Bearer @Success 200 {object} situation.Situation "situation" @Failure 400 "Status Bad Request" @Failure 500 "Status" internal server error" @Router /engine/situations/validate [post]
func ValidateUser ¶
func ValidateUser(w http.ResponseWriter, r *http.Request)
ValidateUser godoc @Summary Validate a new user definition @Description Validate a new user definition @Tags Users @Accept json @Produce json @Param user body users.User true "user (json)" @Security Bearer @Success 200 {object} users.User "user" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/users/validate [post]
Types ¶
type CustomExportRequest ¶ added in v5.5.0
type CustomExportRequest struct { export.CSVParameters Title string `json:"title"` Indices string `json:"indices"` SearchRequest search.Request `json:"searchRequest"` ElasticName string `json:"elasticName"` AllowNoIndices string `json:"allowNoIndices"` }
CustomExportRequest represents a request for an custom export
type ExportHandler ¶ added in v5.3.6
type ExportHandler struct {
// contains filtered or unexported fields
}
func NewExportHandler ¶ added in v5.3.6
func NewExportHandler(exportWrapper *export.Wrapper, directDownload bool, indirectDownloadUrl string) *ExportHandler
NewExportHandler returns a new ExportHandler
func (*ExportHandler) DeleteExport ¶ added in v5.3.6
func (e *ExportHandler) DeleteExport(w http.ResponseWriter, r *http.Request)
DeleteExport godoc @Summary Deletes a single export @Description Deletes a single export, when running it is canceled @Tags Exports @Produce json @Security Bearer @Success 202 "Status Accepted: export found & cancellation request has been taken into account & will be processed" @Success 204 "Status OK: export was found and deleted" @Failure 400 "Bad Request: missing export id" @Failure 403 "Status Forbidden: missing permission" @Failure 404 "Status Not Found: export not found" @Failure 500 "internal server error" @Router /engine/exports/{id} [delete]
func (*ExportHandler) DownloadExport ¶ added in v5.3.6
func (e *ExportHandler) DownloadExport(w http.ResponseWriter, r *http.Request)
DownloadExport godoc @Summary Download export @Description Download export @Tags Exports @Produce json @Security Bearer @Success 200 {file} Returns data to be saved into a file @Success 308 Redirects to the export file location @Failure 400 "Bad Request: missing export id" @Failure 403 "Status Forbidden: missing permission" @Failure 404 "Status Not Found: export not found" @Failure 500 "internal server error" @Router /engine/exports/{id}/download [get]
func (*ExportHandler) ExportCustom ¶ added in v5.5.0
func (e *ExportHandler) ExportCustom(w http.ResponseWriter, r *http.Request)
ExportCustom godoc @Summary Creates a new custom export request @Description Creates a new custom export request @Tags Exports @Produce json @Security Bearer @Param request body handlers.ExportRequest true "request (json)" @Success 200 {object} export.WrapperItem "Status OK: user was added to existing export in queue" @Success 201 {object} export.WrapperItem "Status Created: new export was added in queue" @Failure 400 "Bad Request: missing fact id / fact id is not an integer" @Failure 403 "Status Forbidden: missing permission" @Failure 409 {object} export.WrapperItem "Status Conflict: user already exists in export queue" @Failure 429 "Status Too Many Requests: export queue is full" @Failure 500 "internal server error" @Router /engine/exports/custom [post]
func (*ExportHandler) ExportFact ¶ added in v5.3.6
func (e *ExportHandler) ExportFact(w http.ResponseWriter, r *http.Request)
ExportFact godoc @Summary Creates a new export request for a fact (or multiple facts) @Description Creates a new export request for a fact (or multiple facts) @Tags Exports @Produce json @Security Bearer @Param request body handlers.ExportRequest true "request (json)" @Success 200 {object} export.WrapperItem "Status OK: user was added to existing export in queue" @Success 201 {object} export.WrapperItem "Status Created: new export was added in queue" @Failure 400 "Bad Request: missing fact id / fact id is not an integer" @Failure 403 "Status Forbidden: missing permission" @Failure 409 {object} export.WrapperItem "Status Conflict: user already exists in export queue" @Failure 429 "Status Too Many Requests: export queue is full" @Failure 500 "internal server error" @Router /engine/exports/fact [post]
func (*ExportHandler) GetExport ¶ added in v5.3.6
func (e *ExportHandler) GetExport(w http.ResponseWriter, r *http.Request)
GetExport godoc @Summary Get single export from user @Description Get single export from user @Tags Exports @Produce json @Security Bearer @Success 200 {object} export.WrapperItem "Status OK" @Failure 400 "Bad Request: missing export id" @Failure 403 "Status Forbidden: missing permission" @Failure 404 "Status Not Found: export not found" @Failure 500 "internal server error" @Router /engine/exports/{id} [get]
func (*ExportHandler) GetExports ¶ added in v5.3.6
func (e *ExportHandler) GetExports(w http.ResponseWriter, r *http.Request)
GetExports godoc @Summary Get user exports @Description Get in memory user exports @Produce json @Security Bearer @Success 200 {array} export.WrapperItem "Returns a list of exports" @Failure 403 "Status Forbidden: missing permission" @Failure 500 "internal server error" @Router /engine/exports [get]
type ExportRequest ¶ added in v5.3.6
type ExportRequest struct { export.CSVParameters FactIDs []int64 `json:"factIDs"` Title string `json:"title"` }
ExportRequest represents a request for an export
type ProcessorHandler ¶ added in v5.2.8
type ProcessorHandler struct {
// contains filtered or unexported fields
}
ProcessorHandler is a basic struct allowing to set up a single aggregateIngester instance for all handlers
func NewProcessorHandler ¶ added in v5.2.8
func NewProcessorHandler() *ProcessorHandler
NewProcessorHandler returns a pointer to an ProcessorHandler instance
func (*ProcessorHandler) PostAggregates ¶ added in v5.2.8
func (handler *ProcessorHandler) PostAggregates(w http.ResponseWriter, r *http.Request)
PostAggregates godoc @Summary Receive ingester to be evaluated @Description Receive ingester to be evaluated @Tags Service @Consume json @Produce json @Param query body []scheduler.ExternalAggregate true "query (json)" @Security Bearer @Success 200 "Status OK" @Failure 429 "Processing queue is full please retry later" @Failure 500 "internal server error" @Router /service/aggregates [post]
type ServiceHandler ¶ added in v5.4.0
func NewServiceHandler ¶ added in v5.4.0
func NewServiceHandler(manager *service.Manager) *ServiceHandler
func (*ServiceHandler) GetServices ¶ added in v5.4.0
func (sh *ServiceHandler) GetServices(w http.ResponseWriter, r *http.Request)
GetServices godoc @Summary Get all services @Description Get all services @Tags Services @Produce json @Security Bearer @Success 200 {array} service.Definition @Failure 401 "missing permission" @Failure 500 "internal server error" @Router /engine/services [get]
func (*ServiceHandler) GetStatus ¶ added in v5.4.0
func (sh *ServiceHandler) GetStatus(w http.ResponseWriter, r *http.Request)
GetStatus godoc @Summary GetStatus of a service @Description GetStatus of a service @Tags Service @Produce json @Param id query string false "Component to get status from" @Success 200 {object} service.Status @Failure 401 "missing permission" @Failure 500 "internal server error" @Router /engine/services/{id}/status [get]
func (*ServiceHandler) Reload ¶ added in v5.4.0
func (sh *ServiceHandler) Reload(w http.ResponseWriter, r *http.Request)
Reload godoc @Summary Reload the service @Description Reload the service @Tags Service @Produce json @Param id query string false "Service to reload" @Param component query string false "Component to reload" @Success 200 "component reloaded" @Failure 401 "missing permission" @Failure 429 "too recently" @Failure 500 "internal server error" @Router /engine/services/{id}/reload/{component} [post]
func (*ServiceHandler) Restart ¶ added in v5.4.0
func (sh *ServiceHandler) Restart(w http.ResponseWriter, r *http.Request)
Restart godoc @Summary Restart the service @Description Restart the service @Tags Service @Produce json @Param id query string false "Service to restart" @Success 200 "service was restarted successfully" @Failure 401 "missing permission" @Failure 429 "too recently" @Failure 500 "internal server error" @Router /engine/services/{id}/restart [post]
Source Files ¶
- actions_handlers.go
- calendar_handlers.go
- connections_handler.go
- connectorconfig_handlers.go
- coordinator_handlers.go
- esconfig_handlers.go
- export_handlers.go
- externalconfig_handlers.go
- facts_handlers.go
- handlers.go
- history_handlers.go
- issues_handlers.go
- logout_handlers.go
- model_handlers.go
- notification_handlers.go
- notifier_handlers.go
- oidc_handlers.go
- permissions_handlers.go
- processor_handlers.go
- roles_handlers.go
- roles_linked_handlers.go
- rootcauses_handlers.go
- rules_debug_handlers.go
- rules_handlers.go
- rules_linked_handlers.go
- scheduler_handlers.go
- search_handlers.go
- service_handlers.go
- situations_handlers.go
- situations_linked_handlers.go
- users_handlers.go
- utils.go
- variablesconfig_handlers.go