mirror of
https://github.com/unraid/api.git
synced 2026-01-03 23:19:54 -06:00
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced API capabilities with improved GraphQL interfaces for remote access, parity checks, notifications, and virtual machine controls. - Introduction of dynamic remote access settings and refined online status and service monitoring. - New `ParityCheckMutationsResolver` for managing parity check operations through GraphQL. - **Refactor** - Consolidated and renamed internal types and schema definitions to improve consistency and performance. - Removed deprecated legacy schemas to streamline the API. - Updated import paths for various types to reflect new module structures. - **Chore** - Updated environment configurations and test setups to support the new logging and configuration mechanisms. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1528 lines
28 KiB
GraphQL
1528 lines
28 KiB
GraphQL
# ------------------------------------------------------
|
|
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
|
|
# ------------------------------------------------------
|
|
|
|
type ApiKeyResponse {
|
|
valid: Boolean!
|
|
error: String
|
|
}
|
|
|
|
type MinigraphqlResponse {
|
|
status: MinigraphStatus!
|
|
timeout: Int
|
|
error: String
|
|
}
|
|
|
|
enum MinigraphStatus {
|
|
PRE_INIT
|
|
CONNECTING
|
|
CONNECTED
|
|
PING_FAILURE
|
|
ERROR_RETRYING
|
|
}
|
|
|
|
type CloudResponse {
|
|
status: String!
|
|
ip: String
|
|
error: String
|
|
}
|
|
|
|
type RelayResponse {
|
|
status: String!
|
|
timeout: String
|
|
error: String
|
|
}
|
|
|
|
type Cloud {
|
|
error: String
|
|
apiKey: ApiKeyResponse!
|
|
relay: RelayResponse
|
|
minigraphql: MinigraphqlResponse!
|
|
cloud: CloudResponse!
|
|
allowedOrigins: [String!]!
|
|
}
|
|
|
|
type Capacity {
|
|
"""Free capacity"""
|
|
free: String!
|
|
|
|
"""Used capacity"""
|
|
used: String!
|
|
|
|
"""Total capacity"""
|
|
total: String!
|
|
}
|
|
|
|
type ArrayCapacity {
|
|
"""Capacity in kilobytes"""
|
|
kilobytes: Capacity!
|
|
|
|
"""Capacity in number of disks"""
|
|
disks: Capacity!
|
|
}
|
|
|
|
type ArrayDisk {
|
|
"""Disk identifier, only set for present disks on the system"""
|
|
id: ID!
|
|
|
|
"""
|
|
Array slot number. Parity1 is always 0 and Parity2 is always 29. Array slots will be 1 - 28. Cache slots are 30 - 53. Flash is 54.
|
|
"""
|
|
idx: Int!
|
|
name: String
|
|
device: String
|
|
|
|
"""(KB) Disk Size total"""
|
|
size: Float!
|
|
status: ArrayDiskStatus
|
|
|
|
"""Is the disk a HDD or SSD."""
|
|
rotational: Boolean
|
|
|
|
"""Disk temp - will be NaN if array is not started or DISK_NP"""
|
|
temp: Int
|
|
|
|
"""
|
|
Count of I/O read requests sent to the device I/O drivers. These statistics may be cleared at any time.
|
|
"""
|
|
numReads: Float!
|
|
|
|
"""
|
|
Count of I/O writes requests sent to the device I/O drivers. These statistics may be cleared at any time.
|
|
"""
|
|
numWrites: Float!
|
|
|
|
"""
|
|
Number of unrecoverable errors reported by the device I/O drivers. Missing data due to unrecoverable array read errors is filled in on-the-fly using parity reconstruct (and we attempt to write this data back to the sector(s) which failed). Any unrecoverable write error results in disabling the disk.
|
|
"""
|
|
numErrors: Float!
|
|
|
|
"""(KB) Total Size of the FS (Not present on Parity type drive)"""
|
|
fsSize: Float
|
|
|
|
"""(KB) Free Size on the FS (Not present on Parity type drive)"""
|
|
fsFree: Float
|
|
|
|
"""(KB) Used Size on the FS (Not present on Parity type drive)"""
|
|
fsUsed: Float
|
|
exportable: Boolean
|
|
|
|
"""Type of Disk - used to differentiate Cache / Flash / Array / Parity"""
|
|
type: ArrayDiskType!
|
|
|
|
"""(%) Disk space left to warn"""
|
|
warning: Int
|
|
|
|
"""(%) Disk space left for critical"""
|
|
critical: Int
|
|
|
|
"""File system type for the disk"""
|
|
fsType: String
|
|
|
|
"""User comment on disk"""
|
|
comment: String
|
|
|
|
"""File format (ex MBR: 4KiB-aligned)"""
|
|
format: String
|
|
|
|
"""ata | nvme | usb | (others)"""
|
|
transport: String
|
|
color: ArrayDiskFsColor
|
|
}
|
|
|
|
enum ArrayDiskStatus {
|
|
DISK_NP
|
|
DISK_OK
|
|
DISK_NP_MISSING
|
|
DISK_INVALID
|
|
DISK_WRONG
|
|
DISK_DSBL
|
|
DISK_NP_DSBL
|
|
DISK_DSBL_NEW
|
|
DISK_NEW
|
|
}
|
|
|
|
enum ArrayDiskType {
|
|
DATA
|
|
PARITY
|
|
FLASH
|
|
CACHE
|
|
}
|
|
|
|
enum ArrayDiskFsColor {
|
|
GREEN_ON
|
|
GREEN_BLINK
|
|
BLUE_ON
|
|
BLUE_BLINK
|
|
YELLOW_ON
|
|
YELLOW_BLINK
|
|
RED_ON
|
|
RED_OFF
|
|
GREY_OFF
|
|
}
|
|
|
|
type UnraidArray {
|
|
id: ID!
|
|
|
|
"""Array state before this query/mutation"""
|
|
previousState: ArrayState
|
|
|
|
"""Array state after this query/mutation"""
|
|
pendingState: ArrayPendingState
|
|
|
|
"""Current array state"""
|
|
state: ArrayState!
|
|
|
|
"""Current array capacity"""
|
|
capacity: ArrayCapacity!
|
|
|
|
"""Current boot disk"""
|
|
boot: ArrayDisk
|
|
|
|
"""Parity disks in the current array"""
|
|
parities: [ArrayDisk!]!
|
|
|
|
"""Data disks in the current array"""
|
|
disks: [ArrayDisk!]!
|
|
|
|
"""Caches in the current array"""
|
|
caches: [ArrayDisk!]!
|
|
}
|
|
|
|
enum ArrayState {
|
|
STARTED
|
|
STOPPED
|
|
NEW_ARRAY
|
|
RECON_DISK
|
|
DISABLE_DISK
|
|
SWAP_DSBL
|
|
INVALID_EXPANSION
|
|
PARITY_NOT_BIGGEST
|
|
TOO_MANY_MISSING_DISKS
|
|
NEW_DISK_TOO_SMALL
|
|
NO_DATA_DISKS
|
|
}
|
|
|
|
enum ArrayPendingState {
|
|
STARTING
|
|
STOPPING
|
|
NO_DATA_DISKS
|
|
TOO_MANY_MISSING_DISKS
|
|
}
|
|
|
|
type Share {
|
|
id: ID!
|
|
|
|
"""Display name"""
|
|
name: String
|
|
|
|
"""(KB) Free space"""
|
|
free: Long
|
|
|
|
"""(KB) Used Size"""
|
|
used: Long
|
|
|
|
"""(KB) Total size"""
|
|
size: Long
|
|
|
|
"""Disks that are included in this share"""
|
|
include: [String!]
|
|
|
|
"""Disks that are excluded from this share"""
|
|
exclude: [String!]
|
|
|
|
"""Is this share cached"""
|
|
cache: Boolean
|
|
|
|
"""Original name"""
|
|
nameOrig: String
|
|
|
|
"""User comment"""
|
|
comment: String
|
|
|
|
"""Allocator"""
|
|
allocator: String
|
|
|
|
"""Split level"""
|
|
splitLevel: String
|
|
|
|
"""Floor"""
|
|
floor: String
|
|
|
|
"""COW"""
|
|
cow: String
|
|
|
|
"""Color"""
|
|
color: String
|
|
|
|
"""LUKS status"""
|
|
luksStatus: String
|
|
}
|
|
|
|
"""The `Long` scalar type represents 52-bit integers"""
|
|
scalar Long
|
|
|
|
type RemoteAccess {
|
|
"""The type of WAN access used for Remote Access"""
|
|
accessType: WAN_ACCESS_TYPE!
|
|
|
|
"""The type of port forwarding used for Remote Access"""
|
|
forwardType: WAN_FORWARD_TYPE
|
|
|
|
"""The port used for Remote Access"""
|
|
port: Int
|
|
}
|
|
|
|
enum WAN_ACCESS_TYPE {
|
|
DYNAMIC
|
|
ALWAYS
|
|
DISABLED
|
|
}
|
|
|
|
enum WAN_FORWARD_TYPE {
|
|
UPNP
|
|
STATIC
|
|
}
|
|
|
|
type DynamicRemoteAccessStatus {
|
|
"""The type of dynamic remote access that is enabled"""
|
|
enabledType: DynamicRemoteAccessType!
|
|
|
|
"""The type of dynamic remote access that is currently running"""
|
|
runningType: DynamicRemoteAccessType!
|
|
|
|
"""Any error message associated with the dynamic remote access"""
|
|
error: String
|
|
}
|
|
|
|
enum DynamicRemoteAccessType {
|
|
STATIC
|
|
UPNP
|
|
DISABLED
|
|
}
|
|
|
|
type ConnectSettingsValues {
|
|
"""
|
|
If true, the GraphQL sandbox is enabled and available at /graphql. If false, the GraphQL sandbox is disabled and only the production API will be available.
|
|
"""
|
|
sandbox: Boolean!
|
|
|
|
"""A list of origins allowed to interact with the API"""
|
|
extraOrigins: [String!]!
|
|
|
|
"""The type of WAN access used for Remote Access"""
|
|
accessType: WAN_ACCESS_TYPE!
|
|
|
|
"""The type of port forwarding used for Remote Access"""
|
|
forwardType: WAN_FORWARD_TYPE
|
|
|
|
"""The port used for Remote Access"""
|
|
port: Int
|
|
|
|
"""A list of Unique Unraid Account ID's"""
|
|
ssoUserIds: [String!]!
|
|
}
|
|
|
|
type ConnectSettings {
|
|
"""The unique identifier for the Connect settings"""
|
|
id: ID!
|
|
|
|
"""The data schema for the Connect settings"""
|
|
dataSchema: JSON!
|
|
|
|
"""The UI schema for the Connect settings"""
|
|
uiSchema: JSON!
|
|
|
|
"""The values for the Connect settings"""
|
|
values: ConnectSettingsValues!
|
|
}
|
|
|
|
"""
|
|
The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
|
|
"""
|
|
scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
|
|
|
|
type Connect {
|
|
"""The unique identifier for the Connect instance"""
|
|
id: ID!
|
|
|
|
"""The status of dynamic remote access"""
|
|
dynamicRemoteAccess: DynamicRemoteAccessStatus!
|
|
|
|
"""The settings for the Connect instance"""
|
|
settings: ConnectSettings!
|
|
}
|
|
|
|
type AccessUrl {
|
|
type: URL_TYPE!
|
|
name: String
|
|
ipv4: URL
|
|
ipv6: URL
|
|
}
|
|
|
|
enum URL_TYPE {
|
|
LAN
|
|
WIREGUARD
|
|
WAN
|
|
MDNS
|
|
OTHER
|
|
DEFAULT
|
|
}
|
|
|
|
"""
|
|
A field whose value conforms to the standard URL format as specified in RFC3986: https://www.ietf.org/rfc/rfc3986.txt.
|
|
"""
|
|
scalar URL
|
|
|
|
type Network {
|
|
id: ID!
|
|
accessUrls: [AccessUrl!]
|
|
}
|
|
|
|
type ProfileModel {
|
|
userId: ID
|
|
username: String!
|
|
url: String!
|
|
avatar: String!
|
|
}
|
|
|
|
type Server {
|
|
owner: ProfileModel!
|
|
guid: String!
|
|
apikey: String!
|
|
name: String!
|
|
status: ServerStatus!
|
|
wanip: String!
|
|
lanip: String!
|
|
localurl: String!
|
|
remoteurl: String!
|
|
}
|
|
|
|
enum ServerStatus {
|
|
ONLINE
|
|
OFFLINE
|
|
NEVER_CONNECTED
|
|
}
|
|
|
|
type DiskPartition {
|
|
"""The name of the partition"""
|
|
name: String!
|
|
|
|
"""The filesystem type of the partition"""
|
|
fsType: DiskFsType!
|
|
|
|
"""The size of the partition in bytes"""
|
|
size: Float!
|
|
}
|
|
|
|
"""The type of filesystem on the disk partition"""
|
|
enum DiskFsType {
|
|
XFS
|
|
BTRFS
|
|
VFAT
|
|
ZFS
|
|
EXT4
|
|
NTFS
|
|
}
|
|
|
|
type Disk {
|
|
"""The unique identifier of the disk"""
|
|
id: String!
|
|
|
|
"""The device path of the disk (e.g. /dev/sdb)"""
|
|
device: String!
|
|
|
|
"""The type of disk (e.g. SSD, HDD)"""
|
|
type: String!
|
|
|
|
"""The model name of the disk"""
|
|
name: String!
|
|
|
|
"""The manufacturer of the disk"""
|
|
vendor: String!
|
|
|
|
"""The total size of the disk in bytes"""
|
|
size: Float!
|
|
|
|
"""The number of bytes per sector"""
|
|
bytesPerSector: Float!
|
|
|
|
"""The total number of cylinders on the disk"""
|
|
totalCylinders: Float!
|
|
|
|
"""The total number of heads on the disk"""
|
|
totalHeads: Float!
|
|
|
|
"""The total number of sectors on the disk"""
|
|
totalSectors: Float!
|
|
|
|
"""The total number of tracks on the disk"""
|
|
totalTracks: Float!
|
|
|
|
"""The number of tracks per cylinder"""
|
|
tracksPerCylinder: Float!
|
|
|
|
"""The number of sectors per track"""
|
|
sectorsPerTrack: Float!
|
|
|
|
"""The firmware revision of the disk"""
|
|
firmwareRevision: String!
|
|
|
|
"""The serial number of the disk"""
|
|
serialNum: String!
|
|
|
|
"""The interface type of the disk"""
|
|
interfaceType: DiskInterfaceType!
|
|
|
|
"""The SMART status of the disk"""
|
|
smartStatus: DiskSmartStatus!
|
|
|
|
"""The current temperature of the disk in Celsius"""
|
|
temperature: Float
|
|
|
|
"""The partitions on the disk"""
|
|
partitions: [DiskPartition!]!
|
|
}
|
|
|
|
"""The type of interface the disk uses to connect to the system"""
|
|
enum DiskInterfaceType {
|
|
SAS
|
|
SATA
|
|
USB
|
|
PCIE
|
|
UNKNOWN
|
|
}
|
|
|
|
"""
|
|
The SMART (Self-Monitoring, Analysis and Reporting Technology) status of the disk
|
|
"""
|
|
enum DiskSmartStatus {
|
|
OK
|
|
UNKNOWN
|
|
}
|
|
|
|
type KeyFile {
|
|
location: String
|
|
contents: String
|
|
}
|
|
|
|
type Registration {
|
|
guid: ID
|
|
type: registrationType
|
|
keyFile: KeyFile
|
|
state: RegistrationState
|
|
expiration: String
|
|
updateExpiration: String
|
|
}
|
|
|
|
enum registrationType {
|
|
BASIC
|
|
PLUS
|
|
PRO
|
|
STARTER
|
|
UNLEASHED
|
|
LIFETIME
|
|
INVALID
|
|
TRIAL
|
|
}
|
|
|
|
enum RegistrationState {
|
|
TRIAL
|
|
BASIC
|
|
PLUS
|
|
PRO
|
|
STARTER
|
|
UNLEASHED
|
|
LIFETIME
|
|
EEXPIRED
|
|
EGUID
|
|
EGUID1
|
|
ETRIAL
|
|
ENOKEYFILE
|
|
ENOKEYFILE1
|
|
ENOKEYFILE2
|
|
ENOFLASH
|
|
ENOFLASH1
|
|
ENOFLASH2
|
|
ENOFLASH3
|
|
ENOFLASH4
|
|
ENOFLASH5
|
|
ENOFLASH6
|
|
ENOFLASH7
|
|
EBLACKLISTED
|
|
EBLACKLISTED1
|
|
EBLACKLISTED2
|
|
ENOCONN
|
|
}
|
|
|
|
type Vars {
|
|
id: ID!
|
|
|
|
"""Unraid version"""
|
|
version: String
|
|
maxArraysz: Int
|
|
maxCachesz: Int
|
|
|
|
"""Machine hostname"""
|
|
name: String
|
|
timeZone: String
|
|
comment: String
|
|
security: String
|
|
workgroup: String
|
|
domain: String
|
|
domainShort: String
|
|
hideDotFiles: Boolean
|
|
localMaster: Boolean
|
|
enableFruit: String
|
|
|
|
"""Should a NTP server be used for time sync?"""
|
|
useNtp: Boolean
|
|
|
|
"""NTP Server 1"""
|
|
ntpServer1: String
|
|
|
|
"""NTP Server 2"""
|
|
ntpServer2: String
|
|
|
|
"""NTP Server 3"""
|
|
ntpServer3: String
|
|
|
|
"""NTP Server 4"""
|
|
ntpServer4: String
|
|
domainLogin: String
|
|
sysModel: String
|
|
sysArraySlots: Int
|
|
sysCacheSlots: Int
|
|
sysFlashSlots: Int
|
|
useSsl: Boolean
|
|
|
|
"""Port for the webui via HTTP"""
|
|
port: Int
|
|
|
|
"""Port for the webui via HTTPS"""
|
|
portssl: Int
|
|
localTld: String
|
|
bindMgt: Boolean
|
|
|
|
"""Should telnet be enabled?"""
|
|
useTelnet: Boolean
|
|
porttelnet: Int
|
|
useSsh: Boolean
|
|
portssh: Int
|
|
startPage: String
|
|
startArray: Boolean
|
|
spindownDelay: String
|
|
queueDepth: String
|
|
spinupGroups: Boolean
|
|
defaultFormat: String
|
|
defaultFsType: String
|
|
shutdownTimeout: Int
|
|
luksKeyfile: String
|
|
pollAttributes: String
|
|
pollAttributesDefault: String
|
|
pollAttributesStatus: String
|
|
nrRequests: Int
|
|
nrRequestsDefault: Int
|
|
nrRequestsStatus: String
|
|
mdNumStripes: Int
|
|
mdNumStripesDefault: Int
|
|
mdNumStripesStatus: String
|
|
mdSyncWindow: Int
|
|
mdSyncWindowDefault: Int
|
|
mdSyncWindowStatus: String
|
|
mdSyncThresh: Int
|
|
mdSyncThreshDefault: Int
|
|
mdSyncThreshStatus: String
|
|
mdWriteMethod: Int
|
|
mdWriteMethodDefault: String
|
|
mdWriteMethodStatus: String
|
|
shareDisk: String
|
|
shareUser: String
|
|
shareUserInclude: String
|
|
shareUserExclude: String
|
|
shareSmbEnabled: Boolean
|
|
shareNfsEnabled: Boolean
|
|
shareAfpEnabled: Boolean
|
|
shareInitialOwner: String
|
|
shareInitialGroup: String
|
|
shareCacheEnabled: Boolean
|
|
shareCacheFloor: String
|
|
shareMoverSchedule: String
|
|
shareMoverLogging: Boolean
|
|
fuseRemember: String
|
|
fuseRememberDefault: String
|
|
fuseRememberStatus: String
|
|
fuseDirectio: String
|
|
fuseDirectioDefault: String
|
|
fuseDirectioStatus: String
|
|
shareAvahiEnabled: Boolean
|
|
shareAvahiSmbName: String
|
|
shareAvahiSmbModel: String
|
|
shareAvahiAfpName: String
|
|
shareAvahiAfpModel: String
|
|
safeMode: Boolean
|
|
startMode: String
|
|
configValid: Boolean
|
|
configError: ConfigErrorState
|
|
joinStatus: String
|
|
deviceCount: Int
|
|
flashGuid: String
|
|
flashProduct: String
|
|
flashVendor: String
|
|
regCheck: String
|
|
regFile: String
|
|
regGuid: String
|
|
regTy: registrationType
|
|
regState: String
|
|
|
|
"""Registration owner"""
|
|
regTo: String
|
|
regTm: String
|
|
regTm2: String
|
|
regGen: String
|
|
sbName: String
|
|
sbVersion: String
|
|
sbUpdated: String
|
|
sbEvents: Int
|
|
sbState: String
|
|
sbClean: Boolean
|
|
sbSynced: Int
|
|
sbSyncErrs: Int
|
|
sbSynced2: Int
|
|
sbSyncExit: String
|
|
sbNumDisks: Int
|
|
mdColor: String
|
|
mdNumDisks: Int
|
|
mdNumDisabled: Int
|
|
mdNumInvalid: Int
|
|
mdNumMissing: Int
|
|
mdNumNew: Int
|
|
mdNumErased: Int
|
|
mdResync: Int
|
|
mdResyncCorr: String
|
|
mdResyncPos: String
|
|
mdResyncDb: String
|
|
mdResyncDt: String
|
|
mdResyncAction: String
|
|
mdResyncSize: Int
|
|
mdState: String
|
|
mdVersion: String
|
|
cacheNumDevices: Int
|
|
cacheSbNumDisks: Int
|
|
fsState: String
|
|
|
|
"""Human friendly string of array events happening"""
|
|
fsProgress: String
|
|
|
|
"""
|
|
Percentage from 0 - 100 while upgrading a disk or swapping parity drives
|
|
"""
|
|
fsCopyPrcnt: Int
|
|
fsNumMounted: Int
|
|
fsNumUnmountable: Int
|
|
fsUnmountableMask: String
|
|
|
|
"""Total amount of user shares"""
|
|
shareCount: Int
|
|
|
|
"""Total amount shares with SMB enabled"""
|
|
shareSmbCount: Int
|
|
|
|
"""Total amount shares with NFS enabled"""
|
|
shareNfsCount: Int
|
|
|
|
"""Total amount shares with AFP enabled"""
|
|
shareAfpCount: Int
|
|
shareMoverActive: Boolean
|
|
csrfToken: String
|
|
}
|
|
|
|
"""Possible error states for configuration"""
|
|
enum ConfigErrorState {
|
|
UNKNOWN_ERROR
|
|
INELIGIBLE
|
|
INVALID
|
|
NO_KEY_SERVER
|
|
WITHDRAWN
|
|
}
|
|
|
|
type Permission {
|
|
resource: Resource!
|
|
actions: [String!]!
|
|
}
|
|
|
|
"""Available resources for permissions"""
|
|
enum Resource {
|
|
API_KEY
|
|
ARRAY
|
|
CLOUD
|
|
CONFIG
|
|
CONNECT
|
|
CONNECT__REMOTE_ACCESS
|
|
CUSTOMIZATIONS
|
|
DASHBOARD
|
|
DISK
|
|
DISPLAY
|
|
DOCKER
|
|
FLASH
|
|
INFO
|
|
LOGS
|
|
ME
|
|
NETWORK
|
|
NOTIFICATIONS
|
|
ONLINE
|
|
OS
|
|
OWNER
|
|
PERMISSION
|
|
REGISTRATION
|
|
SERVERS
|
|
SERVICES
|
|
SHARE
|
|
VARS
|
|
VMS
|
|
WELCOME
|
|
}
|
|
|
|
type ApiKey {
|
|
id: ID!
|
|
name: String!
|
|
description: String
|
|
roles: [Role!]!
|
|
createdAt: String!
|
|
permissions: [Permission!]!
|
|
}
|
|
|
|
"""Available roles for API keys and users"""
|
|
enum Role {
|
|
ADMIN
|
|
CONNECT
|
|
GUEST
|
|
}
|
|
|
|
type ApiKeyWithSecret {
|
|
id: ID!
|
|
name: String!
|
|
description: String
|
|
roles: [Role!]!
|
|
createdAt: String!
|
|
permissions: [Permission!]!
|
|
key: String!
|
|
}
|
|
|
|
type ArrayMutations {
|
|
"""Placeholder field to ensure the type is not empty"""
|
|
_: Boolean!
|
|
}
|
|
|
|
type DockerMutations {
|
|
"""Placeholder field to ensure the type is not empty"""
|
|
_: Boolean!
|
|
|
|
"""Start a container"""
|
|
start(id: String!): DockerContainer!
|
|
|
|
"""Stop a container"""
|
|
stop(id: String!): DockerContainer!
|
|
}
|
|
|
|
type Config {
|
|
id: ID!
|
|
valid: Boolean
|
|
error: String
|
|
}
|
|
|
|
type InfoApps {
|
|
id: ID!
|
|
|
|
"""How many docker containers are installed"""
|
|
installed: Int!
|
|
|
|
"""How many docker containers are running"""
|
|
started: Int!
|
|
}
|
|
|
|
type Baseboard {
|
|
id: ID!
|
|
manufacturer: String!
|
|
model: String
|
|
version: String
|
|
serial: String
|
|
assetTag: String
|
|
}
|
|
|
|
type InfoCpu {
|
|
id: ID!
|
|
manufacturer: String!
|
|
brand: String!
|
|
vendor: String!
|
|
family: String!
|
|
model: String!
|
|
stepping: Int!
|
|
revision: String!
|
|
voltage: String
|
|
speed: Float!
|
|
speedmin: Float!
|
|
speedmax: Float!
|
|
threads: Int!
|
|
cores: Int!
|
|
processors: Int!
|
|
socket: String!
|
|
cache: JSON!
|
|
flags: [String!]!
|
|
}
|
|
|
|
type Gpu {
|
|
id: ID!
|
|
type: String!
|
|
typeid: String!
|
|
vendorname: String!
|
|
productid: String!
|
|
blacklisted: Boolean!
|
|
class: String!
|
|
}
|
|
|
|
type Pci {
|
|
id: ID!
|
|
type: String
|
|
typeid: String
|
|
vendorname: String
|
|
vendorid: String
|
|
productname: String
|
|
productid: String
|
|
blacklisted: String
|
|
class: String
|
|
}
|
|
|
|
type Usb {
|
|
id: ID!
|
|
name: String
|
|
}
|
|
|
|
type Devices {
|
|
id: ID!
|
|
gpu: [Gpu!]!
|
|
pci: [Pci!]!
|
|
usb: [Usb!]!
|
|
}
|
|
|
|
type Case {
|
|
icon: String
|
|
url: String
|
|
error: String
|
|
base64: String
|
|
}
|
|
|
|
type Display {
|
|
id: ID!
|
|
case: Case
|
|
date: String
|
|
number: String
|
|
scale: Boolean
|
|
tabs: Boolean
|
|
users: String
|
|
resize: Boolean
|
|
wwn: Boolean
|
|
total: Boolean
|
|
usage: Boolean
|
|
banner: String
|
|
dashapps: String
|
|
theme: Theme
|
|
text: Boolean
|
|
unit: Temperature
|
|
warning: Int
|
|
critical: Int
|
|
hot: Int
|
|
max: Int
|
|
locale: String
|
|
}
|
|
|
|
"""Display theme"""
|
|
enum Theme {
|
|
white
|
|
}
|
|
|
|
"""Temperature unit (Celsius or Fahrenheit)"""
|
|
enum Temperature {
|
|
C
|
|
F
|
|
}
|
|
|
|
type MemoryLayout {
|
|
size: Int!
|
|
bank: String
|
|
type: String
|
|
clockSpeed: Int
|
|
formFactor: String
|
|
manufacturer: String
|
|
partNum: String
|
|
serialNum: String
|
|
voltageConfigured: Int
|
|
voltageMin: Int
|
|
voltageMax: Int
|
|
}
|
|
|
|
type InfoMemory {
|
|
id: ID!
|
|
max: Int!
|
|
total: Int!
|
|
free: Int!
|
|
used: Int!
|
|
active: Int!
|
|
available: Int!
|
|
buffcache: Int!
|
|
swaptotal: Int!
|
|
swapused: Int!
|
|
swapfree: Int!
|
|
layout: [MemoryLayout!]!
|
|
}
|
|
|
|
type Os {
|
|
id: ID!
|
|
platform: String
|
|
distro: String
|
|
release: String
|
|
codename: String
|
|
kernel: String
|
|
arch: String
|
|
hostname: String
|
|
codepage: String
|
|
logofile: String
|
|
serial: String
|
|
build: String
|
|
uptime: String
|
|
}
|
|
|
|
type System {
|
|
id: ID!
|
|
manufacturer: String
|
|
model: String
|
|
version: String
|
|
serial: String
|
|
uuid: String
|
|
sku: String
|
|
}
|
|
|
|
type Versions {
|
|
id: ID!
|
|
kernel: String
|
|
openssl: String
|
|
systemOpenssl: String
|
|
systemOpensslLib: String
|
|
node: String
|
|
v8: String
|
|
npm: String
|
|
yarn: String
|
|
pm2: String
|
|
gulp: String
|
|
grunt: String
|
|
git: String
|
|
tsc: String
|
|
mysql: String
|
|
redis: String
|
|
mongodb: String
|
|
apache: String
|
|
nginx: String
|
|
php: String
|
|
docker: String
|
|
postfix: String
|
|
postgresql: String
|
|
perl: String
|
|
python: String
|
|
gcc: String
|
|
unraid: String
|
|
}
|
|
|
|
type Info {
|
|
id: ID!
|
|
|
|
"""Count of docker containers"""
|
|
apps: InfoApps!
|
|
baseboard: Baseboard!
|
|
cpu: InfoCpu!
|
|
devices: Devices!
|
|
display: Display!
|
|
|
|
"""Machine ID"""
|
|
machineId: ID
|
|
memory: InfoMemory!
|
|
os: Os!
|
|
system: System!
|
|
time: DateTime!
|
|
versions: Versions!
|
|
}
|
|
|
|
"""
|
|
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
|
|
"""
|
|
scalar DateTime
|
|
|
|
type ContainerPort {
|
|
ip: String
|
|
privatePort: Int!
|
|
publicPort: Int!
|
|
type: ContainerPortType!
|
|
}
|
|
|
|
enum ContainerPortType {
|
|
TCP
|
|
UDP
|
|
}
|
|
|
|
type ContainerHostConfig {
|
|
networkMode: String!
|
|
}
|
|
|
|
type DockerContainer {
|
|
id: ID!
|
|
names: [String!]!
|
|
image: String!
|
|
imageId: String!
|
|
command: String!
|
|
created: Int!
|
|
ports: [ContainerPort!]!
|
|
|
|
"""Total size of all the files in the container"""
|
|
sizeRootFs: Int
|
|
labels: JSONObject
|
|
state: ContainerState!
|
|
status: String!
|
|
hostConfig: ContainerHostConfig
|
|
networkSettings: JSONObject
|
|
mounts: [JSONObject!]
|
|
autoStart: Boolean!
|
|
}
|
|
|
|
"""
|
|
The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
|
|
"""
|
|
scalar JSONObject
|
|
|
|
enum ContainerState {
|
|
RUNNING
|
|
EXITED
|
|
}
|
|
|
|
type DockerNetwork {
|
|
name: String!
|
|
id: ID!
|
|
created: String!
|
|
scope: String!
|
|
driver: String!
|
|
enableIPv6: Boolean!
|
|
ipam: JSONObject!
|
|
internal: Boolean!
|
|
attachable: Boolean!
|
|
ingress: Boolean!
|
|
configFrom: JSONObject!
|
|
configOnly: Boolean!
|
|
containers: JSONObject!
|
|
options: JSONObject!
|
|
labels: JSONObject!
|
|
}
|
|
|
|
type Docker {
|
|
id: ID!
|
|
containers: [DockerContainer!]!
|
|
networks: [DockerNetwork!]!
|
|
}
|
|
|
|
type Flash {
|
|
id: ID!
|
|
guid: String!
|
|
vendor: String!
|
|
product: String!
|
|
}
|
|
|
|
type LogFile {
|
|
"""Name of the log file"""
|
|
name: String!
|
|
|
|
"""Full path to the log file"""
|
|
path: String!
|
|
|
|
"""Size of the log file in bytes"""
|
|
size: Int!
|
|
|
|
"""Last modified timestamp"""
|
|
modifiedAt: DateTime!
|
|
}
|
|
|
|
type LogFileContent {
|
|
"""Path to the log file"""
|
|
path: String!
|
|
|
|
"""Content of the log file"""
|
|
content: String!
|
|
|
|
"""Total number of lines in the file"""
|
|
totalLines: Int!
|
|
|
|
"""Starting line number of the content (1-indexed)"""
|
|
startLine: Int
|
|
}
|
|
|
|
type NotificationCounts {
|
|
info: Int!
|
|
warning: Int!
|
|
alert: Int!
|
|
total: Int!
|
|
}
|
|
|
|
type NotificationOverview {
|
|
unread: NotificationCounts!
|
|
archive: NotificationCounts!
|
|
}
|
|
|
|
type Notification {
|
|
id: ID!
|
|
|
|
"""Also known as 'event'"""
|
|
title: String!
|
|
subject: String!
|
|
description: String!
|
|
importance: NotificationImportance!
|
|
link: String
|
|
type: NotificationType!
|
|
|
|
"""ISO Timestamp for when the notification occurred"""
|
|
timestamp: String
|
|
formattedTimestamp: String
|
|
}
|
|
|
|
enum NotificationImportance {
|
|
ALERT
|
|
INFO
|
|
WARNING
|
|
}
|
|
|
|
enum NotificationType {
|
|
UNREAD
|
|
ARCHIVE
|
|
}
|
|
|
|
type Notifications {
|
|
id: ID!
|
|
|
|
"""A cached overview of the notifications in the system & their severity."""
|
|
overview: NotificationOverview!
|
|
list(filter: NotificationFilter!): [Notification!]!
|
|
}
|
|
|
|
input NotificationFilter {
|
|
importance: NotificationImportance
|
|
type: NotificationType!
|
|
offset: Int!
|
|
limit: Int!
|
|
}
|
|
|
|
type Owner {
|
|
username: String!
|
|
url: String!
|
|
avatar: String!
|
|
}
|
|
|
|
type VmDomain {
|
|
uuid: ID!
|
|
|
|
"""A friendly name for the vm"""
|
|
name: String
|
|
|
|
"""Current domain vm state"""
|
|
state: VmState!
|
|
}
|
|
|
|
"""The state of a virtual machine"""
|
|
enum VmState {
|
|
NOSTATE
|
|
RUNNING
|
|
IDLE
|
|
PAUSED
|
|
SHUTDOWN
|
|
SHUTOFF
|
|
CRASHED
|
|
PMSUSPENDED
|
|
}
|
|
|
|
type Vms {
|
|
id: ID!
|
|
domain: [VmDomain!]!
|
|
domains: [VmDomain!]!
|
|
}
|
|
|
|
type Uptime {
|
|
timestamp: String
|
|
}
|
|
|
|
type Service {
|
|
id: ID!
|
|
name: String
|
|
online: Boolean
|
|
uptime: Uptime
|
|
version: String
|
|
}
|
|
|
|
type UserAccount {
|
|
"""A unique identifier for the user"""
|
|
id: ID!
|
|
|
|
"""The name of the user"""
|
|
name: String!
|
|
|
|
"""A description of the user"""
|
|
description: String!
|
|
|
|
"""The roles of the user"""
|
|
roles: [Role!]!
|
|
|
|
"""The permissions of the user"""
|
|
permissions: [Permission!]
|
|
}
|
|
|
|
type Query {
|
|
apiKeys: [ApiKey!]!
|
|
apiKey(id: String!): ApiKey
|
|
array: UnraidArray!
|
|
cloud: Cloud!
|
|
config: Config!
|
|
connect: Connect!
|
|
remoteAccess: RemoteAccess!
|
|
extraAllowedOrigins: [String!]!
|
|
display: Display!
|
|
flash: Flash!
|
|
info: Info!
|
|
logFiles: [LogFile!]!
|
|
logFile(path: String!, lines: Float, startLine: Float): LogFileContent!
|
|
me: UserAccount!
|
|
network: Network!
|
|
|
|
"""Get all notifications"""
|
|
notifications: Notifications!
|
|
online: Boolean!
|
|
owner: Owner!
|
|
registration: Registration
|
|
server: Server
|
|
servers: [Server!]!
|
|
services: [Service!]!
|
|
shares: [Share!]!
|
|
vars: Vars!
|
|
vms: Vms!
|
|
docker: Docker!
|
|
disks: [Disk!]!
|
|
disk(id: String!): Disk!
|
|
}
|
|
|
|
type Mutation {
|
|
createApiKey(input: CreateApiKeyInput!): ApiKeyWithSecret!
|
|
addRoleForApiKey(input: AddRoleForApiKeyInput!): Boolean!
|
|
removeRoleFromApiKey(input: RemoveRoleFromApiKeyInput!): Boolean!
|
|
|
|
"""Set array state"""
|
|
setState(input: ArrayStateInput!): UnraidArray!
|
|
|
|
"""Add new disk to array"""
|
|
addDiskToArray(input: ArrayDiskInput!): UnraidArray!
|
|
|
|
"""
|
|
Remove existing disk from array. NOTE: The array must be stopped before running this otherwise it'll throw an error.
|
|
"""
|
|
removeDiskFromArray(input: ArrayDiskInput!): UnraidArray!
|
|
|
|
"""Mount a disk in the array"""
|
|
mountArrayDisk(id: String!): ArrayDisk!
|
|
|
|
"""Unmount a disk from the array"""
|
|
unmountArrayDisk(id: String!): ArrayDisk!
|
|
|
|
"""Clear statistics for a disk in the array"""
|
|
clearArrayDiskStatistics(id: String!): Boolean!
|
|
updateApiSettings(input: ApiSettingsInput!): ConnectSettings!
|
|
enableDynamicRemoteAccess(input: EnableDynamicRemoteAccessInput!): Boolean!
|
|
connectSignIn(input: ConnectSignInInput!): Boolean!
|
|
connectSignOut: Boolean!
|
|
setupRemoteAccess(input: SetupRemoteAccessInput!): Boolean!
|
|
setAdditionalAllowedOrigins(input: AllowedOriginInput!): [String!]!
|
|
|
|
"""Creates a new notification record"""
|
|
createNotification(input: NotificationData!): Notification!
|
|
deleteNotification(id: String!, type: NotificationType!): NotificationOverview!
|
|
|
|
"""Deletes all archived notifications on server."""
|
|
deleteArchivedNotifications: NotificationOverview!
|
|
|
|
"""Marks a notification as archived."""
|
|
archiveNotification(id: String!): Notification!
|
|
archiveNotifications(ids: [String!]!): NotificationOverview!
|
|
archiveAll(importance: NotificationImportance): NotificationOverview!
|
|
|
|
"""Marks a notification as unread."""
|
|
unreadNotification(id: String!): Notification!
|
|
unarchiveNotifications(ids: [String!]!): NotificationOverview!
|
|
unarchiveAll(importance: NotificationImportance): NotificationOverview!
|
|
|
|
"""Reads each notification to recompute & update the overview."""
|
|
recalculateOverview: NotificationOverview!
|
|
|
|
"""Start a virtual machine"""
|
|
startVm(id: String!): Boolean!
|
|
|
|
"""Stop a virtual machine"""
|
|
stopVm(id: String!): Boolean!
|
|
|
|
"""Pause a virtual machine"""
|
|
pauseVm(id: String!): Boolean!
|
|
|
|
"""Resume a virtual machine"""
|
|
resumeVm(id: String!): Boolean!
|
|
|
|
"""Force stop a virtual machine"""
|
|
forceStopVm(id: String!): Boolean!
|
|
|
|
"""Reboot a virtual machine"""
|
|
rebootVm(id: String!): Boolean!
|
|
|
|
"""Reset a virtual machine"""
|
|
resetVm(id: String!): Boolean!
|
|
}
|
|
|
|
input CreateApiKeyInput {
|
|
name: String!
|
|
description: String
|
|
roles: [Role!]
|
|
permissions: [AddPermissionInput!]
|
|
|
|
"""
|
|
This will replace the existing key if one already exists with the same name, otherwise returns the existing key
|
|
"""
|
|
overwrite: Boolean
|
|
}
|
|
|
|
input AddPermissionInput {
|
|
resource: Resource!
|
|
actions: [String!]!
|
|
}
|
|
|
|
input AddRoleForApiKeyInput {
|
|
apiKeyId: ID!
|
|
role: Role!
|
|
}
|
|
|
|
input RemoveRoleFromApiKeyInput {
|
|
apiKeyId: ID!
|
|
role: Role!
|
|
}
|
|
|
|
input ArrayStateInput {
|
|
"""Array state"""
|
|
desiredState: ArrayStateInputState! = STOP
|
|
}
|
|
|
|
enum ArrayStateInputState {
|
|
START
|
|
STOP
|
|
}
|
|
|
|
input ArrayDiskInput {
|
|
"""Disk ID"""
|
|
id: ID! = ""
|
|
|
|
"""The slot for the disk"""
|
|
slot: Int
|
|
}
|
|
|
|
input ApiSettingsInput {
|
|
"""
|
|
If true, the GraphQL sandbox will be enabled and available at /graphql. If false, the GraphQL sandbox will be disabled and only the production API will be available.
|
|
"""
|
|
sandbox: Boolean
|
|
|
|
"""A list of origins allowed to interact with the API"""
|
|
extraOrigins: [String!]
|
|
|
|
"""The type of WAN access to use for Remote Access"""
|
|
accessType: WAN_ACCESS_TYPE
|
|
|
|
"""The type of port forwarding to use for Remote Access"""
|
|
forwardType: WAN_FORWARD_TYPE
|
|
|
|
"""
|
|
The port to use for Remote Access. Not required for UPNP forwardType. Required for STATIC forwardType. Ignored if accessType is DISABLED or forwardType is UPNP.
|
|
"""
|
|
port: Int
|
|
|
|
"""A list of Unique Unraid Account ID's"""
|
|
ssoUserIds: [String!]
|
|
}
|
|
|
|
input EnableDynamicRemoteAccessInput {
|
|
"""The URL for dynamic remote access"""
|
|
url: URL!
|
|
|
|
"""Whether to enable or disable dynamic remote access"""
|
|
enabled: Boolean!
|
|
}
|
|
|
|
input ConnectSignInInput {
|
|
"""The API key for authentication"""
|
|
apiKey: String!
|
|
|
|
"""The ID token for authentication"""
|
|
idToken: String
|
|
|
|
"""User information for the sign-in"""
|
|
userInfo: ConnectUserInfoInput
|
|
|
|
"""The access token for authentication"""
|
|
accessToken: String
|
|
|
|
"""The refresh token for authentication"""
|
|
refreshToken: String
|
|
}
|
|
|
|
input ConnectUserInfoInput {
|
|
"""The preferred username of the user"""
|
|
preferred_username: String!
|
|
|
|
"""The email address of the user"""
|
|
email: String!
|
|
|
|
"""The avatar URL of the user"""
|
|
avatar: String
|
|
}
|
|
|
|
input SetupRemoteAccessInput {
|
|
"""The type of WAN access to use for Remote Access"""
|
|
accessType: WAN_ACCESS_TYPE!
|
|
|
|
"""The type of port forwarding to use for Remote Access"""
|
|
forwardType: WAN_FORWARD_TYPE
|
|
|
|
"""
|
|
The port to use for Remote Access. Not required for UPNP forwardType. Required for STATIC forwardType. Ignored if accessType is DISABLED or forwardType is UPNP.
|
|
"""
|
|
port: Int
|
|
}
|
|
|
|
input AllowedOriginInput {
|
|
"""A list of origins allowed to interact with the API"""
|
|
origins: [String!]!
|
|
}
|
|
|
|
input NotificationData {
|
|
title: String!
|
|
subject: String!
|
|
description: String!
|
|
importance: NotificationImportance!
|
|
link: String
|
|
}
|
|
|
|
type Subscription {
|
|
arraySubscription: UnraidArray!
|
|
displaySubscription: Display!
|
|
infoSubscription: Info!
|
|
logFileSubscription(path: String!): LogFileContent!
|
|
notificationAdded: Notification!
|
|
notificationsOverview: NotificationOverview!
|
|
ownerSubscription: Owner!
|
|
registrationSubscription: Registration!
|
|
serversSubscription: Server!
|
|
} |