Myth Service
Contents
What is this?
See Services API
Myth Service API List
API Command | POST Required? | Description |
AddStorageGroupDir | Yes | TBD |
CheckDatabase | Yes | TBD |
AddStorageGroupDir | Yes | TBD |
BackupDatabase | Yes | TBD |
GetBackendInfo | No (new in 0.28) | Get basic information about the backend's configuration. |
GetConnectionInfo | No | TBD |
GetHostName | No | TBD |
GetHosts | No | TBD |
GetKeys | No | TBD |
GetLogs | No | TBD |
GetSettings | No | Used prior to 0.28 |
GetSetting | No | Gets an individual setting in 0.28+ |
GetSettingList | No | Gets a list of settings in 0.28+ |
GetStorageGroupDirs | No | TBD |
GetTimeZone | No | TBD |
ManageDigestUser (v30+) | Yes | Add/Remove/ChangePassword for API users |
ManageUrlProtection (v30/v31 only) | Yes | Setup digest protection for none, one or more services |
ProfileSubmit | Yes | TBD |
ProfileText | Yes | TBD |
ProfileURL | Yes | TBD |
ProfileUpdated | No | TBD |
PutSetting | Yes | TBD |
RemoveStorageGroupDir | Yes | TBD |
SendMessage | No (0.28+ Yes) | Send a message to one or more frontends, which will appear as a popup message on the screen. |
SendNotification | No (0.28+ Yes) | Send a notification to one or more frontends which will appear in the Notification Center. |
TestDBSettings | Yes | TBD |
Myth APIs
DelayShutdown
The DelayShutdown API takes no arguments:
Example Queries:
http://BackendIP:6544/Myth/DelayShutdown
Example JSON Response:
{'bool': 'true'}
GetSetting
The GetSetting API takes the following arguments:
Key (Required)
Parameter Type: String
The mythconverg.setting value to retrieve.
HostName (Optional)
Parameter Type: String
If not used or empty the backend will use it's own HostName, use _GLOBAL_ to get a NULL setting.
Default (Optional)
Parameter Type: String
Default value if there's no match in the database.
Example Queries:
http://BackendIP:6544/Myth/GetSetting?Key=JobAllowCommFlag
http://BackendIP:6544/Myth/GetSetting?Key=mythfilldatabaseLastRunStart&HostName=_GLOBAL_
Example Returns:
String return. Returns an empty String if there was no such setting and Default wasn't used (or was empty.)
<String>1</String>
<String>2016-02-13T00:00:05Z</String>
GetSettingList
The GetSettingList API takes the following argument:
HostName (Optional)
Parameter Type: String
If not used or empty the backend will return NULL settings.
Example Query:
http://BackendIP:6544/Myth/GetSettingList
Example Return:
<HostName>backendHostName (or empty for NULL settings)</HostName> <Settings> <String> <Key>AC3PassThru</Key> <Value>1</Value> </String> ... <String> <Key>weatherbackgroundfetch</Key> <Value>0</Value> </String> </Settings> </SettingList>
ManageDigestUser
The ManageDigestUser API takes the following arguments:
Action (Required)
Parameter Type: String
One of Add, Remove or ChangePassword.
UserName (Required)
Parameter Type: String
Digest user (user mythtv is always valid).
Password (Required)
Parameter Type: String
User's password.
AdminPassword (Required, for Add)
Parameter Type: String
Admin's password.
NewPassword (Required, for ChangePassword)
Parameter Type: String
User's new password.
Example Queries:
http://BackendIP:6544/Myth/ManageDigest?Action=Add&UserName=alpha&Password=beta&AdminPassword=mythtv
http://BackendIP:6544/Myth/ManageDigest?Action=Remove&UserName=alpha&Password=gamma
Example JSON Boolean Response:
{'bool': 'true'}
ManageUrlProtection
The ManageUrlProtection API takes the following arguments:
AdminPassword (Required)
Parameter Type: String
The mythconverg.setting value to retrieve.
Services (Required)
Parameter Type: String
All, None or one or more service names (comma separated).
Example Queries:
http://BackendIP:6544/Myth/ManageUrlProtection?AdminPassword=mythtv&Services=All
http://BackendIP:6544/Myth/ManageUrlProtection?AdminPassword=mythtv&Services=Myth,Dvr,Video
Example JSON Boolean Response:
{'bool': 'true'}
SendMessage
The SendMessage API takes the following arguments:
- Message (Required)
- Parameter Type: String
- The message to appear on the frontend popup.
- Timeout (Optional)
- Parameter Type: Integer
- how long the message will be displayed for, if 0 or not set, user will have to dismiss it manually
- Address (Optional)
- Parameter Type: String
- Broadcast address
- udpPort (Optional)
- Parameter Type: Integer
- UDP port to be used in combination with broadcast address
Example Query:
http://BackendIP:6544/Frontend/SendMessage?Message=Hello World
Example Return:
Boolean return. Returns true if the message was sent, false if the message failed.
<bool>true</bool>
SendNotification
The SendNotification API takes the following arguments:
- Message (Required)
- Parameter Type: String
- The message to appear on the frontend notification center.
- Error ("Optional")
- Parameter Type: Boolean
- The notification will be set as an error
- Origin (Optional)
- Parameter Type: String
- The notification's origin
- Description (Optional)
- Parameter Type: String
- The description to be sent in the notification
- Image (Optional)
- Parameter Type: String
- The path or URL to image to be displayed in notification
- Extra (Optional)
- Parameter Type: String
- The extra text to be sent in the notification
- Progress (Optional)
- Parameter Type: Float
- A value between 0 and 1 (inclusive) indicating the progressiong percentage (1 is 100%).
- - a negative value indicates not to display a progress bar
- ProgressText (Optional)
- Parameter Type: String
- The text to be shown alongside the progress bar (if visible)
- Timeout (Optional)
- Parameter Type: Integer
- The number of seconds the notification will be displayed for
- Note that a notification can't be displayed for less than 5s
- Fullscreen (Optional)
- Parameter Type: Boolean
- Display the notification in full screen mode
- Visibility (Optional)
- Parameter Type: Unsigned Integer
- A bitmask value setting the visibility of the notification
- (bit 0: video playback, bit 1: settings, bit 2: setup wizard, bit 3: video library
- bit 4: music, bit 5: recordings library)
- Priority (Optional)
- Parameter Type: Unsigned Integer
- The priority level of the notification
- 0 = default, 1 = low, 2 = medium, 3 = high, 4 = higher, 5 = highest
- Type (Optional)
- Parameter Type: String
- The type of notification, valid values are:
- normal, error, warning, check, busy.
- this value is ignored if Error is set
- Address (Optional)
- Parameter Type: String
- Broadcast address
- udpPort (Optional)
- Parameter Type: Integer
- UDP port to be used in combination with broadcast address
Example Query:
http://BackendIP:6544/Frontend/SendNotification?Message=Hello World
Example Return:
Boolean return. Returns true if the notification was sent, false if the notification failed.
<bool>true</bool>