Documentation
¶
Index ¶
- Constants
- type APIConfig
- type APIKey
- type APIKeyMetadataResponse
- type APIKeyMutationResponse
- type APIKeysResponse
- type Array
- type ArrayDisk
- type ArrayMutationResponse
- type ArrayResponse
- type CPUPackages
- type CPUUtilization
- type ContainerHostConfig
- type ContainerPort
- type CoreVersions
- type Disk
- type DisksResponse
- type DockerContainer
- type DockerContainerLogs
- type DockerContainerResponse
- type DockerContainerStats
- type DockerLogLine
- type DockerLogsResponse
- type DockerMutationResponse
- type DockerResponse
- type InfoResponse
- type LogFile
- type LogFileContent
- type LogFileResponse
- type LogFilesResponse
- type MemoryUtilization
- type Metrics
- type MetricsResponse
- type NetworkMetrics
- type Notification
- type NotificationCounts
- type NotificationOverview
- type Notifications
- type NotificationsResponse
- type OIDCConfigurationResponse
- type OIDCProvider
- type OIDCProvidersResponse
- type ParityCheck
- type ParityHistoryResponse
- type Permission
- type PublicOIDCProvider
- type SSOSettings
- type Settings
- type SettingsResponse
- type Share
- type SharesResponse
- type TemperatureMetrics
- type TemperatureSensor
- type UPSDevice
- type UPSResponse
- type UnifiedSettings
- type UpdateSettingsResponse
- type VM
- type VMsResponse
- type ValidateOIDCSessionResponse
Constants ¶
View Source
const APIKeyMetadataQuery = `
query {
apiKeyPossibleRoles
apiKeyPossiblePermissions {
resource
actions
}
getAvailableAuthActions
}
`
View Source
const APIKeysQuery = `
query {
apiKeys {
id
name
description
roles
createdAt
permissions {
resource
actions
}
}
}
`
View Source
const AddAPIKeyRoleMutation = `
mutation($input: AddRoleForApiKeyInput!) {
apiKey {
addRole(input: $input)
}
}
`
View Source
const ArrayAddDiskMutation = `` /* 179-byte string literal not displayed */
View Source
const ArrayClearDiskStatsMutation = `
mutation($id: PrefixedID!) {
array {
clearArrayDiskStatistics(id: $id)
}
}
`
View Source
const ArrayMountDiskMutation = `` /* 134-byte string literal not displayed */
View Source
const ArraySetStateMutation = `` /* 246-byte string literal not displayed */
View Source
const ArrayStatusQuery = `` /* 402-byte string literal not displayed */
View Source
const ArrayUnmountDiskMutation = `` /* 136-byte string literal not displayed */
View Source
const CPUMetricsQuery = `
query { metrics { cpu { percentTotal } } }
`
View Source
const CPUSubscription = `subscription { systemMetricsCpu { percentTotal } }`
View Source
const CPUTelemetrySubscription = `subscription { systemMetricsCpuTelemetry { totalPower power temp } }`
View Source
const ConfigureUPSMutation = `mutation($config: UPSConfigInput!) { configureUps(config: $config) }`
View Source
const ContainerHealthQuery = `
query { docker { containers { id names state status image autoStart } } }
`
View Source
const CreateAPIKeyMutation = `` /* 190-byte string literal not displayed */
View Source
const DeleteAPIKeyMutation = `
mutation($input: DeleteApiKeyInput!) {
apiKey {
delete(input: $input)
}
}
`
View Source
const DisksQuery = `
query {
disks { id device name type size smartStatus temperature }
}
`
View Source
const DockerAutostartMutation = `` /* 171-byte string literal not displayed */
View Source
const DockerContainerQuery = `` /* 592-byte string literal not displayed */
View Source
const DockerContainersQuery = `` /* 400-byte string literal not displayed */
View Source
const DockerLogsQuery = `` /* 189-byte string literal not displayed */
View Source
const DockerPauseMutation = `
mutation($id: PrefixedID!) {
docker {
pause(id: $id) {
id
names
state
status
image
autoStart
}
}
}
`
View Source
const DockerRefreshDigestsMutation = `mutation { refreshDockerDigests }`
View Source
const DockerRemoveMutation = `
mutation($id: PrefixedID!, $withImage: Boolean) {
docker {
removeContainer(id: $id, withImage: $withImage)
}
}
`
View Source
const DockerRestartMutation = `` /* 126-byte string literal not displayed */
View Source
const DockerStartMutation = `
mutation($id: PrefixedID!) {
docker {
start(id: $id) {
id
names
state
status
image
autoStart
}
}
}
`
View Source
const DockerStatsSubscription = `subscription { dockerContainerStats { id cpuPercent memUsage memPercent netIO blockIO } }`
View Source
const DockerStopMutation = `
mutation($id: PrefixedID!) {
docker {
stop(id: $id) {
id
names
state
status
image
autoStart
}
}
}
`
View Source
const DockerUnpauseMutation = `` /* 126-byte string literal not displayed */
View Source
const DockerUpdateAllMutation = `` /* 137-byte string literal not displayed */
View Source
const DockerUpdateManyMutation = `` /* 151-byte string literal not displayed */
View Source
const DockerUpdateMutation = `` /* 160-byte string literal not displayed */
View Source
const FlashBackupMutation = `
mutation($input: InitiateFlashBackupInput!) { initiateFlashBackup(input: $input) { status jobId } }
`
View Source
const InfoQuery = `` /* 185-byte string literal not displayed */
View Source
const LogFileQuery = `` /* 164-byte string literal not displayed */
View Source
const LogFileSubscription = `subscription($path: String!) { logFile(path: $path) { path content totalLines startLine } }`
View Source
const LogFilesQuery = `
query {
logFiles {
name
path
size
modifiedAt
}
}
`
View Source
const MemoryMetricsQuery = `
query { metrics { memory { total available active percentTotal } } }
`
View Source
const MemorySubscription = `subscription { systemMetricsMemory { total available active percentTotal } }`
View Source
const NetworkInterfacesQuery = `` /* 196-byte string literal not displayed */
View Source
const NetworkMetricsQuery = `` /* 259-byte string literal not displayed */
View Source
const NetworkSubscription = `` /* 222-byte string literal not displayed */
View Source
const NotificationAlertsQuery = `` /* 180-byte string literal not displayed */
View Source
const NotificationArchiveAllMutation = `` /* 162-byte string literal not displayed */
View Source
const NotificationArchiveManyMutation = `` /* 143-byte string literal not displayed */
View Source
const NotificationCreateMutation = `mutation($input: NotificationData!) { createNotification(input: $input) { id subject importance timestamp type } }`
View Source
const NotificationDeleteArchivedMutation = `mutation { deleteArchivedNotifications { unread { total info warning alert } archive { total info warning alert } } }`
View Source
const NotificationDeleteMutation = `` /* 174-byte string literal not displayed */
View Source
const NotificationNotifyIfUniqueMutation = `mutation($input: NotificationData!) { notifyIfUnique(input: $input) { id subject importance timestamp type } }`
View Source
const NotificationRecalculateMutation = `mutation { recalculateOverview { unread { total info warning alert } archive { total info warning alert } } }`
View Source
const NotificationSubscription = `subscription { notificationAdded { id subject importance timestamp type } }`
View Source
const NotificationUnarchiveAllMutation = `` /* 164-byte string literal not displayed */
View Source
const NotificationUnarchiveManyMutation = `` /* 145-byte string literal not displayed */
View Source
const NotificationsQuery = `` /* 214-byte string literal not displayed */
View Source
const OIDCConfigurationQuery = `` /* 207-byte string literal not displayed */
View Source
const OIDCProvidersQuery = `` /* 259-byte string literal not displayed */
View Source
const ParityCancelMutation = `mutation { parityCheck { cancel } }`
View Source
const ParityHistoryQuery = `
query {
parityHistory { date duration status errors progress running paused correcting }
}
`
View Source
const ParityPauseMutation = `mutation { parityCheck { pause } }`
View Source
const ParityResumeMutation = `mutation { parityCheck { resume } }`
View Source
const ParityStartMutation = `mutation($correct: Boolean!) { parityCheck { start(correct: $correct) } }`
View Source
const ParityStatusQuery = `
query {
array { parityCheckStatus { date duration status errors progress running paused correcting } }
}
`
View Source
const PluginsQuery = `
query { plugins { name version hasApiModule hasCliModule } installedUnraidPlugins }
`
View Source
const RemoveAPIKeyRoleMutation = `
mutation($input: RemoveRoleFromApiKeyInput!) {
apiKey {
removeRole(input: $input)
}
}
`
View Source
const ServerQuery = `
query { server { id name comment status lanip wanip localurl remoteurl } }
`
View Source
const ServicesQuery = `
query { services { id name online version uptime { timestamp } } }
`
View Source
const SettingsQuery = `` /* 327-byte string literal not displayed */
View Source
query {
shares {
name
comment
free
used
}
}
`
View Source
const SystemMetricsQuery = `` /* 167-byte string literal not displayed */
View Source
const SystemTimeQuery = `
query { systemTime { currentTime timeZone useNtp ntpServers } }
`
View Source
const TemperatureMetricsQuery = `
query { metrics { temperature { sensors { name type current { value unit status } } } } }
`
View Source
const TemperatureSubscription = `subscription { systemMetricsTemperature { sensors { name type current { value unit status } } } }`
View Source
const TimeZoneOptionsQuery = `
query { timeZoneOptions { value label } }
`
View Source
const UPSConfigurationQuery = `` /* 176-byte string literal not displayed */
View Source
const UPSQuery = `` /* 131-byte string literal not displayed */
View Source
const UpdateAPIKeyMutation = `` /* 183-byte string literal not displayed */
View Source
const UpdateSettingsMutation = `
mutation($input: JSON!) {
updateSettings(input: $input) {
restartRequired
warnings
values
}
}
`
View Source
const UpdateSystemTimeMutation = `
mutation($input: UpdateSystemTimeInput!) { updateSystemTime(input: $input) { currentTime timeZone useNtp ntpServers } }
`
View Source
const VMForceStopMutation = `mutation($id: PrefixedID!) { vm { forceStop(id: $id) } }`
View Source
const VMListQuery = `
query { vms { id domains { id name state } } }
`
View Source
const VMPauseMutation = `mutation($id: PrefixedID!) { vm { pause(id: $id) } }`
View Source
const VMRebootMutation = `mutation($id: PrefixedID!) { vm { reboot(id: $id) } }`
View Source
const VMResetMutation = `mutation($id: PrefixedID!) { vm { reset(id: $id) } }`
View Source
const VMResumeMutation = `mutation($id: PrefixedID!) { vm { resume(id: $id) } }`
View Source
const VMStartMutation = `mutation($id: PrefixedID!) { vm { start(id: $id) } }`
View Source
const VMStopMutation = `mutation($id: PrefixedID!) { vm { stop(id: $id) } }`
View Source
const ValidateOIDCSessionQuery = `
query($token: String!) {
validateOidcSession(token: $token) {
valid
username
}
}
`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyMetadataResponse ¶ added in v1.1.0
type APIKeyMetadataResponse struct {
APIKeyPossibleRoles []string `json:"apiKeyPossibleRoles"`
APIKeyPossiblePermissions []Permission `json:"apiKeyPossiblePermissions"`
GetAvailableAuthActions []string `json:"getAvailableAuthActions"`
}
type APIKeyMutationResponse ¶ added in v1.1.0
type APIKeysResponse ¶ added in v1.1.0
type APIKeysResponse struct {
APIKeys []APIKey `json:"apiKeys"`
}
type Array ¶ added in v1.1.0
type Array struct {
State string `json:"state"`
Capacity struct {
Kilobytes struct {
Free string `json:"free"` // String in API response
Used string `json:"used"`
Total string `json:"total"`
} `json:"kilobytes"`
} `json:"capacity"`
Disks []ArrayDisk `json:"disks"`
Parities []ArrayDisk `json:"parities"`
Caches []ArrayDisk `json:"caches"`
Boot *ArrayDisk `json:"boot"`
ParityCheckStatus *ParityCheck `json:"parityCheckStatus"`
}
type ArrayDisk ¶
type ArrayDisk struct {
ID string `json:"id"`
Name string `json:"name"`
Device string `json:"device"`
Size int64 `json:"size"` // Raw device capacity in KiB (unlike decimal capacity.kilobytes).
NumErrors *int64 `json:"numErrors"`
Status string `json:"status"`
Temp int `json:"temp"`
Type string `json:"type"`
}
type ArrayMutationResponse ¶ added in v1.1.0
type ArrayMutationResponse struct {
Array struct {
SetState Array `json:"setState"`
AddDiskToArray Array `json:"addDiskToArray"`
MountArrayDisk ArrayDisk `json:"mountArrayDisk"`
UnmountArrayDisk ArrayDisk `json:"unmountArrayDisk"`
ClearArrayDiskStatistics bool `json:"clearArrayDiskStatistics"`
} `json:"array"`
}
type ArrayResponse ¶
type ArrayResponse struct {
Array Array `json:"array"`
}
type CPUPackages ¶ added in v1.5.0
type CPUUtilization ¶ added in v1.3.0
type CPUUtilization struct {
PercentTotal float64 `json:"percentTotal"`
}
type ContainerHostConfig ¶ added in v1.1.0
type ContainerHostConfig struct {
NetworkMode string `json:"networkMode"`
}
type ContainerPort ¶ added in v1.1.0
type CoreVersions ¶ added in v1.3.0
type CoreVersions struct {
Unraid string `json:"unraid"`
API string `json:"api"`
Kernel string `json:"kernel"`
}
CoreVersions reports exact component versions, unlike info.os.release.
type DisksResponse ¶ added in v1.3.0
type DisksResponse struct {
Disks []Disk `json:"disks"`
}
type DockerContainer ¶
type DockerContainer struct {
ID string `json:"id"`
Names []string `json:"names"`
State string `json:"state"`
Status string `json:"status"`
Image string `json:"image"`
ImageID string `json:"imageId,omitempty"`
Command string `json:"command,omitempty"`
Created int64 `json:"created,omitempty"`
LanIPPorts []string `json:"lanIpPorts,omitempty"`
SizeRootFs *int64 `json:"sizeRootFs,omitempty"`
SizeRw *int64 `json:"sizeRw,omitempty"`
SizeLog *int64 `json:"sizeLog,omitempty"`
AutoStart bool `json:"autoStart"`
AutoStartOrder *int `json:"autoStartOrder,omitempty"`
AutoStartWait *int `json:"autoStartWait,omitempty"`
Ports []ContainerPort `json:"ports,omitempty"`
HostConfig *ContainerHostConfig `json:"hostConfig,omitempty"`
NetworkSettings json.RawMessage `json:"networkSettings,omitempty"`
Mounts []json.RawMessage `json:"mounts,omitempty"`
IsOrphaned bool `json:"isOrphaned,omitempty"`
IsUpdateAvailable *bool `json:"isUpdateAvailable,omitempty"`
IsRebuildReady *bool `json:"isRebuildReady,omitempty"`
TemplatePath string `json:"templatePath,omitempty"`
ProjectURL string `json:"projectUrl,omitempty"`
RegistryURL string `json:"registryUrl,omitempty"`
SupportURL string `json:"supportUrl,omitempty"`
IconURL string `json:"iconUrl,omitempty"`
WebUIURL string `json:"webUiUrl,omitempty"`
Shell string `json:"shell,omitempty"`
TemplatePorts []ContainerPort `json:"templatePorts,omitempty"`
TailscaleEnabled bool `json:"tailscaleEnabled,omitempty"`
}
type DockerContainerLogs ¶ added in v1.1.0
type DockerContainerLogs struct {
ContainerID string `json:"containerId"`
Cursor string `json:"cursor"`
Lines []DockerLogLine `json:"lines"`
}
type DockerContainerResponse ¶ added in v1.1.0
type DockerContainerResponse struct {
Docker struct {
Container DockerContainer `json:"container"`
} `json:"docker"`
}
type DockerContainerStats ¶ added in v1.5.0
type DockerLogLine ¶ added in v1.1.0
type DockerLogsResponse ¶ added in v1.1.0
type DockerLogsResponse struct {
Docker struct {
Logs DockerContainerLogs `json:"logs"`
} `json:"docker"`
}
type DockerMutationResponse ¶ added in v1.1.0
type DockerMutationResponse struct {
Docker struct {
Start DockerContainer `json:"start"`
Stop DockerContainer `json:"stop"`
Restart DockerContainer `json:"restart"`
Pause DockerContainer `json:"pause"`
Unpause DockerContainer `json:"unpause"`
UpdateContainer DockerContainer `json:"updateContainer"`
UpdateAllContainers []DockerContainer `json:"updateAllContainers"`
RemoveContainer bool `json:"removeContainer"`
UpdateAutostartConfiguration bool `json:"updateAutostartConfiguration"`
} `json:"docker"`
}
type DockerResponse ¶
type DockerResponse struct {
Docker struct {
Containers []DockerContainer `json:"containers"`
} `json:"docker"`
}
type InfoResponse ¶
type InfoResponse struct {
Info struct {
Versions struct {
Core CoreVersions `json:"core"`
} `json:"versions"`
OS struct {
Platform string `json:"platform"`
Distro string `json:"distro"`
Release string `json:"release"`
Uptime string `json:"uptime"` // ISO 8601 timestamp of boot time
Hostname string `json:"hostname"`
} `json:"os"`
CPU struct {
Manufacturer string `json:"manufacturer"`
Brand string `json:"brand"`
Cores int `json:"cores"`
Speed float64 `json:"speed"`
} `json:"cpu"`
} `json:"info"`
}
type LogFileContent ¶ added in v1.1.0
type LogFileResponse ¶ added in v1.1.0
type LogFileResponse struct {
LogFile LogFileContent `json:"logFile"`
}
type LogFilesResponse ¶ added in v1.1.0
type LogFilesResponse struct {
LogFiles []LogFile `json:"logFiles"`
}
type MemoryUtilization ¶ added in v1.3.0
type Metrics ¶ added in v1.3.0
type Metrics struct {
Network []NetworkMetrics `json:"network,omitempty"`
CPU *CPUUtilization `json:"cpu,omitempty"`
Memory *MemoryUtilization `json:"memory,omitempty"`
Temperature *TemperatureMetrics `json:"temperature,omitempty"`
}
type MetricsResponse ¶ added in v1.2.0
type MetricsResponse struct {
Metrics Metrics `json:"metrics"`
}
type NetworkMetrics ¶ added in v1.2.0
type NetworkMetrics struct {
ID string `json:"id"`
Name string `json:"name"`
Operstate string `json:"operstate"`
BytesReceived int64 `json:"bytesReceived"`
BytesSent int64 `json:"bytesSent"`
PacketsReceived int64 `json:"packetsReceived"`
PacketsSent int64 `json:"packetsSent"`
ReceiveErrors int64 `json:"receiveErrors"`
TransmitErrors int64 `json:"transmitErrors"`
ReceiveDropped int64 `json:"receiveDropped"`
TransmitDropped int64 `json:"transmitDropped"`
RxSec float64 `json:"rxSec"`
TxSec float64 `json:"txSec"`
UtilizationPercent *float64 `json:"utilizationPercent"`
LastUpdated string `json:"lastUpdated"`
}
type Notification ¶
type NotificationCounts ¶ added in v1.3.0
type NotificationOverview ¶ added in v1.3.0
type NotificationOverview struct {
Unread NotificationCounts `json:"unread"`
Archive NotificationCounts `json:"archive"`
}
type Notifications ¶ added in v1.3.0
type Notifications struct {
Overview NotificationOverview `json:"overview"`
List []Notification `json:"list"`
WarningsAndAlerts []Notification `json:"warningsAndAlerts"`
}
type NotificationsResponse ¶
type NotificationsResponse struct {
Notifications Notifications `json:"notifications"`
}
type OIDCConfigurationResponse ¶ added in v1.1.0
type OIDCConfigurationResponse struct {
OIDCConfiguration struct {
DefaultAllowedOrigins []string `json:"defaultAllowedOrigins"`
Providers []OIDCProvider `json:"providers"`
} `json:"oidcConfiguration"`
}
type OIDCProvider ¶ added in v1.1.0
type OIDCProvider struct {
ID string `json:"id"`
Name string `json:"name"`
ClientID string `json:"clientId"`
Issuer string `json:"issuer"`
AuthorizationEndpoint string `json:"authorizationEndpoint"`
TokenEndpoint string `json:"tokenEndpoint"`
JWKSURI string `json:"jwksUri"`
Scopes []string `json:"scopes"`
ButtonText string `json:"buttonText"`
ButtonVariant string `json:"buttonVariant"`
}
type OIDCProvidersResponse ¶ added in v1.1.0
type OIDCProvidersResponse struct {
IsSSOEnabled bool `json:"isSSOEnabled"`
OIDCProviders []OIDCProvider `json:"oidcProviders"`
PublicOIDCProviders []PublicOIDCProvider `json:"publicOidcProviders"`
}
type ParityCheck ¶ added in v1.3.0
type ParityHistoryResponse ¶ added in v1.3.0
type ParityHistoryResponse struct {
ParityHistory []ParityCheck `json:"parityHistory"`
}
type Permission ¶ added in v1.1.0
type PublicOIDCProvider ¶ added in v1.1.0
type SSOSettings ¶ added in v1.1.0
type SSOSettings struct {
ID string `json:"id"`
OIDCProviders []OIDCProvider `json:"oidcProviders"`
}
type Settings ¶ added in v1.1.0
type Settings struct {
ID string `json:"id"`
API APIConfig `json:"api"`
SSO SSOSettings `json:"sso"`
Unified UnifiedSettings `json:"unified"`
}
type SettingsResponse ¶ added in v1.1.0
type SharesResponse ¶
type SharesResponse struct {
}
type TemperatureMetrics ¶ added in v1.3.0
type TemperatureMetrics struct {
Sensors []TemperatureSensor `json:"sensors"`
}
type TemperatureSensor ¶ added in v1.3.0
type UPSDevice ¶ added in v1.3.0
type UPSDevice struct {
Name string `json:"name"`
Model string `json:"model"`
Status string `json:"status"`
Battery struct {
ChargeLevel *int `json:"chargeLevel"`
EstimatedRuntime *int `json:"estimatedRuntime"` // Seconds.
} `json:"battery"`
Power struct {
LoadPercentage *int `json:"loadPercentage"`
CurrentPower *float64 `json:"currentPower"`
} `json:"power"`
}
type UPSResponse ¶ added in v1.3.0
type UPSResponse struct {
Devices []UPSDevice `json:"upsDevices"`
}
type UnifiedSettings ¶ added in v1.1.0
type UnifiedSettings struct {
Values json.RawMessage `json:"values"`
}
type UpdateSettingsResponse ¶ added in v1.1.0
type UpdateSettingsResponse struct {
UpdateSettings struct {
RestartRequired bool `json:"restartRequired"`
Warnings []string `json:"warnings"`
Values json.RawMessage `json:"values"`
} `json:"updateSettings"`
}
type VMsResponse ¶
type ValidateOIDCSessionResponse ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.