Documentation ¶
Index ¶
- func DeleteAction(w http.ResponseWriter, r *http.Request)
- func DeleteCalendar(w http.ResponseWriter, r *http.Request)
- func DeleteExternalConfig(w http.ResponseWriter, r *http.Request)
- func DeleteFact(w http.ResponseWriter, r *http.Request)
- func DeleteGroup(w http.ResponseWriter, r *http.Request)
- func DeleteJobSchedule(w http.ResponseWriter, r *http.Request)
- func DeleteMembership(w http.ResponseWriter, r *http.Request)
- func DeleteModel(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 ExecuteFact(w http.ResponseWriter, r *http.Request)
- func ExecuteFactFromSource(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 GetAlias(w http.ResponseWriter, r *http.Request)
- func GetAllCron(w http.ResponseWriter, r *http.Request)
- func GetCalendar(w http.ResponseWriter, r *http.Request)
- func GetCalendars(w http.ResponseWriter, r *http.Request)
- func GetCron(w http.ResponseWriter, r *http.Request)
- func GetExternalConfig(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 GetFacts(w http.ResponseWriter, r *http.Request)
- func GetGroup(w http.ResponseWriter, r *http.Request)
- func GetGroups(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 GetIssues(w http.ResponseWriter, r *http.Request)
- func GetIssuesByStatesByPage(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 GetResolvedCalendar(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 GetSituations(w http.ResponseWriter, r *http.Request)
- func GetUser(w http.ResponseWriter, r *http.Request)
- func GetUserFromContext(r *http.Request) *groups.UserWithGroups
- func GetUserGroupsFromContext(r *http.Request) []int64
- func GetUserGroupsFromUser(user *groups.UserWithGroups) []int64
- func GetUserSelf(w http.ResponseWriter, r *http.Request)
- func GetUsers(w http.ResponseWriter, r *http.Request)
- func GetUsersOfGroup(w http.ResponseWriter, r *http.Request)
- func GetlastConnectorExecutionDateTime(w http.ResponseWriter, r *http.Request)
- func IsAlive(w http.ResponseWriter, r *http.Request)
- func IsInCalendarPeriod(w http.ResponseWriter, r *http.Request)
- 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 ParseInt(tStr string) (int, error)
- func ParsePlaceholders(pStr string) (map[string]string, 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 PostAggregates(w http.ResponseWriter, r *http.Request)
- func PostCalendar(w http.ResponseWriter, r *http.Request)
- func PostExternalConfig(w http.ResponseWriter, r *http.Request)
- func PostFact(w http.ResponseWriter, r *http.Request)
- func PostGroup(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 PostJobSchedule(w http.ResponseWriter, r *http.Request)
- func PostModel(w http.ResponseWriter, r *http.Request)
- func PostObjects(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 PutAction(w http.ResponseWriter, r *http.Request)
- func PutCalendar(w http.ResponseWriter, r *http.Request)
- func PutExternalConfig(w http.ResponseWriter, r *http.Request)
- func PutFact(w http.ResponseWriter, r *http.Request)
- func PutGroup(w http.ResponseWriter, r *http.Request)
- func PutJobSchedule(w http.ResponseWriter, r *http.Request)
- func PutMembership(w http.ResponseWriter, r *http.Request)
- func PutModel(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 ReceiveAggregates(aggregates []ExternalAggregate) error
- func Search(w http.ResponseWriter, r *http.Request)
- func SetSituationRules(w http.ResponseWriter, r *http.Request)
- func StartAllCron(w http.ResponseWriter, r *http.Request)
- func StartCron(w http.ResponseWriter, r *http.Request)
- func StartScheduler(w http.ResponseWriter, r *http.Request)
- func StopAllCron(w http.ResponseWriter, r *http.Request)
- func StopCron(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 ValidateGroup(w http.ResponseWriter, r *http.Request)
- func ValidateJobSchedule(w http.ResponseWriter, r *http.Request)
- func ValidateModel(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 ExternalAggregate
Constants ¶
This section is empty.
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 DeleteExternalConfig ¶ added in v4.1.7
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 DeleteGroup ¶
func DeleteGroup(w http.ResponseWriter, r *http.Request)
DeleteGroup godoc @Summary Delete group @Description Deletes an user group @Tags Groups @Produce json @Param id path string true "group 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/groups/{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 DeleteMembership ¶
func DeleteMembership(w http.ResponseWriter, r *http.Request)
DeleteMembership godoc @Summary Delete membership @Description Deletes an user membership from the repository. @Tags Group Memberships @Produce json @Param groupid path string true "user group ID" @Param userid 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/groups/{groupid}/users/{userid} [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 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 an user @Description Deletes an user from the users. @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 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 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}/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 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 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 GetAlias ¶
func GetAlias(w http.ResponseWriter, r *http.Request)
GetAlias godoc @Title GetAlias @Description returns an alias based on an instance, a document type and a depth @tags Alias @Resource /coordinator @Router /coordinator/alias [post] @Accept json @Success 200 "OK" @Failure 400 "Bad Request" @Failure 500 "Internal Server Error"
func GetAllCron ¶
func GetAllCron(w http.ResponseWriter, r *http.Request)
GetAllCron godoc @Title GetAllCron @Description returns an overview of every defined crons @tags Cron @Resource /coordinator @Router /coordinator/crons [get] @Accept json @Success 200 "OK" @Failure 400 "Bad Request" @Failure 500 "Internal Server Error"
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 GetCron ¶
func GetCron(w http.ResponseWriter, r *http.Request)
GetCron godoc @Title GetCron @Description returns an overview of a single cron @tags Cron @Resource /coordinator @Router /coordinator/cron [get] @Accept json @Success 200 "OK" @Failure 400 "Bad Request" @Failure 500 "Internal Server Error" TODO: ADD URL PARAMS SWAGGER ANNOTATION
func GetExternalConfig ¶ added in v4.1.7
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 name path string true "ExternalConfig ID" @Security Bearer @Success 200 {object} models.ExternalConfig "externalConfig" @Failure 400 "Status Bad Request" @Router /engine/externalconfigs/{name} [get]
func GetExternalConfigs ¶ added in v4.1.7
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" @Param byName query string false "Find fact by it's name" @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 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 GetGroup ¶
func GetGroup(w http.ResponseWriter, r *http.Request)
GetGroup godoc @Summary Get an user group @Description Gets an user group with the specified id @Tags Groups @Produce json @Param id path string true "group ID" @Security Bearer @Success 200 {object} groups.Group "group" @Failure 400 {string} string "Bad Request" @Failure 404 {string} string "Not Found" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/groups/{id} [get]
func GetGroups ¶
func GetGroups(w http.ResponseWriter, r *http.Request)
GetGroups godoc @Summary Get all user groups @Description Gets a list of all user groups. @Tags Groups @Produce json @Security Bearer @Success 200 {array} groups.Group "list of groups" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/groups [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 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 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 @Success 200 {array} notification.FrontNotification "list of notifications" @Failure 500 "internal server error" @Router /engine/notifications [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 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 {array} situation.Situation "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 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 @Description Gets un user with the specified id. @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} [get]
func GetUserFromContext ¶
func GetUserFromContext(r *http.Request) *groups.UserWithGroups
GetUserFromContext extract the logged user from the request context
func GetUserGroupsFromContext ¶
GetUserGroupsFromContext extract the logged user groups from the request context
func GetUserGroupsFromUser ¶
func GetUserGroupsFromUser(user *groups.UserWithGroups) []int64
GetUserGroupsFromUser extracts group IDs from a user
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 users @Description Gets a list of all users. @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 /admin/security/users [get]
func GetUsersOfGroup ¶
func GetUsersOfGroup(w http.ResponseWriter, r *http.Request)
GetUsersOfGroup godoc @Summary Get all users of a group @Description Gets a list of all users of a specific group. @Tags Group Memberships @Produce json @Param groupid path string true "user group 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/groups/{groupid}/users [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" @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 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 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 ParsePlaceholders ¶
ParsePlaceholders parse multiple key:value entries separated by commas from a string
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 PostAggregates ¶
func PostAggregates(w http.ResponseWriter, r *http.Request)
PostAggregates godoc @Summary Receive aggregates to be evaluated @Description Receive aggregates to be evaluated @Tags Service @Consume json @Produce json @Param query body []ExternalAggregate true "query (json)" @Security Bearer @Success 200 "Status OK" @Failure 500 "internal server error" @Router /service/aggregates [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 PostExternalConfig ¶ added in v4.1.7
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 PostGroup ¶
func PostGroup(w http.ResponseWriter, r *http.Request)
PostGroup godoc @Summary Create a new group @Description Add an user group to the user groups @Tags Groups @Accept json @Produce json @Param group body groups.Group true "group (json)" @Security Bearer @Success 200 {object} groups.Group "group" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/groups [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 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 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 {array} 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 new user @Description Add an user to the users @Tags Users @Accept json @Produce json @Param user body interface{} true "user (json)" @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 [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 PutExternalConfig ¶ added in v4.1.7
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 PutGroup ¶
func PutGroup(w http.ResponseWriter, r *http.Request)
PutGroup godoc @Summary Update group @Description Updates the user group information concerning the user group with id @Tags Groups @Accept json @Produce json @Param id path string true "group ID" @Param group body groups.Group true "group (json)" @Security Bearer @Success 200 {object} groups.Group "group" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/groups/{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 PutMembership ¶
func PutMembership(w http.ResponseWriter, r *http.Request)
PutMembership godoc @Summary Create membership @Description Updates the user membership information concerning the user id and group id @Tags Group Memberships @Accept json @Produce json @Param groupid path string true "user group ID" @Param userid path string true "user ID" @Param membership body groups.Membership true "membership (json)" @Security Bearer @Success 200 {string} string "status OK" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/groups/{groupid}/users/{userid} [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 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 {array} 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 an user @Description Updates the user information concerning the user with id @Tags Users @Accept json @Produce json @Param id path string true "user ID" @Param user body interface{} true "user (json)" @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} [put]
func ReceiveAggregates ¶
func ReceiveAggregates(aggregates []ExternalAggregate) error
ReceiveAggregates process a slice of ExternalAggregates and trigger all standard fact-situation-rule process
func Search ¶
func Search(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 query body search.Query true "query (json)" @Security Bearer @Success 200 {array} search.QueryResult "query result" @Failure 500 "internal server error" @Router /engine/search [post]
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 {array} 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 StartAllCron ¶
func StartAllCron(w http.ResponseWriter, r *http.Request)
StartAllCron godoc @Title StartAllCron @Description starts every defined crons @tags Cron @Resource /coordinator @Router /coordinator/crons/start [post] @Accept json @Success 200 "OK" @Failure 400 "Bad Request" @Failure 500 "Internal Server Error"
func StartCron ¶
func StartCron(w http.ResponseWriter, r *http.Request)
StartCron godoc @Title StartCron @Description starts a single cron @tags Cron @Resource /coordinator @Router /coordinator/cron/start [post] @Accept json @Success 200 "OK" @Failure 400 "Bad Request" @Failure 500 "Internal Server Error"
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 StopAllCron ¶
func StopAllCron(w http.ResponseWriter, r *http.Request)
StopAllCron godoc @Title StopAllCron @Description stops every defined crons @tags Cron @Resource /coordinator @Router /coordinator/crons/stop [post] @Accept json @Success 200 "OK" @Failure 400 "Bad Request" @Failure 500 "Internal Server Error" FIXME: Not working
func StopCron ¶
func StopCron(w http.ResponseWriter, r *http.Request)
StopCron godoc @Title StopCron @Description stops a single cron @tags Cron @Resource /coordinator @Router /coordinator/cron/stop [post] @Accept json @Success 200 "OK" @Failure 400 "Bad Request" @Failure 500 "Internal Server Error"
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 ¶ added in v4.1.3
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 ValidateGroup ¶
func ValidateGroup(w http.ResponseWriter, r *http.Request)
ValidateGroup godoc @Summary Validate a new group definition @Description Validate a new group definition @Tags Groups @Accept json @Produce json @Param group body groups.Group true "group (json)" @Security Bearer @Success 200 {object} groups.Group "group" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /admin/security/groups/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 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 interface{} true "user (json)" @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/validate [post]
Types ¶
type ExternalAggregate ¶
type ExternalAggregate struct { FactID int64 `json:"factId"` SituationID int64 `json:"situationId"` SituationInstanceID int64 `json:"situationInstanceId"` Time time.Time `json:"time"` Value reader.Item `json:"value"` }
ExternalAggregate contains all information to store a new aggregat in postgresql
Source Files ¶
- actions_handlers.go
- calendar_handlers.go
- connections_handler.go
- coordinator_handlers.go
- externalconfig_handlers.go
- facts_handlers.go
- groups_handlers.go
- groups_linked_handlers.go
- handlers.go
- issues_handlers.go
- model_handlers.go
- notification_handlers.go
- notifier_handlers.go
- processor_handlers.go
- rootcauses_handlers.go
- rules_debug_handlers.go
- rules_handlers.go
- rules_linked_handlers.go
- scheduler_handlers.go
- search_handlers.go
- situations_handlers.go
- situations_linked_handlers.go
- users_handlers.go
- utils.go