Versions in this module Expand all Collapse all v0 v0.6.2 Oct 27, 2026 Changes in this version + const APISettings type AlertRuleJSON + NodeUUID string + VulnMinSeverity string type OsctrlAPI + func (api *OsctrlAPI) CreateEnvironment(req types.EnvCreateRequest) (environments.TLSEnvironment, error) + func (api *OsctrlAPI) DeleteEnvironment(env string) error + func (api *OsctrlAPI) GetEnvConfig(env string) (types.EnvConfigResponse, error) + func (api *OsctrlAPI) GetQueriesLimited(target, env string, maxItems int) ([]queries.DistributedQuery, bool, error) + func (api *OsctrlAPI) GetSettings() ([]settings.SettingValue, error) + func (api *OsctrlAPI) GetUserPermissions(username string) (types.GetPermissionsResponse, error) + func (api *OsctrlAPI) PatchEnvConfig(env, section, value string) error + func (api *OsctrlAPI) PatchEnvironment(env string, req types.EnvUpdateRequest) error + func (api *OsctrlAPI) PatchEnvironmentIntervals(env string, config, log, query *int) error + func (api *OsctrlAPI) PatchSetting(service, name string, req types.SettingPatchRequest) error + func (api *OsctrlAPI) SetEnrollPackageURL(env, action, pkgURL string) error + func (api *OsctrlAPI) SetUserPermissions(username, envUUID string, access users.EnvAccess) error + func (api *OsctrlAPI) UploadCertificate(env, certPEM string) error v0.6.1 Oct 24, 2026 v0.6.0 Oct 11, 2026 Changes in this version type EnvStats + InactiveHours int64 type OsctrlAPI + UserAgent string + func (api *OsctrlAPI) GetEnvironmentInactiveHours(env string) (int64, error) v0.5.81 Sep 5, 2026 v0.5.9 Sep 8, 2026 Changes in this version + const APIAuditLogs + const APICarves + const APIChecksAuth + const APIChecksNoAuth + const APIEnvironments + const APILogin + const APINodes + const APIOsquery + const APIPath + const APIQueries + const APIStats + const APITags + const APIUSers + const Authorization + const ConfigKey + const ContentType + const JSONApplication + const JSONApplicationUTF8 + const UserAgent + func WriteConfiguration(file string, apiConf JSONConfigurationAPI) error + type AlertChannelJSON struct + Config json.RawMessage + Enabled bool + EnvironmentID uint + ID uint + Info string + Name string + Type string + type AlertRuleJSON struct + ChannelIDs []uint + CooldownMinutes int + Enabled bool + EnvironmentID uint + ID uint + Info string + MatchField string + MatchType string + MatchValue string + Name string + Source string + StatusSeverity string + type ConsoleCommandResponse struct + Command console.Command + Parsed console.ParsedCommand + type ConsoleNodeInfo struct + IPAddress string + OsqueryUser string + OsqueryVersion string + Platform string + PlatformVersion string + type ConsoleSessionResponse struct + History []console.HistoryEntry + NodeInfo ConsoleNodeInfo + Session console.Session + type EnvStats struct + ActiveNodes int64 + InactiveNodes int64 + Name string + PlatformCounts PlatformCounts + TotalNodes int64 + UUID string + type FeaturesResponse struct + Accelerated bool + AuthProviders bool + Console bool + FileExplorer bool + LogSinks bool + Posture bool + ServiceConfig bool + type FileExplorerSessionResponse struct + NodeInfo ConsoleNodeInfo + Session fileexplorer.Session + type JSONConfigurationAPI struct + Token string + URL string + func LoadConfiguration(file string) (JSONConfigurationAPI, error) + type OsctrlAPI struct + Client *http.Client + Configuration JSONConfigurationAPI + Headers map[string]string + func CreateAPI(config JSONConfigurationAPI, insecure bool) (*OsctrlAPI, error) + func CreateAPIWithTransport(config JSONConfigurationAPI, rt http.RoundTripper) (*OsctrlAPI, error) + func (api *OsctrlAPI) ActionEnrollmentRemove(identifier, action, target string, data io.Reader) (string, error) + func (api *OsctrlAPI) AddTag(env, name, color, icon, description string, tagType uint, custom string) (types.ApiGenericResponse, error) + func (api *OsctrlAPI) ApplyAlerts() error + func (api *OsctrlAPI) CheckAPI() error + func (api *OsctrlAPI) CloseConsoleSession(env string, sessionID uint) error + func (api *OsctrlAPI) CloseFileExplorerSession(env string, sessionID uint) error + func (api *OsctrlAPI) CompleteCarve(env, name string) (types.ApiGenericResponse, error) + func (api *OsctrlAPI) CompleteQuery(env, name string) (types.ApiGenericResponse, error) + func (api *OsctrlAPI) CreateAlertChannel(name, typ, configJSON string, envID uint, enabled bool) error + func (api *OsctrlAPI) CreateAlertRule(rule alerts.AlertRule) error + func (api *OsctrlAPI) CreateConsoleSession(env, uuid string) (ConsoleSessionResponse, error) + func (api *OsctrlAPI) CreateFileExplorerSession(env, uuid string) (FileExplorerSessionResponse, error) + func (api *OsctrlAPI) CreateSavedQuery(env, name, query string) error + func (api *OsctrlAPI) CreateUser(username, password, email, fullname, environment string, admin, service bool) error + func (api *OsctrlAPI) DeleteAlertChannel(id uint) error + func (api *OsctrlAPI) DeleteAlertRule(id uint) error + func (api *OsctrlAPI) DeleteCarve(env, name string) (types.ApiGenericResponse, error) + func (api *OsctrlAPI) DeleteNode(env, identifier string) error + func (api *OsctrlAPI) DeleteQuery(env, name string) (types.ApiGenericResponse, error) + func (api *OsctrlAPI) DeleteSavedQuery(env, name string) error + func (api *OsctrlAPI) DeleteTag(env, name string) (types.ApiGenericResponse, error) + func (api *OsctrlAPI) DeleteUser(username string) error + func (api *OsctrlAPI) EditTag(env, name, color, icon, description string, tagType uint, custom string) (types.ApiGenericResponse, error) + func (api *OsctrlAPI) EditUser(username, password, email, fullname, environment string, admin, service bool) error + func (api *OsctrlAPI) EditUserReq(u types.ApiUserRequest) error + func (api *OsctrlAPI) ExpireCarve(env, name string) (types.ApiGenericResponse, error) + func (api *OsctrlAPI) ExpireEnrollment(identifier string) (string, error) + func (api *OsctrlAPI) ExpireQuery(env, name string) (types.ApiGenericResponse, error) + func (api *OsctrlAPI) ExpireRemove(identifier string) (string, error) + func (api *OsctrlAPI) ExtendEnrollment(identifier string) (string, error) + func (api *OsctrlAPI) ExtendRemove(identifier string) (string, error) + func (api *OsctrlAPI) GetAlertChannels() ([]AlertChannelJSON, error) + func (api *OsctrlAPI) GetAlertRules() ([]AlertRuleJSON, error) + func (api *OsctrlAPI) GetAllTags() ([]tags.AdminTag, error) + func (api *OsctrlAPI) GetAuditLogs() ([]auditlog.AuditLog, error) + func (api *OsctrlAPI) GetCarve(env, name string) (carves.CarvedFile, error) + func (api *OsctrlAPI) GetCarveQueries(target, env string) ([]queries.DistributedQuery, error) + func (api *OsctrlAPI) GetCarves(env string) ([]carves.CarvedFile, error) + func (api *OsctrlAPI) GetConsoleCommand(env string, sessionID, commandID uint) (console.Command, error) + func (api *OsctrlAPI) GetConsoleCommandResults(env string, sessionID, commandID uint) ([]map[string]any, error) + func (api *OsctrlAPI) GetConsoleSession(env string, sessionID uint) (console.Session, error) + func (api *OsctrlAPI) GetEnvMap() (environments.MapEnvByID, error) + func (api *OsctrlAPI) GetEnvironment(identifier string) (environments.TLSEnvironment, error) + func (api *OsctrlAPI) GetEnvironments() ([]environments.TLSEnvironment, error) + func (api *OsctrlAPI) GetFeatures() (FeaturesResponse, error) + func (api *OsctrlAPI) GetFileExplorerRequest(env string, sessionID, requestID uint) (fileexplorer.Request, error) + func (api *OsctrlAPI) GetFileExplorerResults(env string, sessionID, requestID uint) ([]fileexplorer.Entry, error) + func (api *OsctrlAPI) GetGeneric(url string, body io.Reader) ([]byte, error) + func (api *OsctrlAPI) GetNode(env, identifier string) (nodes.OsqueryNode, error) + func (api *OsctrlAPI) GetNodeLogs(env, logType, uuid string) (string, error) + func (api *OsctrlAPI) GetNodePosture(env, uuid string) ([]posture.NodePosture, error) + func (api *OsctrlAPI) GetNodePostureScore(env, uuid string) (posture.PostureScore, error) + func (api *OsctrlAPI) GetNodes(env, target string) ([]nodes.OsqueryNode, error) + func (api *OsctrlAPI) GetOsqueryTables() ([]types.OsqueryTable, error) + func (api *OsctrlAPI) GetPostureProfiles() ([]posture.PostureProfile, error) + func (api *OsctrlAPI) GetQueries(target, env string) ([]queries.DistributedQuery, error) + func (api *OsctrlAPI) GetQuery(env, name string) (queries.DistributedQuery, error) + func (api *OsctrlAPI) GetQueryResults(env, name string, page, pageSize int) (types.QueryResultsResponse, error) + func (api *OsctrlAPI) GetQuerySamples() ([]queries.QuerySample, error) + func (api *OsctrlAPI) GetSavedQueries(env string) ([]types.SavedQueryView, error) + func (api *OsctrlAPI) GetStats() (StatsResponse, error) + func (api *OsctrlAPI) GetTag(env, name string) (tags.AdminTag, error) + func (api *OsctrlAPI) GetTags(env string) ([]tags.AdminTag, error) + func (api *OsctrlAPI) GetUser(username string) (users.AdminUser, error) + func (api *OsctrlAPI) GetUsers() ([]users.AdminUser, error) + func (api *OsctrlAPI) LookupNode(identifier string) (nodes.OsqueryNode, error) + func (api *OsctrlAPI) NotexpireEnrollment(identifier string) (string, error) + func (api *OsctrlAPI) NotexpireRemove(identifier string) (string, error) + func (api *OsctrlAPI) PostGeneric(url string, body io.Reader) ([]byte, error) + func (api *OsctrlAPI) PostLogin(env, username, password string, expHours int) (types.ApiLoginResponse, error) + func (api *OsctrlAPI) ReqGeneric(reqType string, url string, body io.Reader) ([]byte, error) + func (api *OsctrlAPI) RotateEnrollment(identifier string) (string, error) + func (api *OsctrlAPI) RotateRemove(identifier string) (string, error) + func (api *OsctrlAPI) RunCarve(env, fPath string, uuids, hosts, platforms, tags []string, hidden bool, ...) (types.ApiQueriesResponse, error) + func (api *OsctrlAPI) RunQuery(env, query string, uuids, hosts, platforms, tags []string, hidden bool, ...) (types.ApiQueriesResponse, error) + func (api *OsctrlAPI) SubmitConsoleCommand(env string, sessionID uint, input string, osqueryMode bool) (ConsoleCommandResponse, error) + func (api *OsctrlAPI) SubmitFileExplorerList(env string, sessionID uint, target string) (fileexplorer.Request, error) + func (api *OsctrlAPI) SubmitFileExplorerStat(env string, sessionID uint, target string) (fileexplorer.Request, error) + func (api *OsctrlAPI) TagNode(env, identifier, tag string, tagType uint, custom string) error + func (api *OsctrlAPI) UpdateSavedQuery(env, name, query string) error + type PlatformCounts struct + Darwin int64 + Linux int64 + Other int64 + Windows int64 + type StatsResponse struct + ActiveNodes int64 + Environments []EnvStats + InactiveHours int64 + InactiveNodes int64 + Platforms PlatformCounts + TotalActiveCarves int + TotalActiveQueries int + TotalNodes int64