docs: complete values for uptime kuma 1.19.2

This commit is contained in:
lucasheld 2022-12-30 21:37:10 +01:00
parent 4538901cea
commit c1d941a200
2 changed files with 132 additions and 106 deletions

View file

@ -17,7 +17,7 @@ class TestMaintenance(UptimeKumaTestCase):
expected_maintenance = { expected_maintenance = {
"title": "maintenance 1", "title": "maintenance 1",
"description": "test", "description": "test",
"strategy": "single", "strategy": MaintenanceStrategy.SINGLE,
"active": True, "active": True,
"intervalDay": 1, "intervalDay": 1,
"dateRange": [ "dateRange": [
@ -113,7 +113,7 @@ class TestMaintenance(UptimeKumaTestCase):
expected_maintenance = { expected_maintenance = {
"title": "test", "title": "test",
"description": "test", "description": "test",
"strategy": "manual", "strategy": MaintenanceStrategy.MANUAL,
"active": True, "active": True,
"intervalDay": 1, "intervalDay": 1,
"dateRange": [ "dateRange": [
@ -122,11 +122,13 @@ class TestMaintenance(UptimeKumaTestCase):
"timeRange": [ "timeRange": [
{ {
"hours": 2, "hours": 2,
"minutes": 0 "minutes": 0,
"seconds": 0
}, },
{ {
"hours": 3, "hours": 3,
"minutes": 0 "minutes": 0,
"seconds": 0
} }
], ],
"weekdays": [], "weekdays": [],
@ -138,7 +140,7 @@ class TestMaintenance(UptimeKumaTestCase):
expected_maintenance = { expected_maintenance = {
"title": "test", "title": "test",
"description": "test", "description": "test",
"strategy": "single", "strategy": MaintenanceStrategy.SINGLE,
"active": True, "active": True,
"intervalDay": 1, "intervalDay": 1,
"dateRange": [ "dateRange": [
@ -164,7 +166,7 @@ class TestMaintenance(UptimeKumaTestCase):
expected_maintenance = { expected_maintenance = {
"title": "test", "title": "test",
"description": "test", "description": "test",
"strategy": "recurring-interval", "strategy": MaintenanceStrategy.RECURRING_INTERVAL,
"active": True, "active": True,
"intervalDay": 1, "intervalDay": 1,
"dateRange": [ "dateRange": [
@ -190,7 +192,7 @@ class TestMaintenance(UptimeKumaTestCase):
expected_maintenance = { expected_maintenance = {
"title": "test", "title": "test",
"description": "test", "description": "test",
"strategy": "recurring-weekday", "strategy": MaintenanceStrategy.RECURRING_WEEKDAY,
"active": True, "active": True,
"intervalDay": 1, "intervalDay": 1,
"dateRange": [ "dateRange": [
@ -221,7 +223,7 @@ class TestMaintenance(UptimeKumaTestCase):
expected_maintenance = { expected_maintenance = {
"title": "test", "title": "test",
"description": "test", "description": "test",
"strategy": "recurring-day-of-month", "strategy": MaintenanceStrategy.RECURRING_DAY_OF_MONTH,
"active": True, "active": True,
"intervalDay": 1, "intervalDay": 1,
"dateRange": [ "dateRange": [

View file

@ -764,55 +764,61 @@ class UptimeKumaApi(object):
>>> api.get_monitors() >>> api.get_monitors()
[ [
{ {
'id': 1, 'accepted_statuscodes': ['200-299'],
'name': 'Google',
'url': 'https://google.com',
'method': 'GET',
'hostname': None,
'port': 53,
'maxretries': 0,
'weight': 2000,
'active': True, 'active': True,
'type': 'http', 'authDomain': None,
'interval': 60,
'retryInterval': 60,
'resendInterval': 0,
'keyword': None,
'expiryNotification': False,
'ignoreTls': False,
'upsideDown': False,
'maxredirects': 10,
'accepted_statuscodes': [
'200-299'
],
'dns_resolve_type': 'A',
'dns_resolve_server': '1.1.1.1',
'dns_last_result': None,
'pushToken': None,
'docker_container': None,
'docker_host': None,
'proxyId': None,
'notificationIDList': [],
'tags': [],
'maintenance': False,
'mqttUsername': None,
'mqttPassword': None,
'mqttTopic': None,
'mqttSuccessMessage': None,
'databaseConnectionString': None,
'databaseQuery': None,
'authMethod': '', 'authMethod': '',
'authWorkstation': None, 'authWorkstation': None,
'authDomain': None, 'basic_auth_pass': None,
'radiusUsername': None, 'basic_auth_user': None,
'radiusPassword': None, 'body': None,
'databaseConnectionString': None,
'databaseQuery': None,
'dns_last_result': None,
'dns_resolve_server': '1.1.1.1',
'dns_resolve_type': 'A',
'docker_container': None,
'docker_host': None,
'expiryNotification': False,
'grpcBody': None,
'grpcEnableTls': False,
'grpcMetadata': None,
'grpcMethod': None,
'grpcProtobuf': None,
'grpcServiceName': None,
'grpcUrl': None,
'headers': None,
'hostname': None,
'id': 1,
'ignoreTls': False,
'includeSensitiveData': True,
'interval': 60,
'keyword': None,
'maintenance': False,
'maxredirects': 10,
'maxretries': 0,
'method': 'GET',
'mqttPassword': None,
'mqttSuccessMessage': None,
'mqttTopic': None,
'mqttUsername': None,
'name': 'monitor 1',
'notificationIDList': [1, 2],
'port': None,
'proxyId': None,
'pushToken': None,
'radiusCalledStationId': None, 'radiusCalledStationId': None,
'radiusCallingStationId': None, 'radiusCallingStationId': None,
'radiusPassword': None,
'radiusSecret': None, 'radiusSecret': None,
'headers': None, 'radiusUsername': None,
'body': None, 'resendInterval': 0,
'basic_auth_user': None, 'retryInterval': 60,
'basic_auth_pass': None 'tags': [],
'type': 'http',
'upsideDown': False,
'url': 'http://127.0.0.1',
'weight': 2000
} }
] ]
""" """
@ -835,55 +841,61 @@ class UptimeKumaApi(object):
>>> api.get_monitor(1) >>> api.get_monitor(1)
{ {
'id': 1, 'accepted_statuscodes': ['200-299'],
'name': 'Google',
'url': 'https://google.com',
'method': 'GET',
'hostname': None,
'port': 53,
'maxretries': 0,
'weight': 2000,
'active': True, 'active': True,
'type': 'http', 'authDomain': None,
'interval': 60,
'retryInterval': 60,
'resendInterval': 0,
'keyword': None,
'expiryNotification': False,
'ignoreTls': False,
'upsideDown': False,
'maxredirects': 10,
'accepted_statuscodes': [
'200-299'
],
'dns_resolve_type': 'A',
'dns_resolve_server': '1.1.1.1',
'dns_last_result': None,
'pushToken': None,
'docker_container': None,
'docker_host': None,
'proxyId': None,
'notificationIDList': [],
'tags': [],
'maintenance': False,
'mqttUsername': None,
'mqttPassword': None,
'mqttTopic': None,
'mqttSuccessMessage': None,
'databaseConnectionString': None,
'databaseQuery': None,
'authMethod': '', 'authMethod': '',
'authWorkstation': None, 'authWorkstation': None,
'authDomain': None, 'basic_auth_pass': None,
'radiusUsername': None, 'basic_auth_user': None,
'radiusPassword': None, 'body': None,
'databaseConnectionString': None,
'databaseQuery': None,
'dns_last_result': None,
'dns_resolve_server': '1.1.1.1',
'dns_resolve_type': 'A',
'docker_container': None,
'docker_host': None,
'expiryNotification': False,
'grpcBody': None,
'grpcEnableTls': False,
'grpcMetadata': None,
'grpcMethod': None,
'grpcProtobuf': None,
'grpcServiceName': None,
'grpcUrl': None,
'headers': None,
'hostname': None,
'id': 1,
'ignoreTls': False,
'includeSensitiveData': True,
'interval': 60,
'keyword': None,
'maintenance': False,
'maxredirects': 10,
'maxretries': 0,
'method': 'GET',
'mqttPassword': None,
'mqttSuccessMessage': None,
'mqttTopic': None,
'mqttUsername': None,
'name': 'monitor 1',
'notificationIDList': [1, 2],
'port': None,
'proxyId': None,
'pushToken': None,
'radiusCalledStationId': None, 'radiusCalledStationId': None,
'radiusCallingStationId': None, 'radiusCallingStationId': None,
'radiusPassword': None,
'radiusSecret': None, 'radiusSecret': None,
'headers': None, 'radiusUsername': None,
'body': None, 'resendInterval': 0,
'basic_auth_user': None, 'retryInterval': 60,
'basic_auth_pass': None 'tags': [],
'type': 'http',
'upsideDown': False,
'url': 'http://127.0.0.1',
'weight': 2000
} }
""" """
r = self._call('getMonitor', id_)["monitor"] r = self._call('getMonitor', id_)["monitor"]
@ -2782,11 +2794,13 @@ class UptimeKumaApi(object):
... timeRange=[ ... timeRange=[
... { ... {
... "hours": 2, ... "hours": 2,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... }, ... },
... { ... {
... "hours": 3, ... "hours": 3,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... } ... }
... ], ... ],
... weekdays=[], ... weekdays=[],
@ -2812,11 +2826,13 @@ class UptimeKumaApi(object):
... timeRange=[ ... timeRange=[
... { ... {
... "hours": 2, ... "hours": 2,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... }, ... },
... { ... {
... "hours": 3, ... "hours": 3,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... } ... }
... ], ... ],
... weekdays=[], ... weekdays=[],
@ -2842,11 +2858,13 @@ class UptimeKumaApi(object):
... timeRange=[ ... timeRange=[
... { ... {
... "hours": 2, ... "hours": 2,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... }, ... },
... { ... {
... "hours": 3, ... "hours": 3,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... } ... }
... ], ... ],
... weekdays=[], ... weekdays=[],
@ -2872,11 +2890,13 @@ class UptimeKumaApi(object):
... timeRange=[ ... timeRange=[
... { ... {
... "hours": 2, ... "hours": 2,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... }, ... },
... { ... {
... "hours": 3, ... "hours": 3,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... } ... }
... ], ... ],
... weekdays=[ ... weekdays=[
@ -2907,11 +2927,13 @@ class UptimeKumaApi(object):
... timeRange=[ ... timeRange=[
... { ... {
... "hours": 2, ... "hours": 2,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... }, ... },
... { ... {
... "hours": 3, ... "hours": 3,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... } ... }
... ], ... ],
... weekdays=[], ... weekdays=[],
@ -2958,11 +2980,13 @@ class UptimeKumaApi(object):
... timeRange=[ ... timeRange=[
... { ... {
... "hours": 2, ... "hours": 2,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... }, ... },
... { ... {
... "hours": 3, ... "hours": 3,
... "minutes": 0 ... "minutes": 0,
... "seconds": 0
... } ... }
... ], ... ],
... weekdays=[], ... weekdays=[],