Bump JSON api version

This commit is contained in:
Michael Zanetti 2019-12-16 11:26:32 +01:00
parent 4e70f0f5f8
commit 331966c8dd
2 changed files with 57 additions and 13 deletions

View File

@ -3,7 +3,7 @@ NYMEA_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"
# define protocol versions
JSON_PROTOCOL_VERSION_MAJOR=4
JSON_PROTOCOL_VERSION_MINOR=0
JSON_PROTOCOL_VERSION_MINOR=1
LIBNYMEA_API_VERSION_MAJOR=4
LIBNYMEA_API_VERSION_MINOR=0
LIBNYMEA_API_VERSION_PATCH=0

View File

@ -1,4 +1,4 @@
4.0
4.1
{
"enums": {
"BasicType": [
@ -397,7 +397,8 @@
}
},
"Configuration.GetAvailableLanguages": {
"description": "DEPRECATED - Use the locale property in the Handshake message instead - Returns a list of locale codes available for the server. i.e. en_US, de_AT",
"deprecated": "Use the locale property in the Handshake message instead.",
"description": "Returns a list of locale codes available for the server. i.e. en_US, de_AT",
"params": {
},
"returns": {
@ -412,12 +413,12 @@
},
"returns": {
"basicConfiguration": {
"d:language": "String",
"d:serverTime": "Uint",
"d:timeZone": "String",
"debugServerEnabled": "Bool",
"language": "String",
"serverName": "String",
"serverTime": "Uint",
"serverUuid": "Uuid",
"timeZone": "String"
"serverUuid": "Uuid"
},
"cloud": {
"enabled": "Bool"
@ -454,6 +455,7 @@
}
},
"Configuration.GetTimeZones": {
"deprecated": "Use System.GetTimeZones instead.",
"description": "Get the list of available timezones.",
"params": {
},
@ -482,7 +484,8 @@
}
},
"Configuration.SetLanguage": {
"description": "DEPRECATED - Use the locale property in the Handshake message instead - Sets the server language to the given language. See also: \"GetAvailableLanguages\"",
"deprecated": "Use the locale property in the Handshake message instead.",
"description": "Sets the server language to the given language. See also: \"GetAvailableLanguages\"",
"params": {
"language": "String"
},
@ -527,6 +530,7 @@
}
},
"Configuration.SetTimeZone": {
"deprecated": "Use System.SetTimeZone instead.",
"description": "Set the time zone of the server. See also: \"GetTimeZones\"",
"params": {
"timeZone": "String"
@ -1253,11 +1257,12 @@
}
},
"System.GetCapabilities": {
"description": "Get the list of capabilites on this system. This allows reading whether things like rebooting or shutting down the system running nymea:core is supported on this host.",
"description": "Get the list of capabilites on this system. The property \"powerManagement\" indicates whether rebooting or shutting down the system running nymea:core is supported on this host. The property \"updateManagement indicates whether system update features are available in this API. The property \"timeManagement\" indicates whether the system time can be configured on this system. Note that GetTime will be available in any case.",
"params": {
},
"returns": {
"powerManagement": "Bool",
"timeManagement": "Bool",
"updateManagement": "Bool"
}
},
@ -1277,6 +1282,25 @@
"repositories": "$ref:Repositories"
}
},
"System.GetTime": {
"description": "Get the system time and configuraton. The \"serverTime\" and \"serverTimezone\" properties give the current server time and time zone. \"automaticTimeAvailable\" indicates whether this system supports automatically setting the clock (e.g. using NTP). \"automaticTime\" will be true if the system is configured to automatically update the clock.",
"params": {
},
"returns": {
"automaticTime": "Bool",
"automaticTimeAvailable": "Bool",
"time": "Uint",
"timeZone": "String"
}
},
"System.GetTimeZones": {
"description": "Returns the list of IANA specified time zone IDs which can be used to select a time zone. It is not required to use this method of the client toolkit already provides means to obtain a list of IANA time zone ids.",
"params": {
},
"returns": {
"timeZones": "StringList"
}
},
"System.GetUpdateStatus": {
"description": "Get the current status of the update system. \"busy\" indicates that the system is current busy with an operation regarding updates. This does not necessarily mean an actual update is running. When this is true, update related functions on the client should be marked as busy and no interaction with update components shall be allowed. An example for such a state is when the system queries the server if there are updates available, typically after a call to CheckForUpdates. \"updateRunning\" on the other hand indicates an actual update process is ongoing. The user should be informed about it, the system also might restart at any point while an update is running.",
"params": {
@ -1316,6 +1340,17 @@
"success": "Bool"
}
},
"System.SetTime": {
"description": "Set the system time configuraton. The system can be configured to update the time automatically by setting \"automaticTime\" to true. This will only work if the \"timeManagement\" capability is available on this system and \"GetTime\" indicates the availability of automatic time settngs. If any of those requirements are not met, this method will return \"false\" in the \"success\" property. In order to manually configure the time, \"automaticTime\" should be set to false and \"time\" should be set. Note that if \"automaticTime\" is set to true and a manual \"time\" is still passed, the system will attempt to configure automatic time updates and only set the manual time if automatic mode fails. A time zone can always be passed optionally to change the system time zone and should be a IANA time zone id.",
"params": {
"o:automaticTime": "Bool",
"o:time": "Uint",
"o:timeZone": "String"
},
"returns": {
"success": "Bool"
}
},
"System.Shutdown": {
"description": "Initiate a shutdown of the system. The return value will indicate whether the procedure has been initiated successfully.",
"params": {
@ -1372,12 +1407,12 @@
"description": "Emitted whenever the basic configuration of this server changes.",
"params": {
"basicConfiguration": {
"d:language": "String",
"d:serverTime": "Uint",
"d:timeZone": "String",
"debugServerEnabled": "Bool",
"language": "String",
"serverName": "String",
"serverTime": "Uint",
"serverUuid": "Uuid",
"timeZone": "String"
"serverUuid": "Uuid"
}
}
},
@ -1649,6 +1684,15 @@
"repositoryId": "String"
}
},
"System.TimeConfigurationChanged": {
"description": "Emitted whenever the time configuration is changed",
"params": {
"automaticTime": "Bool",
"automaticTimeAvailable": "Bool",
"time": "Uint",
"timeZone": "String"
}
},
"System.UpdateStatusChanged": {
"description": "Emitted whenever the update status changes.",
"params": {