Main Interface¶
- class UptimeKumaApi(url: str, timeout: float = 10, headers: Optional[dict] = None, ssl_verify: bool = True, wait_events: float = 0.2)¶
This class is used to communicate with Uptime Kuma.
Example:
Import UptimeKumaApi from the library and specify the Uptime Kuma server url (e.g. ‘http://127.0.0.1:3001’), username and password to initialize the connection.
>>> from uptime_kuma_api import UptimeKumaApi >>> api = UptimeKumaApi('INSERT_URL') >>> api.login('INSERT_USERNAME', 'INSERT_PASSWORD') { 'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNjgyOTU4OTU4fQ.Xb81nuKXeNyE1D_XoQowYgsgZHka-edONdwHmIznJdk' }
Now you can call one of the existing methods of the instance. For example create a new monitor:
>>> api.add_monitor( ... type=MonitorType.HTTP, ... name="Google", ... url="https://google.com" ... ) { 'msg': 'Added Successfully.', 'monitorId': 1 }
At the end, the connection to the API must be disconnected so that the program does not block.
>>> api.disconnect()
With a context manager, the disconnect method is called automatically:
from uptime_kuma_api import UptimeKumaApi with UptimeKumaApi('INSERT_URL') as api: api.login('INSERT_USERNAME', 'INSERT_PASSWORD') api.add_monitor( type=MonitorType.HTTP, name="Google", url="https://google.com" )
- Parameters:
url (str) – The url to the Uptime Kuma instance. For example
http://127.0.0.1:3001timeout (float) – How many seconds the client should wait for the connection, an expected event or a server response. Default is
10.headers (dict) – Headers that are passed to the socketio connection, defaults to None
ssl_verify (bool) –
Trueto verify SSL certificates, orFalseto skip SSL certificate verification, allowing connections to servers with self signed certificates. Default isTrue.wait_events (float) – How many seconds the client should wait for the next event of the same type. There is no way to determine when the last message of a certain type has arrived. Therefore, a timeout is required. If no further message has arrived within this time, it is assumed that it was the last message. Defaults is
0.2.
- Raises:
UptimeKumaException – When connection to server failed.
- connect() None¶
Connects to Uptime Kuma.
Called automatically when the UptimeKumaApi instance is created.
- Raises:
UptimeKumaException – When connection to server failed.
- disconnect() None¶
Disconnects from Uptime Kuma.
Needs to be called to prevent blocking the program.
- get_monitors() list[dict]¶
Get all monitors.
- Returns:
A list of monitors.
- Return type:
list
Example:
>>> api.get_monitors() [ { 'accepted_statuscodes': ['200-299'], 'active': True, 'authDomain': None, 'authMethod': <AuthMethod.NONE: ''>, 'authWorkstation': None, 'basic_auth_pass': None, 'basic_auth_user': None, 'body': None, 'childrenIDs': [], 'databaseConnectionString': None, 'databaseQuery': None, 'description': None, 'dns_last_result': None, 'dns_resolve_server': '1.1.1.1', 'dns_resolve_type': 'A', 'docker_container': None, 'docker_host': None, 'expiryNotification': False, 'forceInactive': False, 'game': None, 'grpcBody': None, 'grpcEnableTls': False, 'grpcMetadata': None, 'grpcMethod': None, 'grpcProtobuf': None, 'grpcServiceName': None, 'grpcUrl': None, 'headers': None, 'hostname': None, 'httpBodyEncoding': 'json', '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], 'packetSize': 56, 'parent': None, 'pathName': 'monitor 1', 'port': None, 'proxyId': None, 'pushToken': None, 'radiusCalledStationId': None, 'radiusCallingStationId': None, 'radiusPassword': None, 'radiusSecret': None, 'radiusUsername': None, 'resendInterval': 0, 'retryInterval': 60, 'tags': [], 'tlsCa': None, 'tlsCert': None, 'tlsKey': None, 'type': <MonitorType.HTTP: 'http'>, 'upsideDown': False, 'url': 'http://127.0.0.1', 'weight': 2000 } ]
- get_monitor(id_: int) dict¶
Get a monitor.
- Parameters:
id (int) – The monitor id.
- Returns:
The monitor.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_monitor(1) { 'accepted_statuscodes': ['200-299'], 'active': True, 'authDomain': None, 'authMethod': <AuthMethod.NONE: ''>, 'authWorkstation': None, 'basic_auth_pass': None, 'basic_auth_user': None, 'body': None, 'childrenIDs': [], 'databaseConnectionString': None, 'databaseQuery': None, 'description': None, 'dns_last_result': None, 'dns_resolve_server': '1.1.1.1', 'dns_resolve_type': 'A', 'docker_container': None, 'docker_host': None, 'expectedValue': None, 'expiryNotification': False, 'forceInactive': False, 'game': None, 'gamedigGivenPortOnly': True, 'grpcBody': None, 'grpcEnableTls': False, 'grpcMetadata': None, 'grpcMethod': None, 'grpcProtobuf': None, 'grpcServiceName': None, 'grpcUrl': None, 'headers': None, 'hostname': None, 'httpBodyEncoding': 'json', 'id': 1, 'ignoreTls': False, 'includeSensitiveData': True, 'interval': 60, 'invertKeyword': False, 'jsonPath': None, 'kafkaProducerAllowAutoTopicCreation': False, 'kafkaProducerBrokers': None, 'kafkaProducerMessage': None, 'kafkaProducerSaslOptions': None, 'kafkaProducerSsl': False, 'kafkaProducerTopic': None, 'keyword': None, 'maintenance': False, 'maxredirects': 10, 'maxretries': 0, 'method': 'GET', 'mqttPassword': '', 'mqttSuccessMessage': '', 'mqttTopic': '', 'mqttUsername': '', 'name': 'monitor 1', 'notificationIDList': [1, 2], 'oauth_auth_method': None, 'oauth_client_id': None, 'oauth_client_secret': None, 'oauth_scopes': None, 'oauth_token_url': None, 'packetSize': 56, 'parent': None, 'pathName': 'monitor 1', 'port': None, 'proxyId': None, 'pushToken': None, 'radiusCalledStationId': None, 'radiusCallingStationId': None, 'radiusPassword': None, 'radiusSecret': None, 'radiusUsername': None, 'resendInterval': 0, 'retryInterval': 60, 'screenshot': None, 'tags': [], 'timeout': 48, 'tlsCa': None, 'tlsCert': None, 'tlsKey': None, 'type': <MonitorType.HTTP: 'http'>, 'upsideDown': False, 'url': 'http://127.0.0.1', 'weight': 2000 }
- pause_monitor(id_: int) dict¶
Pauses a monitor.
- Parameters:
id (int) – The monitor id.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.pause_monitor(1) { 'msg': 'Paused Successfully.' }
- resume_monitor(id_: int) dict¶
Resumes a monitor.
- Parameters:
id (int) – The monitor id.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.resume_monitor(1) { 'msg': 'Resumed Successfully.' }
- delete_monitor(id_: int) dict¶
Deletes a monitor.
- Parameters:
id (int) – The monitor id.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.delete_monitor(1) { 'msg': 'Deleted Successfully.' }
- get_monitor_beats(id_: int, hours: int) list[dict]¶
Get monitor beats for a specific monitor in a time range.
- Parameters:
id (int) – The monitor id.
hours (int) – Period time in hours from now.
- Returns:
The server response.
- Return type:
list
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_monitor_beats(1, 6) [ { 'down_count': 0, 'duration': 0, 'id': 25, 'important': True, 'monitor_id': 1, 'msg': '200 - OK', 'ping': 201, 'status': <MonitorStatus.UP: 1>, 'time': '2022-12-15 12:38:42.661' }, { 'down_count': 0, 'duration': 60, 'id': 26, 'important': False, 'monitor_id': 1, 'msg': '200 - OK', 'ping': 193, 'status': <MonitorStatus.UP: 1>, 'time': '2022-12-15 12:39:42.878' }, ... ]
- get_game_list() list[dict]¶
Get a list of games that are supported by the GameDig monitor type.
- Returns:
The server response.
- Return type:
list
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_game_list() [ { 'extra': {}, 'keys': ['7d2d'], 'options': { 'port': 26900, 'port_query_offset': 1, 'protocol': 'valve' }, 'pretty': '7 Days to Die (2013)' }, { 'extra': {}, 'keys': ['arma2'], 'options': { 'port': 2302, 'port_query_offset': 1, 'protocol': 'valve' }, 'pretty': 'ARMA 2 (2009)' }, ... ]
- test_chrome(executable) dict¶
Test if the chrome executable is valid and return the version.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.test_chrome("/usr/bin/chromium") { 'msg': 'Found Chromium/Chrome. Version: 90.0.4430.212' }
- add_monitor(**kwargs) dict¶
Adds a new monitor.
- Parameters:
type (MonitorType) – Monitor Type
name (str) – Friendly Name
parent (str, optional) – Id of the monitor group, defaults to None
description (str, optional) – Description, defaults to None
interval (int, optional) – Heartbeat Interval, defaults to 60
retryInterval (int, optional) – Retry every X seconds, defaults to 60
resendInterval (int, optional) – Resend every X times, defaults to 0
maxretries (int, optional) – Retries. Maximum retries before the service is marked as down and a notification is sent., defaults to 0
upsideDown (bool, optional) – Upside Down Mode. Flip the status upside down. If the service is reachable, it is DOWN., defaults to False
notificationIDList (list, optional) – Notifications, defaults to None
url (str, optional) – URL, defaults to None
expiryNotification (bool, optional) – Certificate Expiry Notification, defaults to False
ignoreTls (bool, optional) – Ignore TLS/SSL error for HTTPS websites, defaults to False
maxredirects (int, optional) – Max. Redirects. Maximum number of redirects to follow. Set to 0 to disable redirects., defaults to 10
accepted_statuscodes (list, optional) – Accepted Status Codes. Select status codes which are considered as a successful response., defaults to None
proxyId (int, optional) – Proxy, defaults to None
method (str, optional) – Method, defaults to “GET”
httpBodyEncoding (str, optional) – Body Encoding, defaults to “json”. Allowed values: “json”, “xml”.
body (str, optional) – Body, defaults to None
headers (str, optional) – Headers, defaults to None
authMethod (AuthMethod, optional) – Method, defaults to
NONEtlsCert (str, optional) – Cert for
authMethodMTLS, defaults to None.tlsKey (str, optional) – Key for
authMethodMTLS, defaults to None.tlsCa (str, optional) – Ca for
authMethodMTLS, defaults to None.basic_auth_user (str, optional) – Username for
authMethodHTTP_BASICandNTLM, defaults to Nonebasic_auth_pass (str, optional) – Password for
authMethodHTTP_BASICandNTLM, defaults to NoneauthDomain (str, optional) – Domain for
authMethodNTLM, defaults to NoneauthWorkstation (str, optional) – Workstation for
authMethodNTLM, defaults to Noneoauth_auth_method (str, optional) – Authentication Method, defaults to None
oauth_token_url (str, optional) – OAuth Token URL, defaults to None
oauth_client_id (str, optional) – Client ID, defaults to None
oauth_client_secret (str, optional) – Client Secret, defaults to None
oauth_scopes (str, optional) – OAuth Scope, defaults to None
timeout (int, optional) – Request Timeout, defaults to None
keyword (str, optional) – Keyword. Search keyword in plain HTML or JSON response. The search is case-sensitive., defaults to None
invertKeyword (bool, optional) – Invert Keyword. Look for the keyword to be absent rather than present., defaults to False
hostname (str, optional) – Hostname, defaults to None
packetSize (int, optional) – Packet Size, defaults to None
port (int, optional) – Port,
typeDNSdefaults to53andtypeRADIUSdefaults to1812dns_resolve_server (str, optional) – Resolver Server, defaults to “1.1.1.1”
dns_resolve_type (str, optional) –
Resource Record Type, defaults to “A”. Available values are:
”A”
”AAAA”
”CAA”
”CNAME”
”MX”
”NS”
”PTR”
”SOA”
”SRV”
”TXT”
mqttUsername (str, optional) – MQTT Username, defaults to None
mqttPassword (str, optional) – MQTT Password, defaults to None
mqttTopic (str, optional) – MQTT Topic, defaults to None
mqttSuccessMessage (str, optional) – MQTT Success Message, defaults to None
databaseConnectionString (str, optional) – Connection String, defaults to None
databaseQuery (str, optional) – Query, defaults to None
docker_container (str, optional) – Container Name / ID, defaults to “”
docker_host (int, optional) – Docker Host, defaults to None
radiusUsername (str, optional) – Radius Username, defaults to None
radiusPassword (str, optional) – Radius Password, defaults to None
radiusSecret (str, optional) – Radius Secret. Shared Secret between client and server., defaults to None
radiusCalledStationId (str, optional) – Called Station Id. Identifier of the called device., defaults to None
radiusCallingStationId (str, optional) – Calling Station Id. Identifier of the calling device., defaults to None
game (str, optional) – Game, defaults to None
gamedigGivenPortOnly (bool, optional) – Gamedig: Guess Port. The port used by Valve Server Query Protocol may be different from the client port. Try this if the monitor cannot connect to your server., defaults to False
jsonPath (str, optional) – Json Query, defaults to None
expectedValue (str, optional) – Expected Value, defaults to None
kafkaProducerBrokers (str, optional) – Kafka Broker list, defaults to None
kafkaProducerTopic (str, optional) – Kafka Topic Name, defaults to None
kafkaProducerMessage (str, optional) – Kafka Producer Message, defaults to None
kafkaProducerSsl (bool, optional) – Enable Kafka SSL, defaults to False
kafkaProducerAllowAutoTopicCreation (bool, optional) – Enable Kafka Producer Auto Topic Creation, defaults to False
kafkaProducerSaslOptions (dict, optional) –
Kafka SASL Options
mechanism (str, optional): Mechanism, defaults to “None”. Available values are:
”None”
”plain”
”scram-sha-256”
”scram-sha-512”
”aws”
username (str, optional): Username, defaults to None
password (str, optional): Password, defaults to None
authorizationIdentity (str, optional): Authorization Identity, defaults to None
accessKeyId (str, optional): AccessKey Id, defaults to None
secretAccessKey (str, optional): Secret AccessKey, defaults to None
sessionToken (str, optional): Session Token, defaults to None
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.add_monitor( ... type=MonitorType.HTTP, ... name="Google", ... url="https://google.com" ... ) { 'msg': 'Added Successfully.', 'monitorID': 1 }
- edit_monitor(id_: int, **kwargs) dict¶
Edits an existing monitor.
- Parameters:
id (int) – The monitor id.
type (MonitorType, optional) – Monitor Type
name (str, optional) – Friendly Name
parent (str, optional) – Id of the monitor group, defaults to None
description (str, optional) – Description, defaults to None
interval (int, optional) – Heartbeat Interval, defaults to 60
retryInterval (int, optional) – Retry every X seconds, defaults to 60
resendInterval (int, optional) – Resend every X times, defaults to 0
maxretries (int, optional) – Retries. Maximum retries before the service is marked as down and a notification is sent., defaults to 0
upsideDown (bool, optional) – Upside Down Mode. Flip the status upside down. If the service is reachable, it is DOWN., defaults to False
notificationIDList (list, optional) – Notifications, defaults to None
url (str, optional) – URL, defaults to None
expiryNotification (bool, optional) – Certificate Expiry Notification, defaults to False
ignoreTls (bool, optional) – Ignore TLS/SSL error for HTTPS websites, defaults to False
maxredirects (int, optional) – Max. Redirects. Maximum number of redirects to follow. Set to 0 to disable redirects., defaults to 10
accepted_statuscodes (list, optional) – Accepted Status Codes. Select status codes which are considered as a successful response., defaults to None
proxyId (int, optional) – Proxy, defaults to None
method (str, optional) – Method, defaults to “GET”
httpBodyEncoding (str, optional) – Body Encoding, defaults to “json”. Allowed values: “json”, “xml”.
body (str, optional) – Body, defaults to None
headers (str, optional) – Headers, defaults to None
authMethod (AuthMethod, optional) – Method, defaults to
NONEtlsCert (str, optional) – Cert for
authMethodMTLS, defaults to None.tlsKey (str, optional) – Key for
authMethodMTLS, defaults to None.tlsCa (str, optional) – Ca for
authMethodMTLS, defaults to None.basic_auth_user (str, optional) – Username for
authMethodHTTP_BASICandNTLM, defaults to Nonebasic_auth_pass (str, optional) – Password for
authMethodHTTP_BASICandNTLM, defaults to NoneauthDomain (str, optional) – Domain for
authMethodNTLM, defaults to NoneauthWorkstation (str, optional) – Workstation for
authMethodNTLM, defaults to Noneoauth_auth_method (str, optional) – Authentication Method, defaults to None
oauth_token_url (str, optional) – OAuth Token URL, defaults to None
oauth_client_id (str, optional) – Client ID, defaults to None
oauth_client_secret (str, optional) – Client Secret, defaults to None
oauth_scopes (str, optional) – OAuth Scope, defaults to None
timeout (int, optional) – Request Timeout, defaults to None
keyword (str, optional) – Keyword. Search keyword in plain HTML or JSON response. The search is case-sensitive., defaults to None
invertKeyword (bool, optional) – Invert Keyword. Look for the keyword to be absent rather than present., defaults to False
hostname (str, optional) – Hostname, defaults to None
packetSize (int, optional) – Packet Size, defaults to None
port (int, optional) – Port,
typeDNSdefaults to53andtypeRADIUSdefaults to1812dns_resolve_server (str, optional) – Resolver Server, defaults to “1.1.1.1”
dns_resolve_type (str, optional) –
Resource Record Type, defaults to “A”. Available values are:
”A”
”AAAA”
”CAA”
”CNAME”
”MX”
”NS”
”PTR”
”SOA”
”SRV”
”TXT”
mqttUsername (str, optional) – MQTT Username, defaults to None
mqttPassword (str, optional) – MQTT Password, defaults to None
mqttTopic (str, optional) – MQTT Topic, defaults to None
mqttSuccessMessage (str, optional) – MQTT Success Message, defaults to None
databaseConnectionString (str, optional) – Connection String, defaults to None
databaseQuery (str, optional) – Query, defaults to None
docker_container (str, optional) – Container Name / ID, defaults to “”
docker_host (int, optional) – Docker Host, defaults to None
radiusUsername (str, optional) – Radius Username, defaults to None
radiusPassword (str, optional) – Radius Password, defaults to None
radiusSecret (str, optional) – Radius Secret. Shared Secret between client and server., defaults to None
radiusCalledStationId (str, optional) – Called Station Id. Identifier of the called device., defaults to None
radiusCallingStationId (str, optional) – Calling Station Id. Identifier of the calling device., defaults to None
game (str, optional) – Game, defaults to None
gamedigGivenPortOnly (bool, optional) – Gamedig: Guess Port. The port used by Valve Server Query Protocol may be different from the client port. Try this if the monitor cannot connect to your server., defaults to False
jsonPath (str, optional) – Json Query, defaults to None
expectedValue (str, optional) – Expected Value, defaults to None
kafkaProducerBrokers (str, optional) – Kafka Broker list, defaults to None
kafkaProducerTopic (str, optional) – Kafka Topic Name, defaults to None
kafkaProducerMessage (str, optional) – Kafka Producer Message, defaults to None
kafkaProducerSsl (bool, optional) – Enable Kafka SSL, defaults to False
kafkaProducerAllowAutoTopicCreation (bool, optional) – Enable Kafka Producer Auto Topic Creation, defaults to False
kafkaProducerSaslOptions (dict, optional) –
Kafka SASL Options
mechanism (str, optional): Mechanism, defaults to “None”. Available values are:
”None”
”plain”
”scram-sha-256”
”scram-sha-512”
”aws”
username (str, optional): Username, defaults to None
password (str, optional): Password, defaults to None
authorizationIdentity (str, optional): Authorization Identity, defaults to None
accessKeyId (str, optional): AccessKey Id, defaults to None
secretAccessKey (str, optional): Secret AccessKey, defaults to None
sessionToken (str, optional): Session Token, defaults to None
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.edit_monitor(1, ... interval=20 ... ) { 'monitorID': 1, 'msg': 'Saved.' }
- add_monitor_tag(tag_id: int, monitor_id: int, value: str = '') dict¶
Add a tag to a monitor.
- Parameters:
tag_id (int) – Id of the tag.
monitor_id (int) – Id of the monitor to add the tag to.
value (str, optional) – Value of the tag., defaults to “”
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.add_monitor_tag( ... tag_id=1, ... monitor_id=1, ... value="test" ... ) { 'msg': 'Added Successfully.' }
- delete_monitor_tag(tag_id: int, monitor_id: int, value: str = '') dict¶
Delete a tag from a monitor.
- Parameters:
tag_id (int) – Id of the tag to remove.
monitor_id (int) – Id of monitor to remove the tag from.
value (str, optional) – Value of the tag., defaults to “”
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.delete_monitor_tag( ... tag_id=1, ... monitor_id=1, ... value="test" ... ) { 'msg': 'Deleted Successfully.' }
- get_notifications() list[dict]¶
Get all notifications.
- Returns:
All notifications.
- Return type:
list
Example:
>>> api.get_notifications() [ { 'active': True, 'applyExisting': True, 'id': 1, 'isDefault': True, 'name': 'notification 1', 'pushAPIKey': '123456789', 'type': <NotificationType.PUSHBYTECHULUS: 'PushByTechulus'> 'userId': 1 } ]
- get_notification(id_: int) dict¶
Get a notification.
- Parameters:
id (int) – Id of the notification to get.
- Returns:
The notification.
- Return type:
dict
- Raises:
UptimeKumaException – If the notification does not exist.
Example:
>>> api.get_notification(1) { 'active': True, 'applyExisting': True, 'id': 1, 'isDefault': True, 'name': 'notification 1', 'pushAPIKey': '123456789', 'type': <NotificationType.PUSHBYTECHULUS: 'PushByTechulus'> 'userId': 1 }
- test_notification(**kwargs) dict¶
Test a notification.
- Parameters:
name (str) – Friendly Name
type (NotificationType) – Notification Type
isDefault (bool, optional) – Default enabled. This notification will be enabled by default for new monitors. You can still disable the notification separately for each monitor., defaults to False
applyExisting (bool, optional) – Apply on all existing monitors, defaults to False
alertaApiEndpoint (str, optional) – Notification option for
typeALERTA.alertaApiKey (str, optional) – Notification option for
typeALERTA.alertaEnvironment (str, optional) – Notification option for
typeALERTA.alertaAlertState (str, optional) – Notification option for
typeALERTA.alertaRecoverState (str, optional) – Notification option for
typeALERTA.alertNowWebhookURL (str, optional) – Notification option for
typeALERTNOW.phonenumber (str, optional) – Notification option for
typeALIYUNSMS.templateCode (str, optional) – Notification option for
typeALIYUNSMS.signName (str, optional) – Notification option for
typeALIYUNSMS.accessKeyId (str, optional) – Notification option for
typeALIYUNSMS.secretAccessKey (str, optional) – Notification option for
typeALIYUNSMS.appriseURL (str, optional) – Notification option for
typeAPPRISE.title (str) – Notification option for
typeAPPRISE.barkEndpoint (str, optional) – Notification option for
typeBARK.barkGroup (str, optional) – Notification option for
typeBARK.barkSound (str, optional) – Notification option for
typeBARK.clicksendsmsLogin (str, optional) – Notification option for
typeCLICKSENDSMS.clicksendsmsPassword (str, optional) – Notification option for
typeCLICKSENDSMS.clicksendsmsToNumber (str, optional) – Notification option for
typeCLICKSENDSMS.clicksendsmsSenderName (str) – Notification option for
typeCLICKSENDSMS.webHookUrl (str, optional) – Notification option for
typeDINGDING.secretKey (str, optional) – Notification option for
typeDINGDING.discordUsername (str) – Notification option for
typeDISCORD.discordWebhookUrl (str, optional) – Notification option for
typeDISCORD.discordPrefixMessage (str) – Notification option for
typeDISCORD.feishuWebHookUrl (str, optional) – Notification option for
typeFEISHU.flashdutySeverity (str, optional) – Notification option for
typeFLASHDUTY.flashdutyIntegrationKey (str) – Notification option for
typeFLASHDUTY.freemobileUser (str, optional) – Notification option for
typeFREEMOBILE.freemobilePass (str, optional) – Notification option for
typeFREEMOBILE.goAlertBaseURL (str, optional) – Notification option for
typeGOALERT.goAlertToken (str, optional) – Notification option for
typeGOALERT.googleChatWebhookURL (str, optional) – Notification option for
typeGOOGLECHAT.gorushDeviceToken (str, optional) – Notification option for
typeGORUSH.gorushPlatform (str) – Notification option for
typeGORUSH.gorushTitle (str) – Notification option for
typeGORUSH.gorushPriority (str) – Notification option for
typeGORUSH.gorushRetry (int) – Notification option for
typeGORUSH.gorushTopic (str) – Notification option for
typeGORUSH.gorushServerURL (str, optional) – Notification option for
typeGORUSH.gotifyserverurl (str, optional) – Notification option for
typeGOTIFY.gotifyapplicationToken (str, optional) – Notification option for
typeGOTIFY.gotifyPriority (int, optional) – Notification option for
typeGOTIFY.notificationService (str) – Notification option for
typeHOMEASSISTANT.homeAssistantUrl (str, optional) – Notification option for
typeHOMEASSISTANT.longLivedAccessToken (str, optional) – Notification option for
typeHOMEASSISTANT.kookGuildID (str, optional) – Notification option for
typeKOOK.kookBotToken (str, optional) – Notification option for
typeKOOK.lineChannelAccessToken (str, optional) – Notification option for
typeLINE.lineUserID (str, optional) – Notification option for
typeLINE.lineNotifyAccessToken (str, optional) – Notification option for
typeLINENOTIFY.lunaseaTarget (str, optional) – Notification option for
typeLUNASEA. Allowed values: “device”, “user”.lunaseaUserID (str) – Notification option for
typeLUNASEA. User ID.lunaseaDevice (str) – Notification option for
typeLUNASEA. Device ID.internalRoomId (str, optional) – Notification option for
typeMATRIX.accessToken (str, optional) – Notification option for
typeMATRIX.homeserverUrl (str, optional) – Notification option for
typeMATRIX.mattermostusername (str) – Notification option for
typeMATTERMOST.mattermostWebhookUrl (str, optional) – Notification option for
typeMATTERMOST.mattermostchannel (str) – Notification option for
typeMATTERMOST.mattermosticonemo (str) – Notification option for
typeMATTERMOST.mattermosticonurl (str) – Notification option for
typeMATTERMOST.sender (str, optional) – Notification option for
typeNOSTR.recipients (str, optional) – Notification option for
typeNOSTR.relays (str, optional) – Notification option for
typeNOSTR.ntfyAuthenticationMethod (str) – Notification option for
typeNTFY. Authentication Method.ntfyusername (str) – Notification option for
typeNTFY.ntfypassword (str) – Notification option for
typeNTFY.ntfyaccesstoken (str) – Notification option for
typeNTFY. Access Token.ntfytopic (str, optional) – Notification option for
typeNTFY.ntfyPriority (int, optional) – Notification option for
typeNTFY.ntfyserverurl (str, optional) – Notification option for
typeNTFY.ntfyIcon (str) – Notification option for
typeNTFY.octopushVersion (str) – Notification option for
typeOCTOPUSH.octopushAPIKey (str, optional) – Notification option for
typeOCTOPUSH.octopushLogin (str, optional) – Notification option for
typeOCTOPUSH.octopushPhoneNumber (str, optional) – Notification option for
typeOCTOPUSH.octopushSMSType (str) – Notification option for
typeOCTOPUSH.octopushSenderName (str) – Notification option for
typeOCTOPUSH.httpAddr (str, optional) – Notification option for
typeONEBOT.accessToken – Notification option for
typeONEBOT.msgType (str) – Notification option for
typeONEBOT.recieverId (str, optional) – Notification option for
typeONEBOT.opsgeniePriority (int) – Notification option for
typeOPSGENIE. Priority. Available values are numbers between1and5.opsgenieRegion (str, optional) –
Notification option for
typeOPSGENIE. Region. Available values are:us: US (Default)eu: EU
opsgenieApiKey (str, optional) – Notification option for
typeOPSGENIE. API Key.pagerdutyAutoResolve (str) – Notification option for
typePAGERDUTY.pagerdutyIntegrationUrl (str) – Notification option for
typePAGERDUTY.pagerdutyPriority (str) – Notification option for
typePAGERDUTY.pagerdutyIntegrationKey (str, optional) – Notification option for
typePAGERDUTY.pagertreeAutoResolve (str) –
Notification option for
typePAGERTREE.Available values are:
0: Do Nothingresolve: Auto Resolve
pagertreeIntegrationUrl (str) – Notification option for
typePAGERTREE.pagertreeUrgency (str) –
Notification option for
typePAGERTREE.Available values are:
silent: Silentlow: Lowmedium: Mediumhigh: Highcritical: Critical
promosmsAllowLongSMS (bool) – Notification option for
typePROMOSMS. Allow long SMS.promosmsLogin (str, optional) – Notification option for
typePROMOSMS.promosmsPassword (str, optional) – Notification option for
typePROMOSMS.promosmsPhoneNumber (str, optional) – Notification option for
typePROMOSMS. Phone number (for Polish recipient You can skip area codes).promosmsSMSType (str) –
Notification option for
typePROMOSMS.Available values are:
0: SMS FLASH - Message will automatically show on recipient device. Limited only to Polish recipients.1: SMS ECO - cheap but slow and often overloaded. Limited only to Polish recipients.3: SMS FULL - Premium tier of SMS, You can use your Sender Name (You need to register name first). Reliable for alerts.4: SMS SPEED - Highest priority in system. Very quick and reliable but costly (about twice of SMS FULL price).
promosmsSenderName (str) – Notification option for
typePROMOSMS.pushbulletAccessToken (str, optional) – Notification option for
typePUSHBULLET.pushdeerServer (str) – Notification option for
typePUSHDEER.pushdeerKey (str, optional) – Notification option for
typePUSHDEER.pushoveruserkey (str, optional) – Notification option for
typePUSHOVER.pushoverapptoken (str, optional) – Notification option for
typePUSHOVER.pushoversounds (str) – Notification option for
typePUSHOVER.pushoverpriority (str) – Notification option for
typePUSHOVER.pushovertitle (str) – Notification option for
typePUSHOVER.pushoverdevice (str) – Notification option for
typePUSHOVER.pushoverttl (int) – Notification option for
typePUSHOVER. Message TTL (Seconds).pushyAPIKey (str, optional) – Notification option for
typePUSHY.pushyToken (str, optional) – Notification option for
typePUSHY.rocketchannel (str) – Notification option for
typeROCKET_CHAT.rocketusername (str) – Notification option for
typeROCKET_CHAT.rocketiconemo (str) – Notification option for
typeROCKET_CHAT.rocketwebhookURL (str, optional) – Notification option for
typeROCKET_CHAT.serverChanSendKey (str, optional) – Notification option for
typeSERVERCHAN.serwersmsUsername (str, optional) – Notification option for
typeSERWERSMS.serwersmsPassword (str, optional) – Notification option for
typeSERWERSMS.serwersmsPhoneNumber (str, optional) – Notification option for
typeSERWERSMS.serwersmsSenderName (str) – Notification option for
typeSERWERSMS.signalNumber (str, optional) – Notification option for
typeSIGNAL.signalRecipients (str, optional) – Notification option for
typeSIGNAL.signalURL (str, optional) – Notification option for
typeSIGNAL.slackchannelnotify (bool) – Notification option for
typeSLACK.slackchannel (str) – Notification option for
typeSLACK.slackusername (str) – Notification option for
typeSLACK.slackiconemo (str) – Notification option for
typeSLACK.slackwebhookURL (str, optional) – Notification option for
typeSLACK.smscTranslit (str) – Notification option for
typeSMSC.smscLogin (str, optional) – Notification option for
typeSMSC.smscPassword (str, optional) – Notification option for
typeSMSC.smscToNumber (str, optional) – Notification option for
typeSMSC.smscSenderName (str) – Notification option for
typeSMSC.smseagleEncoding (bool) – Notification option for
typeSMSEAGLE. True to send messages in unicode.smseaglePriority (int) – Notification option for
typeSMSEAGLE. Message priority (0-9, default = 0).smseagleRecipientType (str) –
Notification option for
typeSMSEAGLE. Recipient type.Available values are:
smseagle-to: Phone number(s)smseagle-group: Phonebook group name(s)smseagle-contact: Phonebook contact name(s)
smseagleToken (str, optional) – Notification option for
typeSMSEAGLE. API Access token.smseagleRecipient (str, optional) – Notification option for
typeSMSEAGLE. Recipient(s) (multiple must be separated with comma).smseagleUrl (str, optional) – Notification option for
typeSMSEAGLE. Your SMSEagle device URL.smsmanagerApiKey (str) – Notification option for
typeSMSMANAGER.numbers (str) – Notification option for
typeSMSMANAGER.messageType (str) – Notification option for
typeSMSMANAGER.smtpHost (str, optional) – Notification option for
typeSMTP.smtpPort (int, optional) – Notification option for
typeSMTP.smtpSecure (str) – Notification option for
typeSMTP.smtpIgnoreTLSError (bool) – Notification option for
typeSMTP.smtpDkimDomain (str) – Notification option for
typeSMTP.smtpDkimKeySelector (str) – Notification option for
typeSMTP.smtpDkimPrivateKey (str) – Notification option for
typeSMTP.smtpDkimHashAlgo (str) – Notification option for
typeSMTP.smtpDkimheaderFieldNames (str) – Notification option for
typeSMTP.smtpDkimskipFields (str) – Notification option for
typeSMTP.smtpUsername (str) – Notification option for
typeSMTP.smtpPassword (str) – Notification option for
typeSMTP.customSubject (str) – Notification option for
typeSMTP.smtpFrom (str, optional) – Notification option for
typeSMTP.smtpCC (str) – Notification option for
typeSMTP.smtpBCC (str) – Notification option for
typeSMTP.smtpTo (str) – Notification option for
typeSMTP.splunkAutoResolve (str) –
Notification option for
typeSPLUNK. Auto resolve or acknowledged.Available values are:
0: do nothingACKNOWLEDGEMENT: auto acknowledgedRECOVERY: auto resolve
splunkSeverity (str) –
Notification option for
typeSPLUNK. Severity.Available values are:
INFOWARNINGCRITICAL
splunkRestURL (str, optional) – Notification option for
typeSPLUNK. Splunk Rest URL.squadcastWebhookURL (str, optional) – Notification option for
typeSQUADCAST.stackfieldwebhookURL (str, optional) – Notification option for
typeSTACKFIELD.webhookUrl (str, optional) – Notification option for
typeTEAMS.pushAPIKey (str, optional) – Notification option for
typePUSHBYTECHULUS.telegramChatID (str, optional) – Notification option for
typeTELEGRAM.telegramSendSilently (bool) – Notification option for
typeTELEGRAM.telegramProtectContent (bool) – Notification option for
typeTELEGRAM.telegramMessageThreadID (str) – Notification option for
typeTELEGRAM.telegramBotToken (str, optional) – Notification option for
typeTELEGRAM.twilioAccountSID (str, optional) – Notification option for
typeTWILIO. Account SID.twilioApiKey (str) – Notification option for
typeTWILIO.twilioAuthToken (str, optional) – Notification option for
typeTWILIO. Auth Token.twilioToNumber (str, optional) – Notification option for
typeTWILIO. To Number.twilioFromNumber (str, optional) – Notification option for
typeTWILIO. From Number.webhookContentType (str, optional) – Notification option for
typeWEBHOOK.webhookCustomBody (str) – Notification option for
typeWEBHOOK.webhookAdditionalHeaders (str) – Notification option for
typeWEBHOOK.webhookURL (str, optional) – Notification option for
typeWEBHOOK.weComBotKey (str, optional) – Notification option for
typeWECOM.webhookUrl – Notification option for
typeZOHOCLIQ.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.test_notification( ... name="notification 1", ... isDefault=True, ... applyExisting=True, ... type=NotificationType.PUSHBYTECHULUS, ... pushAPIKey="INSERT_PUSH_API_KEY" ... ) { 'ok': True, 'msg': 'Sent Successfully.' }
- add_notification(**kwargs) dict¶
Add a notification.
- Parameters:
name (str) – Friendly Name
type (NotificationType) – Notification Type
isDefault (bool, optional) – Default enabled. This notification will be enabled by default for new monitors. You can still disable the notification separately for each monitor., defaults to False
applyExisting (bool, optional) – Apply on all existing monitors, defaults to False
alertaApiEndpoint (str, optional) – Notification option for
typeALERTA.alertaApiKey (str, optional) – Notification option for
typeALERTA.alertaEnvironment (str, optional) – Notification option for
typeALERTA.alertaAlertState (str, optional) – Notification option for
typeALERTA.alertaRecoverState (str, optional) – Notification option for
typeALERTA.alertNowWebhookURL (str, optional) – Notification option for
typeALERTNOW.phonenumber (str, optional) – Notification option for
typeALIYUNSMS.templateCode (str, optional) – Notification option for
typeALIYUNSMS.signName (str, optional) – Notification option for
typeALIYUNSMS.accessKeyId (str, optional) – Notification option for
typeALIYUNSMS.secretAccessKey (str, optional) – Notification option for
typeALIYUNSMS.appriseURL (str, optional) – Notification option for
typeAPPRISE.title (str) – Notification option for
typeAPPRISE.barkEndpoint (str, optional) – Notification option for
typeBARK.barkGroup (str, optional) – Notification option for
typeBARK.barkSound (str, optional) – Notification option for
typeBARK.clicksendsmsLogin (str, optional) – Notification option for
typeCLICKSENDSMS.clicksendsmsPassword (str, optional) – Notification option for
typeCLICKSENDSMS.clicksendsmsToNumber (str, optional) – Notification option for
typeCLICKSENDSMS.clicksendsmsSenderName (str) – Notification option for
typeCLICKSENDSMS.webHookUrl (str, optional) – Notification option for
typeDINGDING.secretKey (str, optional) – Notification option for
typeDINGDING.discordUsername (str) – Notification option for
typeDISCORD.discordWebhookUrl (str, optional) – Notification option for
typeDISCORD.discordPrefixMessage (str) – Notification option for
typeDISCORD.feishuWebHookUrl (str, optional) – Notification option for
typeFEISHU.flashdutySeverity (str, optional) – Notification option for
typeFLASHDUTY.flashdutyIntegrationKey (str) – Notification option for
typeFLASHDUTY.freemobileUser (str, optional) – Notification option for
typeFREEMOBILE.freemobilePass (str, optional) – Notification option for
typeFREEMOBILE.goAlertBaseURL (str, optional) – Notification option for
typeGOALERT.goAlertToken (str, optional) – Notification option for
typeGOALERT.googleChatWebhookURL (str, optional) – Notification option for
typeGOOGLECHAT.gorushDeviceToken (str, optional) – Notification option for
typeGORUSH.gorushPlatform (str) – Notification option for
typeGORUSH.gorushTitle (str) – Notification option for
typeGORUSH.gorushPriority (str) – Notification option for
typeGORUSH.gorushRetry (int) – Notification option for
typeGORUSH.gorushTopic (str) – Notification option for
typeGORUSH.gorushServerURL (str, optional) – Notification option for
typeGORUSH.gotifyserverurl (str, optional) – Notification option for
typeGOTIFY.gotifyapplicationToken (str, optional) – Notification option for
typeGOTIFY.gotifyPriority (int, optional) – Notification option for
typeGOTIFY.notificationService (str) – Notification option for
typeHOMEASSISTANT.homeAssistantUrl (str, optional) – Notification option for
typeHOMEASSISTANT.longLivedAccessToken (str, optional) – Notification option for
typeHOMEASSISTANT.kookGuildID (str, optional) – Notification option for
typeKOOK.kookBotToken (str, optional) – Notification option for
typeKOOK.lineChannelAccessToken (str, optional) – Notification option for
typeLINE.lineUserID (str, optional) – Notification option for
typeLINE.lineNotifyAccessToken (str, optional) – Notification option for
typeLINENOTIFY.lunaseaTarget (str, optional) – Notification option for
typeLUNASEA. Allowed values: “device”, “user”.lunaseaUserID (str) – Notification option for
typeLUNASEA. User ID.lunaseaDevice (str) – Notification option for
typeLUNASEA. Device ID.internalRoomId (str, optional) – Notification option for
typeMATRIX.accessToken (str, optional) – Notification option for
typeMATRIX.homeserverUrl (str, optional) – Notification option for
typeMATRIX.mattermostusername (str) – Notification option for
typeMATTERMOST.mattermostWebhookUrl (str, optional) – Notification option for
typeMATTERMOST.mattermostchannel (str) – Notification option for
typeMATTERMOST.mattermosticonemo (str) – Notification option for
typeMATTERMOST.mattermosticonurl (str) – Notification option for
typeMATTERMOST.sender (str, optional) – Notification option for
typeNOSTR.recipients (str, optional) – Notification option for
typeNOSTR.relays (str, optional) – Notification option for
typeNOSTR.ntfyAuthenticationMethod (str) – Notification option for
typeNTFY. Authentication Method.ntfyusername (str) – Notification option for
typeNTFY.ntfypassword (str) – Notification option for
typeNTFY.ntfyaccesstoken (str) – Notification option for
typeNTFY. Access Token.ntfytopic (str, optional) – Notification option for
typeNTFY.ntfyPriority (int, optional) – Notification option for
typeNTFY.ntfyserverurl (str, optional) – Notification option for
typeNTFY.ntfyIcon (str) – Notification option for
typeNTFY.octopushVersion (str) – Notification option for
typeOCTOPUSH.octopushAPIKey (str, optional) – Notification option for
typeOCTOPUSH.octopushLogin (str, optional) – Notification option for
typeOCTOPUSH.octopushPhoneNumber (str, optional) – Notification option for
typeOCTOPUSH.octopushSMSType (str) – Notification option for
typeOCTOPUSH.octopushSenderName (str) – Notification option for
typeOCTOPUSH.httpAddr (str, optional) – Notification option for
typeONEBOT.accessToken – Notification option for
typeONEBOT.msgType (str) – Notification option for
typeONEBOT.recieverId (str, optional) – Notification option for
typeONEBOT.opsgeniePriority (int) – Notification option for
typeOPSGENIE. Priority. Available values are numbers between1and5.opsgenieRegion (str, optional) –
Notification option for
typeOPSGENIE. Region. Available values are:us: US (Default)eu: EU
opsgenieApiKey (str, optional) – Notification option for
typeOPSGENIE. API Key.pagerdutyAutoResolve (str) – Notification option for
typePAGERDUTY.pagerdutyIntegrationUrl (str) – Notification option for
typePAGERDUTY.pagerdutyPriority (str) – Notification option for
typePAGERDUTY.pagerdutyIntegrationKey (str, optional) – Notification option for
typePAGERDUTY.pagertreeAutoResolve (str) –
Notification option for
typePAGERTREE.Available values are:
0: Do Nothingresolve: Auto Resolve
pagertreeIntegrationUrl (str) – Notification option for
typePAGERTREE.pagertreeUrgency (str) –
Notification option for
typePAGERTREE.Available values are:
silent: Silentlow: Lowmedium: Mediumhigh: Highcritical: Critical
promosmsAllowLongSMS (bool) – Notification option for
typePROMOSMS. Allow long SMS.promosmsLogin (str, optional) – Notification option for
typePROMOSMS.promosmsPassword (str, optional) – Notification option for
typePROMOSMS.promosmsPhoneNumber (str, optional) – Notification option for
typePROMOSMS. Phone number (for Polish recipient You can skip area codes).promosmsSMSType (str) –
Notification option for
typePROMOSMS.Available values are:
0: SMS FLASH - Message will automatically show on recipient device. Limited only to Polish recipients.1: SMS ECO - cheap but slow and often overloaded. Limited only to Polish recipients.3: SMS FULL - Premium tier of SMS, You can use your Sender Name (You need to register name first). Reliable for alerts.4: SMS SPEED - Highest priority in system. Very quick and reliable but costly (about twice of SMS FULL price).
promosmsSenderName (str) – Notification option for
typePROMOSMS.pushbulletAccessToken (str, optional) – Notification option for
typePUSHBULLET.pushdeerServer (str) – Notification option for
typePUSHDEER.pushdeerKey (str, optional) – Notification option for
typePUSHDEER.pushoveruserkey (str, optional) – Notification option for
typePUSHOVER.pushoverapptoken (str, optional) – Notification option for
typePUSHOVER.pushoversounds (str) – Notification option for
typePUSHOVER.pushoverpriority (str) – Notification option for
typePUSHOVER.pushovertitle (str) – Notification option for
typePUSHOVER.pushoverdevice (str) – Notification option for
typePUSHOVER.pushoverttl (int) – Notification option for
typePUSHOVER. Message TTL (Seconds).pushyAPIKey (str, optional) – Notification option for
typePUSHY.pushyToken (str, optional) – Notification option for
typePUSHY.rocketchannel (str) – Notification option for
typeROCKET_CHAT.rocketusername (str) – Notification option for
typeROCKET_CHAT.rocketiconemo (str) – Notification option for
typeROCKET_CHAT.rocketwebhookURL (str, optional) – Notification option for
typeROCKET_CHAT.serverChanSendKey (str, optional) – Notification option for
typeSERVERCHAN.serwersmsUsername (str, optional) – Notification option for
typeSERWERSMS.serwersmsPassword (str, optional) – Notification option for
typeSERWERSMS.serwersmsPhoneNumber (str, optional) – Notification option for
typeSERWERSMS.serwersmsSenderName (str) – Notification option for
typeSERWERSMS.signalNumber (str, optional) – Notification option for
typeSIGNAL.signalRecipients (str, optional) – Notification option for
typeSIGNAL.signalURL (str, optional) – Notification option for
typeSIGNAL.slackchannelnotify (bool) – Notification option for
typeSLACK.slackchannel (str) – Notification option for
typeSLACK.slackusername (str) – Notification option for
typeSLACK.slackiconemo (str) – Notification option for
typeSLACK.slackwebhookURL (str, optional) – Notification option for
typeSLACK.smscTranslit (str) – Notification option for
typeSMSC.smscLogin (str, optional) – Notification option for
typeSMSC.smscPassword (str, optional) – Notification option for
typeSMSC.smscToNumber (str, optional) – Notification option for
typeSMSC.smscSenderName (str) – Notification option for
typeSMSC.smseagleEncoding (bool) – Notification option for
typeSMSEAGLE. True to send messages in unicode.smseaglePriority (int) – Notification option for
typeSMSEAGLE. Message priority (0-9, default = 0).smseagleRecipientType (str) –
Notification option for
typeSMSEAGLE. Recipient type.Available values are:
smseagle-to: Phone number(s)smseagle-group: Phonebook group name(s)smseagle-contact: Phonebook contact name(s)
smseagleToken (str, optional) – Notification option for
typeSMSEAGLE. API Access token.smseagleRecipient (str, optional) – Notification option for
typeSMSEAGLE. Recipient(s) (multiple must be separated with comma).smseagleUrl (str, optional) – Notification option for
typeSMSEAGLE. Your SMSEagle device URL.smsmanagerApiKey (str) – Notification option for
typeSMSMANAGER.numbers (str) – Notification option for
typeSMSMANAGER.messageType (str) – Notification option for
typeSMSMANAGER.smtpHost (str, optional) – Notification option for
typeSMTP.smtpPort (int, optional) – Notification option for
typeSMTP.smtpSecure (str) – Notification option for
typeSMTP.smtpIgnoreTLSError (bool) – Notification option for
typeSMTP.smtpDkimDomain (str) – Notification option for
typeSMTP.smtpDkimKeySelector (str) – Notification option for
typeSMTP.smtpDkimPrivateKey (str) – Notification option for
typeSMTP.smtpDkimHashAlgo (str) – Notification option for
typeSMTP.smtpDkimheaderFieldNames (str) – Notification option for
typeSMTP.smtpDkimskipFields (str) – Notification option for
typeSMTP.smtpUsername (str) – Notification option for
typeSMTP.smtpPassword (str) – Notification option for
typeSMTP.customSubject (str) – Notification option for
typeSMTP.smtpFrom (str, optional) – Notification option for
typeSMTP.smtpCC (str) – Notification option for
typeSMTP.smtpBCC (str) – Notification option for
typeSMTP.smtpTo (str) – Notification option for
typeSMTP.splunkAutoResolve (str) –
Notification option for
typeSPLUNK. Auto resolve or acknowledged.Available values are:
0: do nothingACKNOWLEDGEMENT: auto acknowledgedRECOVERY: auto resolve
splunkSeverity (str) –
Notification option for
typeSPLUNK. Severity.Available values are:
INFOWARNINGCRITICAL
splunkRestURL (str, optional) – Notification option for
typeSPLUNK. Splunk Rest URL.squadcastWebhookURL (str, optional) – Notification option for
typeSQUADCAST.stackfieldwebhookURL (str, optional) – Notification option for
typeSTACKFIELD.webhookUrl (str, optional) – Notification option for
typeTEAMS.pushAPIKey (str, optional) – Notification option for
typePUSHBYTECHULUS.telegramChatID (str, optional) – Notification option for
typeTELEGRAM.telegramSendSilently (bool) – Notification option for
typeTELEGRAM.telegramProtectContent (bool) – Notification option for
typeTELEGRAM.telegramMessageThreadID (str) – Notification option for
typeTELEGRAM.telegramBotToken (str, optional) – Notification option for
typeTELEGRAM.twilioAccountSID (str, optional) – Notification option for
typeTWILIO. Account SID.twilioApiKey (str) – Notification option for
typeTWILIO.twilioAuthToken (str, optional) – Notification option for
typeTWILIO. Auth Token.twilioToNumber (str, optional) – Notification option for
typeTWILIO. To Number.twilioFromNumber (str, optional) – Notification option for
typeTWILIO. From Number.webhookContentType (str, optional) – Notification option for
typeWEBHOOK.webhookCustomBody (str) – Notification option for
typeWEBHOOK.webhookAdditionalHeaders (str) – Notification option for
typeWEBHOOK.webhookURL (str, optional) – Notification option for
typeWEBHOOK.weComBotKey (str, optional) – Notification option for
typeWECOM.webhookUrl – Notification option for
typeZOHOCLIQ.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.add_notification( ... name="notification 1", ... isDefault=True, ... applyExisting=True, ... type=NotificationType.PUSHBYTECHULUS, ... pushAPIKey="123456789" ... ) { 'id': 1, 'msg': 'Saved' }
- edit_notification(id_: int, **kwargs) dict¶
Edit a notification.
- Parameters:
id (int) – Id of the notification to edit.
name (str, optional) – Friendly Name
type (NotificationType, optional) – Notification Type
isDefault (bool, optional) – Default enabled. This notification will be enabled by default for new monitors. You can still disable the notification separately for each monitor., defaults to False
applyExisting (bool, optional) – Apply on all existing monitors, defaults to False
alertaApiEndpoint (str, optional) – Notification option for
typeALERTA.alertaApiKey (str, optional) – Notification option for
typeALERTA.alertaEnvironment (str, optional) – Notification option for
typeALERTA.alertaAlertState (str, optional) – Notification option for
typeALERTA.alertaRecoverState (str, optional) – Notification option for
typeALERTA.alertNowWebhookURL (str, optional) – Notification option for
typeALERTNOW.phonenumber (str, optional) – Notification option for
typeALIYUNSMS.templateCode (str, optional) – Notification option for
typeALIYUNSMS.signName (str, optional) – Notification option for
typeALIYUNSMS.accessKeyId (str, optional) – Notification option for
typeALIYUNSMS.secretAccessKey (str, optional) – Notification option for
typeALIYUNSMS.appriseURL (str, optional) – Notification option for
typeAPPRISE.title (str) – Notification option for
typeAPPRISE.barkEndpoint (str, optional) – Notification option for
typeBARK.barkGroup (str, optional) – Notification option for
typeBARK.barkSound (str, optional) – Notification option for
typeBARK.clicksendsmsLogin (str, optional) – Notification option for
typeCLICKSENDSMS.clicksendsmsPassword (str, optional) – Notification option for
typeCLICKSENDSMS.clicksendsmsToNumber (str, optional) – Notification option for
typeCLICKSENDSMS.clicksendsmsSenderName (str) – Notification option for
typeCLICKSENDSMS.webHookUrl (str, optional) – Notification option for
typeDINGDING.secretKey (str, optional) – Notification option for
typeDINGDING.discordUsername (str) – Notification option for
typeDISCORD.discordWebhookUrl (str, optional) – Notification option for
typeDISCORD.discordPrefixMessage (str) – Notification option for
typeDISCORD.feishuWebHookUrl (str, optional) – Notification option for
typeFEISHU.flashdutySeverity (str, optional) – Notification option for
typeFLASHDUTY.flashdutyIntegrationKey (str) – Notification option for
typeFLASHDUTY.freemobileUser (str, optional) – Notification option for
typeFREEMOBILE.freemobilePass (str, optional) – Notification option for
typeFREEMOBILE.goAlertBaseURL (str, optional) – Notification option for
typeGOALERT.goAlertToken (str, optional) – Notification option for
typeGOALERT.googleChatWebhookURL (str, optional) – Notification option for
typeGOOGLECHAT.gorushDeviceToken (str, optional) – Notification option for
typeGORUSH.gorushPlatform (str) – Notification option for
typeGORUSH.gorushTitle (str) – Notification option for
typeGORUSH.gorushPriority (str) – Notification option for
typeGORUSH.gorushRetry (int) – Notification option for
typeGORUSH.gorushTopic (str) – Notification option for
typeGORUSH.gorushServerURL (str, optional) – Notification option for
typeGORUSH.gotifyserverurl (str, optional) – Notification option for
typeGOTIFY.gotifyapplicationToken (str, optional) – Notification option for
typeGOTIFY.gotifyPriority (int, optional) – Notification option for
typeGOTIFY.notificationService (str) – Notification option for
typeHOMEASSISTANT.homeAssistantUrl (str, optional) – Notification option for
typeHOMEASSISTANT.longLivedAccessToken (str, optional) – Notification option for
typeHOMEASSISTANT.kookGuildID (str, optional) – Notification option for
typeKOOK.kookBotToken (str, optional) – Notification option for
typeKOOK.lineChannelAccessToken (str, optional) – Notification option for
typeLINE.lineUserID (str, optional) – Notification option for
typeLINE.lineNotifyAccessToken (str, optional) – Notification option for
typeLINENOTIFY.lunaseaTarget (str, optional) – Notification option for
typeLUNASEA. Allowed values: “device”, “user”.lunaseaUserID (str) – Notification option for
typeLUNASEA. User ID.lunaseaDevice (str) – Notification option for
typeLUNASEA. Device ID.internalRoomId (str, optional) – Notification option for
typeMATRIX.accessToken (str, optional) – Notification option for
typeMATRIX.homeserverUrl (str, optional) – Notification option for
typeMATRIX.mattermostusername (str) – Notification option for
typeMATTERMOST.mattermostWebhookUrl (str, optional) – Notification option for
typeMATTERMOST.mattermostchannel (str) – Notification option for
typeMATTERMOST.mattermosticonemo (str) – Notification option for
typeMATTERMOST.mattermosticonurl (str) – Notification option for
typeMATTERMOST.sender (str, optional) – Notification option for
typeNOSTR.recipients (str, optional) – Notification option for
typeNOSTR.relays (str, optional) – Notification option for
typeNOSTR.ntfyAuthenticationMethod (str) – Notification option for
typeNTFY. Authentication Method.ntfyusername (str) – Notification option for
typeNTFY.ntfypassword (str) – Notification option for
typeNTFY.ntfyaccesstoken (str) – Notification option for
typeNTFY. Access Token.ntfytopic (str, optional) – Notification option for
typeNTFY.ntfyPriority (int, optional) – Notification option for
typeNTFY.ntfyserverurl (str, optional) – Notification option for
typeNTFY.ntfyIcon (str) – Notification option for
typeNTFY.octopushVersion (str) – Notification option for
typeOCTOPUSH.octopushAPIKey (str, optional) – Notification option for
typeOCTOPUSH.octopushLogin (str, optional) – Notification option for
typeOCTOPUSH.octopushPhoneNumber (str, optional) – Notification option for
typeOCTOPUSH.octopushSMSType (str) – Notification option for
typeOCTOPUSH.octopushSenderName (str) – Notification option for
typeOCTOPUSH.httpAddr (str, optional) – Notification option for
typeONEBOT.accessToken – Notification option for
typeONEBOT.msgType (str) – Notification option for
typeONEBOT.recieverId (str, optional) – Notification option for
typeONEBOT.opsgeniePriority (int) – Notification option for
typeOPSGENIE. Priority. Available values are numbers between1and5.opsgenieRegion (str, optional) –
Notification option for
typeOPSGENIE. Region. Available values are:us: US (Default)eu: EU
opsgenieApiKey (str, optional) – Notification option for
typeOPSGENIE. API Key.pagerdutyAutoResolve (str) – Notification option for
typePAGERDUTY.pagerdutyIntegrationUrl (str) – Notification option for
typePAGERDUTY.pagerdutyPriority (str) – Notification option for
typePAGERDUTY.pagerdutyIntegrationKey (str, optional) – Notification option for
typePAGERDUTY.pagertreeAutoResolve (str) –
Notification option for
typePAGERTREE.Available values are:
0: Do Nothingresolve: Auto Resolve
pagertreeIntegrationUrl (str) – Notification option for
typePAGERTREE.pagertreeUrgency (str) –
Notification option for
typePAGERTREE.Available values are:
silent: Silentlow: Lowmedium: Mediumhigh: Highcritical: Critical
promosmsAllowLongSMS (bool) – Notification option for
typePROMOSMS. Allow long SMS.promosmsLogin (str, optional) – Notification option for
typePROMOSMS.promosmsPassword (str, optional) – Notification option for
typePROMOSMS.promosmsPhoneNumber (str, optional) – Notification option for
typePROMOSMS. Phone number (for Polish recipient You can skip area codes).promosmsSMSType (str) –
Notification option for
typePROMOSMS.Available values are:
0: SMS FLASH - Message will automatically show on recipient device. Limited only to Polish recipients.1: SMS ECO - cheap but slow and often overloaded. Limited only to Polish recipients.3: SMS FULL - Premium tier of SMS, You can use your Sender Name (You need to register name first). Reliable for alerts.4: SMS SPEED - Highest priority in system. Very quick and reliable but costly (about twice of SMS FULL price).
promosmsSenderName (str) – Notification option for
typePROMOSMS.pushbulletAccessToken (str, optional) – Notification option for
typePUSHBULLET.pushdeerServer (str) – Notification option for
typePUSHDEER.pushdeerKey (str, optional) – Notification option for
typePUSHDEER.pushoveruserkey (str, optional) – Notification option for
typePUSHOVER.pushoverapptoken (str, optional) – Notification option for
typePUSHOVER.pushoversounds (str) – Notification option for
typePUSHOVER.pushoverpriority (str) – Notification option for
typePUSHOVER.pushovertitle (str) – Notification option for
typePUSHOVER.pushoverdevice (str) – Notification option for
typePUSHOVER.pushoverttl (int) – Notification option for
typePUSHOVER. Message TTL (Seconds).pushyAPIKey (str, optional) – Notification option for
typePUSHY.pushyToken (str, optional) – Notification option for
typePUSHY.rocketchannel (str) – Notification option for
typeROCKET_CHAT.rocketusername (str) – Notification option for
typeROCKET_CHAT.rocketiconemo (str) – Notification option for
typeROCKET_CHAT.rocketwebhookURL (str, optional) – Notification option for
typeROCKET_CHAT.serverChanSendKey (str, optional) – Notification option for
typeSERVERCHAN.serwersmsUsername (str, optional) – Notification option for
typeSERWERSMS.serwersmsPassword (str, optional) – Notification option for
typeSERWERSMS.serwersmsPhoneNumber (str, optional) – Notification option for
typeSERWERSMS.serwersmsSenderName (str) – Notification option for
typeSERWERSMS.signalNumber (str, optional) – Notification option for
typeSIGNAL.signalRecipients (str, optional) – Notification option for
typeSIGNAL.signalURL (str, optional) – Notification option for
typeSIGNAL.slackchannelnotify (bool) – Notification option for
typeSLACK.slackchannel (str) – Notification option for
typeSLACK.slackusername (str) – Notification option for
typeSLACK.slackiconemo (str) – Notification option for
typeSLACK.slackwebhookURL (str, optional) – Notification option for
typeSLACK.smscTranslit (str) – Notification option for
typeSMSC.smscLogin (str, optional) – Notification option for
typeSMSC.smscPassword (str, optional) – Notification option for
typeSMSC.smscToNumber (str, optional) – Notification option for
typeSMSC.smscSenderName (str) – Notification option for
typeSMSC.smseagleEncoding (bool) – Notification option for
typeSMSEAGLE. True to send messages in unicode.smseaglePriority (int) – Notification option for
typeSMSEAGLE. Message priority (0-9, default = 0).smseagleRecipientType (str) –
Notification option for
typeSMSEAGLE. Recipient type.Available values are:
smseagle-to: Phone number(s)smseagle-group: Phonebook group name(s)smseagle-contact: Phonebook contact name(s)
smseagleToken (str, optional) – Notification option for
typeSMSEAGLE. API Access token.smseagleRecipient (str, optional) – Notification option for
typeSMSEAGLE. Recipient(s) (multiple must be separated with comma).smseagleUrl (str, optional) – Notification option for
typeSMSEAGLE. Your SMSEagle device URL.smsmanagerApiKey (str) – Notification option for
typeSMSMANAGER.numbers (str) – Notification option for
typeSMSMANAGER.messageType (str) – Notification option for
typeSMSMANAGER.smtpHost (str, optional) – Notification option for
typeSMTP.smtpPort (int, optional) – Notification option for
typeSMTP.smtpSecure (str) – Notification option for
typeSMTP.smtpIgnoreTLSError (bool) – Notification option for
typeSMTP.smtpDkimDomain (str) – Notification option for
typeSMTP.smtpDkimKeySelector (str) – Notification option for
typeSMTP.smtpDkimPrivateKey (str) – Notification option for
typeSMTP.smtpDkimHashAlgo (str) – Notification option for
typeSMTP.smtpDkimheaderFieldNames (str) – Notification option for
typeSMTP.smtpDkimskipFields (str) – Notification option for
typeSMTP.smtpUsername (str) – Notification option for
typeSMTP.smtpPassword (str) – Notification option for
typeSMTP.customSubject (str) – Notification option for
typeSMTP.smtpFrom (str, optional) – Notification option for
typeSMTP.smtpCC (str) – Notification option for
typeSMTP.smtpBCC (str) – Notification option for
typeSMTP.smtpTo (str) – Notification option for
typeSMTP.splunkAutoResolve (str) –
Notification option for
typeSPLUNK. Auto resolve or acknowledged.Available values are:
0: do nothingACKNOWLEDGEMENT: auto acknowledgedRECOVERY: auto resolve
splunkSeverity (str) –
Notification option for
typeSPLUNK. Severity.Available values are:
INFOWARNINGCRITICAL
splunkRestURL (str, optional) – Notification option for
typeSPLUNK. Splunk Rest URL.squadcastWebhookURL (str, optional) – Notification option for
typeSQUADCAST.stackfieldwebhookURL (str, optional) – Notification option for
typeSTACKFIELD.webhookUrl (str, optional) – Notification option for
typeTEAMS.pushAPIKey (str, optional) – Notification option for
typePUSHBYTECHULUS.telegramChatID (str, optional) – Notification option for
typeTELEGRAM.telegramSendSilently (bool) – Notification option for
typeTELEGRAM.telegramProtectContent (bool) – Notification option for
typeTELEGRAM.telegramMessageThreadID (str) – Notification option for
typeTELEGRAM.telegramBotToken (str, optional) – Notification option for
typeTELEGRAM.twilioAccountSID (str, optional) – Notification option for
typeTWILIO. Account SID.twilioApiKey (str) – Notification option for
typeTWILIO.twilioAuthToken (str, optional) – Notification option for
typeTWILIO. Auth Token.twilioToNumber (str, optional) – Notification option for
typeTWILIO. To Number.twilioFromNumber (str, optional) – Notification option for
typeTWILIO. From Number.webhookContentType (str, optional) – Notification option for
typeWEBHOOK.webhookCustomBody (str) – Notification option for
typeWEBHOOK.webhookAdditionalHeaders (str) – Notification option for
typeWEBHOOK.webhookURL (str, optional) – Notification option for
typeWEBHOOK.weComBotKey (str, optional) – Notification option for
typeWECOM.webhookUrl – Notification option for
typeZOHOCLIQ.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.edit_notification(1, ... name="notification 1 edited", ... isDefault=False, ... applyExisting=False, ... type=NotificationType.PUSHDEER, ... pushdeerKey="987654321" ... ) { 'id': 1, 'msg': 'Saved' }
- delete_notification(id_: int) dict¶
Delete a notification.
- Parameters:
id (int) – Id of the notification to delete.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.delete_notification(1) { 'msg': 'Deleted' }
- check_apprise() bool¶
Check if apprise exists.
- Returns:
The server response.
- Return type:
bool
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.check_apprise() True
- get_proxies() list[dict]¶
Get all proxies.
- Returns:
All proxies.
- Return type:
list
Example:
>>> api.get_proxies() [ { 'active': True, 'auth': True, 'createdDate': '2022-12-15 16:24:24', 'default': False, 'host': '127.0.0.1', 'id': 1, 'password': 'password', 'port': 8080, 'protocol': <ProxyProtocol.HTTP: 'http'>, 'userId': 1, 'username': 'username' } ]
- get_proxy(id_: int) dict¶
Get a proxy.
- Parameters:
id (int) – Id of the proxy to get.
- Returns:
The proxy.
- Return type:
dict
- Raises:
UptimeKumaException – If the proxy does not exist.
Example:
>>> api.get_proxy(1) { 'active': True, 'auth': True, 'createdDate': '2022-12-15 16:24:24', 'default': False, 'host': '127.0.0.1', 'id': 1, 'password': 'password', 'port': 8080, 'protocol': 'http', 'userId': 1, 'username': 'username' }
- add_proxy(**kwargs) dict¶
Add a proxy.
- Parameters:
protocol (ProxyProtocol) – Proxy Protocol
host (str) – Proxy Server
port (str) – Port
auth (bool, optional) – Proxy server has authentication, defaults to False
username (str, optional) – User, defaults to None
password (str, optional) – Password, defaults to None
active (bool, optional) – Enabled. This proxy will not effect on monitor requests until it is activated. You can control temporarily disable the proxy from all monitors by activation status., defaults to True
default (bool, optional) – Set As Default. This proxy will be enabled by default for new monitors. You can still disable the proxy separately for each monitor., , defaults to False
applyExisting (bool, optional) – Apply on all existing monitors, defaults to False
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.add_proxy( ... protocol=ProxyProtocol.HTTP, ... host="127.0.0.1", ... port=8080, ... auth=True, ... username="username", ... password="password", ... active=True, ... default=False, ... applyExisting=False ... ) { 'id': 1, 'msg': 'Saved' }
- edit_proxy(id_: int, **kwargs) dict¶
Edit a proxy.
- Parameters:
id (int) – Id of the proxy to edit.
protocol (ProxyProtocol, optional) – Proxy Protocol
host (str, optional) – Proxy Server
port (str, optional) – Port
auth (bool, optional) – Proxy server has authentication, defaults to False
username (str, optional) – User, defaults to None
password (str, optional) – Password, defaults to None
active (bool, optional) – Enabled. This proxy will not effect on monitor requests until it is activated. You can control temporarily disable the proxy from all monitors by activation status., defaults to True
default (bool, optional) – Set As Default. This proxy will be enabled by default for new monitors. You can still disable the proxy separately for each monitor., , defaults to False
applyExisting (bool, optional) – Apply on all existing monitors, defaults to False
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.edit_proxy(1, ... protocol=ProxyProtocol.HTTPS, ... host="127.0.0.2", ... port=8888 ... ) { 'id': 1, 'msg': 'Saved' }
- delete_proxy(id_: int) dict¶
Delete a proxy.
- Parameters:
id (int) – Id of the proxy to delete.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.delete_proxy(1) { 'msg': 'Deleted' }
- get_status_pages() list[dict]¶
Get all status pages.
- Returns:
All status pages.
- Return type:
list
Example:
>>> api.get_status_pages() [ { 'customCSS': '', 'description': 'description 1', 'domainNameList': [], 'footerText': None, 'icon': '/icon.svg', 'googleAnalyticsId': '', 'id': 1, 'published': True, 'showPoweredBy': False, 'showTags': False, 'slug': 'slug1', 'theme': 'light', 'title': 'status page 1' } ]
- get_status_page(slug: str) dict¶
Get a status page.
- Parameters:
slug (str) – Slug
- Returns:
The status page.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_status_page("slug1") { 'customCSS': '', 'description': 'description 1', 'domainNameList': [], 'footerText': None, 'googleAnalyticsId': '', 'icon': '/icon.svg', 'id': 1, 'incident': { 'content': 'content 1', 'createdDate': '2022-12-15 16:51:43', 'id': 1, 'lastUpdatedDate': None, 'pin': 1, 'style': <IncidentStyle.DANGER: 'danger'>, 'title': 'title 1' }, 'maintenanceList': [], 'publicGroupList': [ { 'id': 1, 'monitorList': [ { 'id': 1, 'name': 'monitor 1', 'sendUrl': False, 'type': 'http' } ], 'name': 'Services', 'weight': 1 } ], 'published': True, 'showCertificateExpiry': False, 'showPoweredBy': False, 'showTags': False, 'slug': 'slug1', 'theme': 'light', 'title': 'status page 1' }
- add_status_page(slug: str, title: str) dict¶
Add a status page.
- Parameters:
slug (str) – Slug
title (str) – Title
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.add_status_page("slug1", "status page 1") { 'msg': 'OK!' }
- delete_status_page(slug: str) dict¶
Delete a status page.
- Parameters:
slug (str) – Slug
- Returns:
The server response.
- Return type:
dict
Example:
>>> api.delete_status_page("slug1") {}
- save_status_page(slug: str, **kwargs) dict¶
Save a status page.
- Parameters:
slug (str) – Slug
id (int) – Id of the status page to save
title (str, optional) – Title, defaults to None
description (str, optional) – Description, defaults to None
theme (str, optional) – Switch Theme, defaults to “auto”
published (bool, optional) – Published, defaults to True
showTags (bool, optional) – Show Tags, defaults to False
domainNameList (list, optional) – Domain Names, defaults to None
googleAnalyticsId (str, optional) – Google Analytics ID, defaults to None
customCSS (str, optional) – Custom CSS, defaults to “”
footerText (str, optional) – Custom Footer, defaults to None
showPoweredBy (bool, optional) – Show Powered By, defaults to True
showCertificateExpiry (bool, optional) – Show Certificate Expiry, defaults to False
icon (str, optional) – Icon, defaults to “/icon.svg”
publicGroupList (list, optional) – Public Group List, defaults to None
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> monitor_id = 1 >>> api.save_status_page( ... slug="slug1", ... title="status page 1", ... description="description 1", ... publicGroupList=[ ... { ... 'name': 'Services', ... 'weight': 1, ... 'monitorList': [ ... { ... "id": monitor_id ... } ... ] ... } ... ] ... ) { 'publicGroupList': [ { 'id': 1, 'monitorList': [ { 'id': 1 } ], 'name': 'Services', 'weight': 1 } ] }
- post_incident(slug: str, title: str, content: str, style: IncidentStyle = IncidentStyle.PRIMARY) dict¶
Post an incident to status page.
- Parameters:
slug (str) – Slug
title (str) – Title
content (str) – Content
style (IncidentStyle, optional) – Style, defaults to
PRIMARY
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.post_incident( ... slug="slug1", ... title="title 1", ... content="content 1", ... style=IncidentStyle.DANGER ... ) { 'content': 'content 1', 'createdDate': '2022-12-15 16:51:43', 'id': 1, 'pin': True, 'style': <IncidentStyle.DANGER: 'danger'>, 'title': 'title 1' }
- unpin_incident(slug: str) dict¶
Unpin an incident from a status page.
- Parameters:
slug (str) – Slug
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.unpin_incident(slug="slug1") {}
- get_heartbeats() dict¶
Get heartbeats.
- Returns:
The heartbeats for each monitor id.
- Return type:
dict
Example:
>>> api.get_heartbeats() { 1: [ { 'down_count': 0, 'duration': 0, 'id': 1, 'important': True, 'monitor_id': 1, 'msg': '', 'ping': 10.5, 'status': <MonitorStatus.UP: 1>, 'time': '2023-05-01 17:22:20.289' }, { 'down_count': 0, 'duration': 60, 'id': 2, 'important': False, 'monitor_id': 1, 'msg': '', 'ping': 10.7, 'status': <MonitorStatus.UP: 1>, 'time': '2023-05-01 17:23:20.349' } ] }
- get_important_heartbeats() dict¶
Get important heartbeats.
- Returns:
The important heartbeats for each monitor id.
- Return type:
dict
Example:
>>> api.get_important_heartbeats() { 1: [ { 'duration': 0, 'important': True, 'monitorID': 1, 'msg': '', 'ping': 10.5, 'status': <MonitorStatus.UP: 1>, 'time': '2023-05-01 17:22:20.289' } ] }
- avg_ping() dict¶
Get average ping.
- Returns:
The average ping for each monitor id.
- Return type:
dict
Example:
>>> api.avg_ping() { 1: 10 }
- cert_info() dict¶
Get certificate info.
- Returns:
Certificate info for each monitor id for which a certificate can be extracted.
- Return type:
dict
Example:
>>> api.cert_info() { 1: { 'valid': True, 'certInfo': { 'subject': { 'CN': 'www.google.de' }, 'issuer': { 'C': 'US', 'O': 'Google Trust Services LLC', 'CN': 'GTS CA 1C3' }, 'subjectaltname': 'DNS:www.google.de', 'infoAccess': { 'OCSP - URI': ['http://ocsp.pki.goog/gts1c3'], 'CA Issuers - URI': ['http://pki.goog/repo/certs/gts1c3.der'] }, 'bits': 256, 'pubkey': { 'type': 'Buffer', 'data': [4, 190, 87, 79, 99, 19, 100, 17, 253, 234, 34, 246, 7, 67, 197, 31, 168, 108, 212, 254, 170, 117, 68, 29, 16, 77, 78, 77, 152, 134, 139, 31, 187, 247, 140, 225, 130, 116, 249, 151, 31, 253, 69, 170, 182, 76, 191, 163, 96, 92, 127, 202, 159, 216, 189, 117, 255, 80, 18, 210, 77, 234, 108, 50, 109] }, 'asn1Curve': 'prime256v1', 'nistCurve': 'P-256', 'valid_from': 'Apr 3 08:24:23 2023 GMT', 'valid_to': 'Jun 26 08:24:22 2023 GMT', 'fingerprint': '45:B2:16:8F:B0:00:25:31:17:D1:DA:F2:66:DE:F6:51:6D:4E:51:E2', 'fingerprint256': '5E:77:02:E0:DE:28:33:5E:FB:D4:70:62:D3:21:B1:EE:AB:80:99:E0:92:D5:87:44:ED:C8:D6:8C:E6:67:3D:A8', 'fingerprint512': '35:D5:F8:24:BD:20:06:B1:00:19:FA:82:73:53:5A:53:F8:1F:D6:51:29:DF:17:2E:E6:72:8E:42:10:68:1B:E4:58:EB:0E:3A:48:4C:5D:78:12:69:B8:29:AA:95:0C:DB:79:AC:04:84:D8:53:74:F4:BB:0E:B3:80:D1:36:70:51', 'ext_key_usage': ['1.3.6.1.5.5.7.3.1'], 'serialNumber': '8628F43381B42BA50A686F0ACB522E40', 'raw': { 'type': 'Buffer', 'data': [48, 130, 4, 136, 48, 130, 3, 112, 160, 3, 2, 1, 2, 2, 17, 0, 134, 40, 244, 51, 129, 180, 43, 165, 10, 104, 111, 10, 203, 82, 46, 64, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 48, 70, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 34, 48, 32, 6, 3, 85, 4, 10, 19, 25, 71, 111, 111, 103, 108, 101, 32, 84, 114, 117, 115, 116, 32, 83, 101, 114, 118, 105, 99, 101, 115, 32, 76, 76, 67, 49, 19, 48, 17, 6, 3, 85, 4, 3, 19, 10, 71, 84, 83, 32, 67, 65, 32, 49, 67, 51, 48, 30, 23, 13, 50, 51, 48, 52, 48, 51, 48, 56, 50, 52, 50, 51, 90, 23, 13, 50, 51, 48, 54, 50, 54, 48, 56, 50, 52, 50, 50, 90, 48, 24, 49, 22, 48, 20, 6, 3, 85, 4, 3, 19, 13, 119, 119, 119, 46, 103, 111, 111, 103, 108, 101, 46, 100, 101, 48, 89, 48, 19, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 8, 42, 134, 72, 206, 61, 3, 1, 7, 3, 66, 0, 4, 190, 87, 79, 99, 19, 100, 17, 253, 234, 34, 246, 7, 67, 197, 31, 168, 108, 212, 254, 170, 117, 68, 29, 16, 77, 78, 77, 152, 134, 139, 31, 187, 247, 140, 225, 130, 116, 249, 151, 31, 253, 69, 170, 182, 76, 191, 163, 96, 92, 127, 202, 159, 216, 189, 117, 255, 80, 18, 210, 77, 234, 108, 50, 109, 163, 130, 2, 104, 48, 130, 2, 100, 48, 14, 6, 3, 85, 29, 15, 1, 1, 255, 4, 4, 3, 2, 7, 128, 48, 19, 6, 3, 85, 29, 37, 4, 12, 48, 10, 6, 8, 43, 6, 1, 5, 5, 7, 3, 1, 48, 12, 6, 3, 85, 29, 19, 1, 1, 255, 4, 2, 48, 0, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 214, 103, 166, 83, 212, 251, 70, 19, 90, 81, 159, 90, 229, 252, 199, 112, 251, 21, 1, 223, 48, 31, 6, 3, 85, 29, 35, 4, 24, 48, 22, 128, 20, 138, 116, 127, 175, 133, 205, 238, 149, 205, 61, 156, 208, 226, 70, 20, 243, 113, 53, 29, 39, 48, 106, 6, 8, 43, 6, 1, 5, 5, 7, 1, 1, 4, 94, 48, 92, 48, 39, 6, 8, 43, 6, 1, 5, 5, 7, 48, 1, 134, 27, 104, 116, 116, 112, 58, 47, 47, 111, 99, 115, 112, 46, 112, 107, 105, 46, 103, 111, 111, 103, 47, 103, 116, 115, 49, 99, 51, 48, 49, 6, 8, 43, 6, 1, 5, 5, 7, 48, 2, 134, 37, 104, 116, 116, 112, 58, 47, 47, 112, 107, 105, 46, 103, 111, 111, 103, 47, 114, 101, 112, 111, 47, 99, 101, 114, 116, 115, 47, 103, 116, 115, 49, 99, 51, 46, 100, 101, 114, 48, 24, 6, 3, 85, 29, 17, 4, 17, 48, 15, 130, 13, 119, 119, 119, 46, 103, 111, 111, 103, 108, 101, 46, 100, 101, 48, 33, 6, 3, 85, 29, 32, 4, 26, 48, 24, 48, 8, 6, 6, 103, 129, 12, 1, 2, 1, 48, 12, 6, 10, 43, 6, 1, 4, 1, 214, 121, 2, 5, 3, 48, 60, 6, 3, 85, 29, 31, 4, 53, 48, 51, 48, 49, 160, 47, 160, 45, 134, 43, 104, 116, 116, 112, 58, 47, 47, 99, 114, 108, 115, 46, 112, 107, 105, 46, 103, 111, 111, 103, 47, 103, 116, 115, 49, 99, 51, 47, 81, 113, 70, 120, 98, 105, 57, 77, 52, 56, 99, 46, 99, 114, 108, 48, 130, 1, 6, 6, 10, 43, 6, 1, 4, 1, 214, 121, 2, 4, 2, 4, 129, 247, 4, 129, 244, 0, 242, 0, 119, 0, 183, 62, 251, 36, 223, 156, 77, 186, 117, 242, 57, 197, 186, 88, 244, 108, 93, 252, 66, 207, 122, 159, 53, 196, 158, 29, 9, 129, 37, 237, 180, 153, 0, 0, 1, 135, 70, 110, 147, 124, 0, 0, 4, 3, 0, 72, 48, 70, 2, 33, 0, 255, 123, 215, 190, 105, 140, 120, 76, 223, 12, 35, 73, 127, 147, 74, 41, 72, 133, 185, 179, 204, 135, 14, 167, 40, 142, 235, 33, 236, 185, 56, 187, 2, 33, 0, 249, 146, 138, 177, 22, 38, 138, 252, 172, 111, 49, 198, 58, 81, 23, 246, 101, 105, 50, 240, 231, 37, 253, 210, 19, 242, 80, 126, 208, 150, 61, 206, 0, 119, 0, 232, 62, 208, 218, 62, 245, 6, 53, 50, 231, 87, 40, 188, 137, 107, 201, 3, 211, 203, 209, 17, 107, 236, 235, 105, 225, 119, 125, 109, 6, 189, 110, 0, 0, 1, 135, 70, 110, 147, 109, 0, 0, 4, 3, 0, 72, 48, 70, 2, 33, 0, 213, 243, 231, 98, 145, 101, 31, 217, 200, 81, 250, 200, 231, 25, 186, 67, 217, 135, 113, 76, 96, 110, 44, 171, 171, 88, 41, 142, 87, 221, 191, 248, 2, 33, 0, 203, 90, 155, 98, 40, 70, 6, 130, 10, 216, 126, 34, 214, 172, 51, 32, 83, 136, 80, 162, 159, 87, 59, 228, 30, 16, 141, 188, 94, 119, 44, 195, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 3, 130, 1, 1, 0, 5, 200, 236, 42, 163, 67, 196, 232, 159, 112, 110, 9, 114, 131, 77, 76, 31, 166, 48, 62, 59, 228, 180, 65, 196, 80, 154, 36, 88, 0, 17, 104, 250, 191, 236, 213, 42, 127, 208, 198, 132, 14, 94, 24, 205, 80, 222, 203, 153, 75, 248, 75, 189, 182, 222, 133, 77, 16, 180, 101, 165, 4, 4, 8, 6, 75, 183, 239, 121, 203, 220, 126, 183, 186, 37, 2, 153, 203, 54, 56, 111, 58, 39, 163, 54, 91, 26, 244, 19, 154, 225, 108, 117, 14, 25, 127, 93, 64, 16, 250, 185, 159, 155, 25, 212, 78, 133, 147, 247, 246, 68, 228, 87, 162, 183, 246, 106, 245, 191, 194, 116, 35, 25, 169, 221, 237, 76, 155, 57, 24, 229, 163, 176, 73, 160, 105, 90, 32, 33, 141, 195, 61, 84, 118, 22, 43, 2, 199, 13, 113, 77, 202, 135, 68, 208, 2, 188, 119, 241, 231, 47, 78, 115, 133, 109, 200, 36, 92, 91, 7, 174, 175, 10, 169, 201, 33, 88, 71, 171, 206, 186, 199, 154, 95, 107, 252, 191, 245, 40, 122, 192, 231, 188, 38, 124, 34, 122, 182, 92, 125, 165, 38, 120, 37, 188, 15, 109, 152, 213, 139, 14, 248, 156, 178, 154, 17, 142, 167, 6, 234, 41, 77, 211, 96, 165, 206, 107, 206, 29, 125, 81, 55, 74, 37, 9, 195, 194, 108, 225, 104, 121, 68, 65, 58, 193, 150, 127, 246, 170, 255, 71, 92, 216, 233, 26, 223] }, 'issuerCertificate': { 'subject': { 'C': 'US', 'O': 'Google Trust Services LLC', 'CN': 'GTS CA 1C3' }, 'issuer': { 'C': 'US', 'O': 'Google Trust Services LLC', 'CN': 'GTS Root R1' }, 'infoAccess': { 'OCSP - URI': ['http://ocsp.pki.goog/gtsr1'], 'CA Issuers - URI': ['http://pki.goog/repo/certs/gtsr1.der'] }, 'modulus': 'F588DFE7628C1E37F83742907F6C87D0FB658225FDE8CB6BA4FF6DE95A23E299F61CE9920399137C090A8AFA42D65E5624AA7A33841FD1E969BBB974EC574C66689377375553FE39104DB734BB5F2577373B1794EA3CE59DD5BCC3B443EB2EA747EFB0441163D8B44185DD413048931BBFB7F6E0450221E0964217CFD92B6556340726040DA8FD7DCA2EEFEA487C374D3F009F83DFEF75842E79575CFC576E1A96FFFC8C9AA699BE25D97F962C06F7112A028080EB63183C504987E58ACA5F192B59968100A0FB51DBCA770B0BC9964FEF7049C75C6D20FD99B4B4E2CA2E77FD2DDC0BB66B130C8C192B179698B9F08BF6A027BBB6E38D518FBDAEC79BB1899D', 'bits': 2048, 'exponent': '0x10001', 'pubkey': { 'type': 'Buffer', 'data': [48, 130, 1, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 1, 15, 0, 48, 130, 1, 10, 2, 130, 1, 1, 0, 245, 136, 223, 231, 98, 140, 30, 55, 248, 55, 66, 144, 127, 108, 135, 208, 251, 101, 130, 37, 253, 232, 203, 107, 164, 255, 109, 233, 90, 35, 226, 153, 246, 28, 233, 146, 3, 153, 19, 124, 9, 10, 138, 250, 66, 214, 94, 86, 36, 170, 122, 51, 132, 31, 209, 233, 105, 187, 185, 116, 236, 87, 76, 102, 104, 147, 119, 55, 85, 83, 254, 57, 16, 77, 183, 52, 187, 95, 37, 119, 55, 59, 23, 148, 234, 60, 229, 157, 213, 188, 195, 180, 67, 235, 46, 167, 71, 239, 176, 68, 17, 99, 216, 180, 65, 133, 221, 65, 48, 72, 147, 27, 191, 183, 246, 224, 69, 2, 33, 224, 150, 66, 23, 207, 217, 43, 101, 86, 52, 7, 38, 4, 13, 168, 253, 125, 202, 46, 239, 234, 72, 124, 55, 77, 63, 0, 159, 131, 223, 239, 117, 132, 46, 121, 87, 92, 252, 87, 110, 26, 150, 255, 252, 140, 154, 166, 153, 190, 37, 217, 127, 150, 44, 6, 247, 17, 42, 2, 128, 128, 235, 99, 24, 60, 80, 73, 135, 229, 138, 202, 95, 25, 43, 89, 150, 129, 0, 160, 251, 81, 219, 202, 119, 11, 11, 201, 150, 79, 239, 112, 73, 199, 92, 109, 32, 253, 153, 180, 180, 226, 202, 46, 119, 253, 45, 220, 11, 182, 107, 19, 12, 140, 25, 43, 23, 150, 152, 185, 240, 139, 246, 160, 39, 187, 182, 227, 141, 81, 143, 189, 174, 199, 155, 177, 137, 157, 2, 3, 1, 0, 1] }, 'valid_from': 'Aug 13 00:00:42 2020 GMT', 'valid_to': 'Sep 30 00:00:42 2027 GMT', 'fingerprint': '1E:7E:F6:47:CB:A1:50:28:1C:60:89:72:57:10:28:78:C4:BD:8C:DC', 'fingerprint256': '23:EC:B0:3E:EC:17:33:8C:4E:33:A6:B4:8A:41:DC:3C:DA:12:28:1B:BC:3F:F8:13:C0:58:9D:6C:C2:38:75:22', 'fingerprint512': '43:7B:9E:11:1E:EB:78:01:39:69:F0:BF:AB:EE:CF:67:95:56:D3:FC:3F:6E:F9:C3:21:4F:D0:7B:58:B0:5C:78:DC:1A:9B:E9:B9:9D:21:15:68:BD:B4:4A:4A:33:59:4D:8D:23:08:B4:2A:E9:BF:23:96:82:A0:11:17:8D:FA:10', 'ext_key_usage': ['1.3.6.1.5.5.7.3.1', '1.3.6.1.5.5.7.3.2'], 'serialNumber': '0203BC53596B34C718F5015066', 'raw': { 'type': 'Buffer', 'data': [48, 130, 5, 150, 48, 130, 3, 126, 160, 3, 2, 1, 2, 2, 13, 2, 3, 188, 83, 89, 107, 52, 199, 24, 245, 1, 80, 102, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 48, 71, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 34, 48, 32, 6, 3, 85, 4, 10, 19, 25, 71, 111, 111, 103, 108, 101, 32, 84, 114, 117, 115, 116, 32, 83, 101, 114, 118, 105, 99, 101, 115, 32, 76, 76, 67, 49, 20, 48, 18, 6, 3, 85, 4, 3, 19, 11, 71, 84, 83, 32, 82, 111, 111, 116, 32, 82, 49, 48, 30, 23, 13, 50, 48, 48, 56, 49, 51, 48, 48, 48, 48, 52, 50, 90, 23, 13, 50, 55, 48, 57, 51, 48, 48, 48, 48, 48, 52, 50, 90, 48, 70, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 34, 48, 32, 6, 3, 85, 4, 10, 19, 25, 71, 111, 111, 103, 108, 101, 32, 84, 114, 117, 115, 116, 32, 83, 101, 114, 118, 105, 99, 101, 115, 32, 76, 76, 67, 49, 19, 48, 17, 6, 3, 85, 4, 3, 19, 10, 71, 84, 83, 32, 67, 65, 32, 49, 67, 51, 48, 130, 1, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 1, 15, 0, 48, 130, 1, 10, 2, 130, 1, 1, 0, 245, 136, 223, 231, 98, 140, 30, 55, 248, 55, 66, 144, 127, 108, 135, 208, 251, 101, 130, 37, 253, 232, 203, 107, 164, 255, 109, 233, 90, 35, 226, 153, 246, 28, 233, 146, 3, 153, 19, 124, 9, 10, 138, 250, 66, 214, 94, 86, 36, 170, 122, 51, 132, 31, 209, 233, 105, 187, 185, 116, 236, 87, 76, 102, 104, 147, 119, 55, 85, 83, 254, 57, 16, 77, 183, 52, 187, 95, 37, 119, 55, 59, 23, 148, 234, 60, 229, 157, 213, 188, 195, 180, 67, 235, 46, 167, 71, 239, 176, 68, 17, 99, 216, 180, 65, 133, 221, 65, 48, 72, 147, 27, 191, 183, 246, 224, 69, 2, 33, 224, 150, 66, 23, 207, 217, 43, 101, 86, 52, 7, 38, 4, 13, 168, 253, 125, 202, 46, 239, 234, 72, 124, 55, 77, 63, 0, 159, 131, 223, 239, 117, 132, 46, 121, 87, 92, 252, 87, 110, 26, 150, 255, 252, 140, 154, 166, 153, 190, 37, 217, 127, 150, 44, 6, 247, 17, 42, 2, 128, 128, 235, 99, 24, 60, 80, 73, 135, 229, 138, 202, 95, 25, 43, 89, 150, 129, 0, 160, 251, 81, 219, 202, 119, 11, 11, 201, 150, 79, 239, 112, 73, 199, 92, 109, 32, 253, 153, 180, 180, 226, 202, 46, 119, 253, 45, 220, 11, 182, 107, 19, 12, 140, 25, 43, 23, 150, 152, 185, 240, 139, 246, 160, 39, 187, 182, 227, 141, 81, 143, 189, 174, 199, 155, 177, 137, 157, 2, 3, 1, 0, 1, 163, 130, 1, 128, 48, 130, 1, 124, 48, 14, 6, 3, 85, 29, 15, 1, 1, 255, 4, 4, 3, 2, 1, 134, 48, 29, 6, 3, 85, 29, 37, 4, 22, 48, 20, 6, 8, 43, 6, 1, 5, 5, 7, 3, 1, 6, 8, 43, 6, 1, 5, 5, 7, 3, 2, 48, 18, 6, 3, 85, 29, 19, 1, 1, 255, 4, 8, 48, 6, 1, 1, 255, 2, 1, 0, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 138, 116, 127, 175, 133, 205, 238, 149, 205, 61, 156, 208, 226, 70, 20, 243, 113, 53, 29, 39, 48, 31, 6, 3, 85, 29, 35, 4, 24, 48, 22, 128, 20, 228, 175, 43, 38, 113, 26, 43, 72, 39, 133, 47, 82, 102, 44, 239, 240, 137, 19, 113, 62, 48, 104, 6, 8, 43, 6, 1, 5, 5, 7, 1, 1, 4, 92, 48, 90, 48, 38, 6, 8, 43, 6, 1, 5, 5, 7, 48, 1, 134, 26, 104, 116, 116, 112, 58, 47, 47, 111, 99, 115, 112, 46, 112, 107, 105, 46, 103, 111, 111, 103, 47, 103, 116, 115, 114, 49, 48, 48, 6, 8, 43, 6, 1, 5, 5, 7, 48, 2, 134, 36, 104, 116, 116, 112, 58, 47, 47, 112, 107, 105, 46, 103, 111, 111, 103, 47, 114, 101, 112, 111, 47, 99, 101, 114, 116, 115, 47, 103, 116, 115, 114, 49, 46, 100, 101, 114, 48, 52, 6, 3, 85, 29, 31, 4, 45, 48, 43, 48, 41, 160, 39, 160, 37, 134, 35, 104, 116, 116, 112, 58, 47, 47, 99, 114, 108, 46, 112, 107, 105, 46, 103, 111, 111, 103, 47, 103, 116, 115, 114, 49, 47, 103, 116, 115, 114, 49, 46, 99, 114, 108, 48, 87, 6, 3, 85, 29, 32, 4, 80, 48, 78, 48, 56, 6, 10, 43, 6, 1, 4, 1, 214, 121, 2, 5, 3, 48, 42, 48, 40, 6, 8, 43, 6, 1, 5, 5, 7, 2, 1, 22, 28, 104, 116, 116, 112, 115, 58, 47, 47, 112, 107, 105, 46, 103, 111, 111, 103, 47, 114, 101, 112, 111, 115, 105, 116, 111, 114, 121, 47, 48, 8, 6, 6, 103, 129, 12, 1, 2, 1, 48, 8, 6, 6, 103, 129, 12, 1, 2, 2, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 3, 130, 2, 1, 0, 137, 125, 172, 32, 92, 12, 60, 190, 154, 168, 87, 149, 27, 180, 174, 250, 171, 165, 114, 113, 180, 54, 149, 253, 223, 64, 17, 3, 76, 194, 70, 20, 187, 20, 36, 171, 240, 80, 113, 34, 219, 173, 196, 110, 127, 207, 241, 106, 111, 200, 131, 27, 216, 206, 137, 95, 135, 108, 135, 184, 169, 12, 163, 155, 161, 98, 148, 147, 149, 223, 91, 174, 102, 25, 11, 2, 150, 158, 252, 181, 231, 16, 105, 62, 122, 203, 70, 73, 95, 70, 225, 65, 177, 215, 152, 77, 101, 52, 0, 128, 26, 63, 79, 159, 108, 127, 73, 0, 129, 83, 65, 164, 146, 33, 130, 130, 26, 241, 163, 68, 91, 42, 80, 18, 19, 77, 193, 83, 54, 243, 66, 8, 175, 84, 250, 142, 119, 83, 27, 100, 56, 39, 23, 9, 189, 88, 201, 27, 124, 57, 45, 91, 243, 206, 212, 237, 151, 219, 20, 3, 191, 9, 83, 36, 31, 194, 12, 4, 121, 152, 38, 242, 97, 241, 83, 82, 253, 66, 140, 27, 102, 43, 63, 21, 161, 187, 255, 246, 155, 227, 129, 154, 1, 6, 113, 137, 53, 40, 36, 221, 225, 189, 235, 25, 45, 225, 72, 203, 61, 89, 131, 81, 180, 116, 198, 157, 124, 198, 177, 134, 91, 175, 204, 52, 196, 211, 204, 212, 129, 17, 149, 0, 161, 244, 18, 34, 1, 250, 180, 131, 113, 175, 140, 183, 140, 115, 36, 172, 55, 83, 194, 0, 144, 63, 17, 254, 92, 237, 54, 148, 16, 59, 189, 41, 174, 226, 199, 58, 98, 59, 108, 99, 217, 128, 191, 89, 113, 172, 99, 39, 185, 76, 23, 160, 218, 246, 115, 21, 191, 42, 222, 143, 243, 165, 108, 50, 129, 51, 3, 208, 134, 81, 113, 153, 52, 186, 147, 141, 93, 181, 81, 88, 247, 178, 147, 232, 1, 246, 89, 190, 113, 155, 253, 77, 40, 206, 207, 109, 199, 22, 220, 247, 209, 214, 70, 155, 167, 202, 107, 233, 119, 15, 253, 160, 182, 27, 35, 131, 29, 16, 26, 217, 9, 0, 132, 224, 68, 211, 162, 117, 35, 179, 52, 134, 246, 32, 176, 164, 94, 16, 29, 224, 82, 70, 0, 157, 177, 15, 31, 33, 112, 81, 245, 154, 221, 6, 252, 85, 244, 43, 14, 51, 119, 195, 75, 66, 194, 241, 119, 19, 252, 115, 128, 148, 235, 31, 187, 55, 63, 206, 2, 42, 102, 176, 115, 29, 50, 165, 50, 108, 50, 176, 142, 224, 196, 35, 255, 91, 125, 77, 101, 112, 172, 43, 155, 61, 206, 219, 224, 109, 142, 50, 128, 190, 150, 159, 146, 99, 188, 151, 187, 93, 185, 244, 225, 113, 94, 42, 228, 239, 3, 34, 177, 138, 101, 58, 143, 192, 147, 101, 212, 133, 205, 15, 15, 91, 131, 89, 22, 71, 22, 45, 156, 36, 58, 200, 128, 166, 38, 20, 133, 155, 246, 55, 155, 172, 111, 249, 197, 195, 6, 81, 243, 226, 127, 197, 177, 16, 186, 81, 244, 221] }, 'issuerCertificate': { 'subject': { 'C': 'US', 'O': 'Google Trust Services LLC', 'CN': 'GTS Root R1' }, 'issuer': { 'C': 'BE', 'O': 'GlobalSign nv-sa', 'OU': 'Root CA', 'CN': 'GlobalSign Root CA' }, 'infoAccess': { 'OCSP - URI': ['http://ocsp.pki.goog/gsr1'], 'CA Issuers - URI': ['http://pki.goog/gsr1/gsr1.crt'] }, 'modulus': 'B611028B1EE3A1779B3BDCBF943EB795A7403CA1FD82F97D32068271F6F68C7FFBE8DBBC6A2E9797A38C4BF92BF6B1F9CE841DB1F9C597DEEFB9F2A3E9BC12895EA7AA52ABF82327CBA4B19C63DBD7997EF00A5EEB68A6F4C65A470D4D1033E34EB113A3C8186C4BECFC0990DF9D6429252307A1B4D23D2E60E0CFD20987BBCD48F04DC2C27A888ABBBACF5919D6AF8FB007B09E31F182C1C0DF2EA66D6C190EB5D87E261A45033DB079A49428AD0F7F26E5A808FE96E83C689453EE833A882B159609B2E07A8C2E75D69CEBA756648F964F68AE3D97C2848FC0BC40C00B5CBDF687B3356CAC18507F84E04CCD92D320E933BC5299AF32B529B3252AB448F972E1CA64F7E682108DE89DC28A88FA38668AFC63F901F978FD7B5C77FA7687FAECDFB10E799557B4BD26EFD601D1EB160ABB8E0BB5C5C58A55ABD3ACEA914B29CC19A432254E2AF16544D002CEAACE49B4EA9F7C83B0407BE743ABA76CA38F7D8981FA4CA5FFD58EC3CE4BE0B5D8B38E45CF76C0ED402BFD530FB0A7D53B0DB18AA203DE31ADCC77EA6F7B3ED6DF912212E6BEFAD832FC1063145172DE5DD61693BD296833EF3A66EC078A26DF13D757657827DE5E491400A2007F9AA821B6A9B195B0A5B90D1611DAC76C483C40E07E0D5ACD563CD19705B9CB4BED394B9CC43FD255136E24B0D671FAF4C1BACCED1BF5FE8141D800983D3AC8AE7A9837180595', 'bits': 4096, 'exponent': '0x10001', 'pubkey': { 'type': 'Buffer', 'data': [48, 130, 2, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 2, 15, 0, 48, 130, 2, 10, 2, 130, 2, 1, 0, 182, 17, 2, 139, 30, 227, 161, 119, 155, 59, 220, 191, 148, 62, 183, 149, 167, 64, 60, 161, 253, 130, 249, 125, 50, 6, 130, 113, 246, 246, 140, 127, 251, 232, 219, 188, 106, 46, 151, 151, 163, 140, 75, 249, 43, 246, 177, 249, 206, 132, 29, 177, 249, 197, 151, 222, 239, 185, 242, 163, 233, 188, 18, 137, 94, 167, 170, 82, 171, 248, 35, 39, 203, 164, 177, 156, 99, 219, 215, 153, 126, 240, 10, 94, 235, 104, 166, 244, 198, 90, 71, 13, 77, 16, 51, 227, 78, 177, 19, 163, 200, 24, 108, 75, 236, 252, 9, 144, 223, 157, 100, 41, 37, 35, 7, 161, 180, 210, 61, 46, 96, 224, 207, 210, 9, 135, 187, 205, 72, 240, 77, 194, 194, 122, 136, 138, 187, 186, 207, 89, 25, 214, 175, 143, 176, 7, 176, 158, 49, 241, 130, 193, 192, 223, 46, 166, 109, 108, 25, 14, 181, 216, 126, 38, 26, 69, 3, 61, 176, 121, 164, 148, 40, 173, 15, 127, 38, 229, 168, 8, 254, 150, 232, 60, 104, 148, 83, 238, 131, 58, 136, 43, 21, 150, 9, 178, 224, 122, 140, 46, 117, 214, 156, 235, 167, 86, 100, 143, 150, 79, 104, 174, 61, 151, 194, 132, 143, 192, 188, 64, 192, 11, 92, 189, 246, 135, 179, 53, 108, 172, 24, 80, 127, 132, 224, 76, 205, 146, 211, 32, 233, 51, 188, 82, 153, 175, 50, 181, 41, 179, 37, 42, 180, 72, 249, 114, 225, 202, 100, 247, 230, 130, 16, 141, 232, 157, 194, 138, 136, 250, 56, 102, 138, 252, 99, 249, 1, 249, 120, 253, 123, 92, 119, 250, 118, 135, 250, 236, 223, 177, 14, 121, 149, 87, 180, 189, 38, 239, 214, 1, 209, 235, 22, 10, 187, 142, 11, 181, 197, 197, 138, 85, 171, 211, 172, 234, 145, 75, 41, 204, 25, 164, 50, 37, 78, 42, 241, 101, 68, 208, 2, 206, 170, 206, 73, 180, 234, 159, 124, 131, 176, 64, 123, 231, 67, 171, 167, 108, 163, 143, 125, 137, 129, 250, 76, 165, 255, 213, 142, 195, 206, 75, 224, 181, 216, 179, 142, 69, 207, 118, 192, 237, 64, 43, 253, 83, 15, 176, 167, 213, 59, 13, 177, 138, 162, 3, 222, 49, 173, 204, 119, 234, 111, 123, 62, 214, 223, 145, 34, 18, 230, 190, 250, 216, 50, 252, 16, 99, 20, 81, 114, 222, 93, 214, 22, 147, 189, 41, 104, 51, 239, 58, 102, 236, 7, 138, 38, 223, 19, 215, 87, 101, 120, 39, 222, 94, 73, 20, 0, 162, 0, 127, 154, 168, 33, 182, 169, 177, 149, 176, 165, 185, 13, 22, 17, 218, 199, 108, 72, 60, 64, 224, 126, 13, 90, 205, 86, 60, 209, 151, 5, 185, 203, 75, 237, 57, 75, 156, 196, 63, 210, 85, 19, 110, 36, 176, 214, 113, 250, 244, 193, 186, 204, 237, 27, 245, 254, 129, 65, 216, 0, 152, 61, 58, 200, 174, 122, 152, 55, 24, 5, 149, 2, 3, 1, 0, 1] }, 'valid_from': 'Jun 19 00:00:42 2020 GMT', 'valid_to': 'Jan 28 00:00:42 2028 GMT', 'fingerprint': '08:74:54:87:E8:91:C1:9E:30:78:C1:F2:A0:7E:45:29:50:EF:36:F6', 'fingerprint256': '3E:E0:27:8D:F7:1F:A3:C1:25:C4:CD:48:7F:01:D7:74:69:4E:6F:C5:7E:0C:D9:4C:24:EF:D7:69:13:39:18:E5', 'fingerprint512': '7C:88:3C:25:8B:8D:E7:34:81:D6:61:21:DF:53:D0:99:7A:7C:3B:06:E0:E7:09:68:8F:FB:1E:FD:18:B3:6C:B5:43:5F:41:52:8C:7E:64:D6:D8:88:B2:27:28:17:AE:D1:0C:4A:44:22:0E:01:F3:84:50:2F:04:95:E7:85:13:05', 'serialNumber': '77BD0D6CDB36F91AEA210FC4F058D30D', 'raw': { 'type': 'Buffer', 'data': [48, 130, 5, 98, 48, 130, 4, 74, 160, 3, 2, 1, 2, 2, 16, 119, 189, 13, 108, 219, 54, 249, 26, 234, 33, 15, 196, 240, 88, 211, 13, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 48, 87, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 66, 69, 49, 25, 48, 23, 6, 3, 85, 4, 10, 19, 16, 71, 108, 111, 98, 97, 108, 83, 105, 103, 110, 32, 110, 118, 45, 115, 97, 49, 16, 48, 14, 6, 3, 85, 4, 11, 19, 7, 82, 111, 111, 116, 32, 67, 65, 49, 27, 48, 25, 6, 3, 85, 4, 3, 19, 18, 71, 108, 111, 98, 97, 108, 83, 105, 103, 110, 32, 82, 111, 111, 116, 32, 67, 65, 48, 30, 23, 13, 50, 48, 48, 54, 49, 57, 48, 48, 48, 48, 52, 50, 90, 23, 13, 50, 56, 48, 49, 50, 56, 48, 48, 48, 48, 52, 50, 90, 48, 71, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 34, 48, 32, 6, 3, 85, 4, 10, 19, 25, 71, 111, 111, 103, 108, 101, 32, 84, 114, 117, 115, 116, 32, 83, 101, 114, 118, 105, 99, 101, 115, 32, 76, 76, 67, 49, 20, 48, 18, 6, 3, 85, 4, 3, 19, 11, 71, 84, 83, 32, 82, 111, 111, 116, 32, 82, 49, 48, 130, 2, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 2, 15, 0, 48, 130, 2, 10, 2, 130, 2, 1, 0, 182, 17, 2, 139, 30, 227, 161, 119, 155, 59, 220, 191, 148, 62, 183, 149, 167, 64, 60, 161, 253, 130, 249, 125, 50, 6, 130, 113, 246, 246, 140, 127, 251, 232, 219, 188, 106, 46, 151, 151, 163, 140, 75, 249, 43, 246, 177, 249, 206, 132, 29, 177, 249, 197, 151, 222, 239, 185, 242, 163, 233, 188, 18, 137, 94, 167, 170, 82, 171, 248, 35, 39, 203, 164, 177, 156, 99, 219, 215, 153, 126, 240, 10, 94, 235, 104, 166, 244, 198, 90, 71, 13, 77, 16, 51, 227, 78, 177, 19, 163, 200, 24, 108, 75, 236, 252, 9, 144, 223, 157, 100, 41, 37, 35, 7, 161, 180, 210, 61, 46, 96, 224, 207, 210, 9, 135, 187, 205, 72, 240, 77, 194, 194, 122, 136, 138, 187, 186, 207, 89, 25, 214, 175, 143, 176, 7, 176, 158, 49, 241, 130, 193, 192, 223, 46, 166, 109, 108, 25, 14, 181, 216, 126, 38, 26, 69, 3, 61, 176, 121, 164, 148, 40, 173, 15, 127, 38, 229, 168, 8, 254, 150, 232, 60, 104, 148, 83, 238, 131, 58, 136, 43, 21, 150, 9, 178, 224, 122, 140, 46, 117, 214, 156, 235, 167, 86, 100, 143, 150, 79, 104, 174, 61, 151, 194, 132, 143, 192, 188, 64, 192, 11, 92, 189, 246, 135, 179, 53, 108, 172, 24, 80, 127, 132, 224, 76, 205, 146, 211, 32, 233, 51, 188, 82, 153, 175, 50, 181, 41, 179, 37, 42, 180, 72, 249, 114, 225, 202, 100, 247, 230, 130, 16, 141, 232, 157, 194, 138, 136, 250, 56, 102, 138, 252, 99, 249, 1, 249, 120, 253, 123, 92, 119, 250, 118, 135, 250, 236, 223, 177, 14, 121, 149, 87, 180, 189, 38, 239, 214, 1, 209, 235, 22, 10, 187, 142, 11, 181, 197, 197, 138, 85, 171, 211, 172, 234, 145, 75, 41, 204, 25, 164, 50, 37, 78, 42, 241, 101, 68, 208, 2, 206, 170, 206, 73, 180, 234, 159, 124, 131, 176, 64, 123, 231, 67, 171, 167, 108, 163, 143, 125, 137, 129, 250, 76, 165, 255, 213, 142, 195, 206, 75, 224, 181, 216, 179, 142, 69, 207, 118, 192, 237, 64, 43, 253, 83, 15, 176, 167, 213, 59, 13, 177, 138, 162, 3, 222, 49, 173, 204, 119, 234, 111, 123, 62, 214, 223, 145, 34, 18, 230, 190, 250, 216, 50, 252, 16, 99, 20, 81, 114, 222, 93, 214, 22, 147, 189, 41, 104, 51, 239, 58, 102, 236, 7, 138, 38, 223, 19, 215, 87, 101, 120, 39, 222, 94, 73, 20, 0, 162, 0, 127, 154, 168, 33, 182, 169, 177, 149, 176, 165, 185, 13, 22, 17, 218, 199, 108, 72, 60, 64, 224, 126, 13, 90, 205, 86, 60, 209, 151, 5, 185, 203, 75, 237, 57, 75, 156, 196, 63, 210, 85, 19, 110, 36, 176, 214, 113, 250, 244, 193, 186, 204, 237, 27, 245, 254, 129, 65, 216, 0, 152, 61, 58, 200, 174, 122, 152, 55, 24, 5, 149, 2, 3, 1, 0, 1, 163, 130, 1, 56, 48, 130, 1, 52, 48, 14, 6, 3, 85, 29, 15, 1, 1, 255, 4, 4, 3, 2, 1, 134, 48, 15, 6, 3, 85, 29, 19, 1, 1, 255, 4, 5, 48, 3, 1, 1, 255, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 228, 175, 43, 38, 113, 26, 43, 72, 39, 133, 47, 82, 102, 44, 239, 240, 137, 19, 113, 62, 48, 31, 6, 3, 85, 29, 35, 4, 24, 48, 22, 128, 20, 96, 123, 102, 26, 69, 13, 151, 202, 137, 80, 47, 125, 4, 205, 52, 168, 255, 252, 253, 75, 48, 96, 6, 8, 43, 6, 1, 5, 5, 7, 1, 1, 4, 84, 48, 82, 48, 37, 6, 8, 43, 6, 1, 5, 5, 7, 48, 1, 134, 25, 104, 116, 116, 112, 58, 47, 47, 111, 99, 115, 112, 46, 112, 107, 105, 46, 103, 111, 111, 103, 47, 103, 115, 114, 49, 48, 41, 6, 8, 43, 6, 1, 5, 5, 7, 48, 2, 134, 29, 104, 116, 116, 112, 58, 47, 47, 112, 107, 105, 46, 103, 111, 111, 103, 47, 103, 115, 114, 49, 47, 103, 115, 114, 49, 46, 99, 114, 116, 48, 50, 6, 3, 85, 29, 31, 4, 43, 48, 41, 48, 39, 160, 37, 160, 35, 134, 33, 104, 116, 116, 112, 58, 47, 47, 99, 114, 108, 46, 112, 107, 105, 46, 103, 111, 111, 103, 47, 103, 115, 114, 49, 47, 103, 115, 114, 49, 46, 99, 114, 108, 48, 59, 6, 3, 85, 29, 32, 4, 52, 48, 50, 48, 8, 6, 6, 103, 129, 12, 1, 2, 1, 48, 8, 6, 6, 103, 129, 12, 1, 2, 2, 48, 13, 6, 11, 43, 6, 1, 4, 1, 214, 121, 2, 5, 3, 2, 48, 13, 6, 11, 43, 6, 1, 4, 1, 214, 121, 2, 5, 3, 3, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 3, 130, 1, 1, 0, 52, 164, 30, 177, 40, 163, 208, 180, 118, 23, 166, 49, 122, 33, 233, 209, 82, 62, 200, 219, 116, 22, 65, 136, 184, 61, 53, 29, 237, 228, 255, 147, 225, 92, 95, 171, 187, 234, 124, 207, 219, 228, 13, 209, 139, 87, 242, 38, 111, 91, 190, 23, 70, 104, 148, 55, 111, 107, 122, 200, 192, 24, 55, 250, 37, 81, 172, 236, 104, 191, 178, 200, 73, 253, 90, 154, 202, 1, 35, 172, 132, 128, 43, 2, 140, 153, 151, 235, 73, 106, 140, 117, 215, 199, 222, 178, 201, 151, 159, 88, 72, 87, 14, 53, 161, 228, 26, 214, 253, 111, 131, 129, 111, 239, 140, 207, 151, 175, 192, 133, 42, 240, 245, 78, 105, 9, 145, 45, 225, 104, 184, 193, 43, 115, 233, 212, 217, 252, 34, 192, 55, 31, 11, 102, 29, 73, 237, 2, 85, 143, 103, 225, 50, 215, 211, 38, 191, 112, 227, 61, 244, 103, 109, 61, 124, 229, 52, 136, 227, 50, 250, 167, 110, 6, 106, 111, 189, 139, 145, 238, 22, 75, 232, 59, 169, 179, 55, 231, 195, 68, 164, 126, 216, 108, 215, 199, 70, 245, 146, 155, 231, 213, 33, 190, 102, 146, 25, 148, 85, 108, 212, 41, 178, 13, 193, 102, 91, 226, 119, 73, 72, 40, 237, 157, 215, 26, 51, 114, 83, 179, 130, 53, 207, 98, 139, 201, 36, 139, 165, 183, 57, 12, 187, 126, 42, 65, 191, 82, 207, 252, 162, 150, 182, 194, 130, 63] }, 'issuerCertificate': { 'subject': { 'C': 'BE', 'O': 'GlobalSign nv-sa', 'OU': 'Root CA', 'CN': 'GlobalSign Root CA' }, 'issuer': { 'C': 'BE', 'O': 'GlobalSign nv-sa', 'OU': 'Root CA', 'CN': 'GlobalSign Root CA' }, 'modulus': 'DA0EE6998DCEA3E34F8A7EFBF18B83256BEA481FF12AB0B9951104BDF063D1E26766CF1CDDCF1B482BEE8D898E9AAF298065ABE9C72D12CBAB1C4C7007A13D0A30CD158D4FF8DDD48C50151CEF50EEC42EF7FCE952F2917DE06DD535308E5E4373F241E9D56AE3B2893A5639386F063C88695B2A4DC5A754B86C89CC9BF93CCAE5FD89F5123C927896D6DC746E934461D18DC746B2750E86E8198AD56D6CD5781695A2E9C80A38EBF224134F73549313853A1BBC1E34B58B058CB9778BB1DB1F2091AB09536E90CE7B3774B97047912251631679AEB1AE412608C8192BD146AA48D6642AD78334FF2C2AC16C19434A0785E7D37CF62168EFEAF2529F7F9390CF', 'bits': 2048, 'exponent': '0x10001', 'pubkey': { 'type': 'Buffer', 'data': [48, 130, 1, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 1, 15, 0, 48, 130, 1, 10, 2, 130, 1, 1, 0, 218, 14, 230, 153, 141, 206, 163, 227, 79, 138, 126, 251, 241, 139, 131, 37, 107, 234, 72, 31, 241, 42, 176, 185, 149, 17, 4, 189, 240, 99, 209, 226, 103, 102, 207, 28, 221, 207, 27, 72, 43, 238, 141, 137, 142, 154, 175, 41, 128, 101, 171, 233, 199, 45, 18, 203, 171, 28, 76, 112, 7, 161, 61, 10, 48, 205, 21, 141, 79, 248, 221, 212, 140, 80, 21, 28, 239, 80, 238, 196, 46, 247, 252, 233, 82, 242, 145, 125, 224, 109, 213, 53, 48, 142, 94, 67, 115, 242, 65, 233, 213, 106, 227, 178, 137, 58, 86, 57, 56, 111, 6, 60, 136, 105, 91, 42, 77, 197, 167, 84, 184, 108, 137, 204, 155, 249, 60, 202, 229, 253, 137, 245, 18, 60, 146, 120, 150, 214, 220, 116, 110, 147, 68, 97, 209, 141, 199, 70, 178, 117, 14, 134, 232, 25, 138, 213, 109, 108, 213, 120, 22, 149, 162, 233, 200, 10, 56, 235, 242, 36, 19, 79, 115, 84, 147, 19, 133, 58, 27, 188, 30, 52, 181, 139, 5, 140, 185, 119, 139, 177, 219, 31, 32, 145, 171, 9, 83, 110, 144, 206, 123, 55, 116, 185, 112, 71, 145, 34, 81, 99, 22, 121, 174, 177, 174, 65, 38, 8, 200, 25, 43, 209, 70, 170, 72, 214, 100, 42, 215, 131, 52, 255, 44, 42, 193, 108, 25, 67, 74, 7, 133, 231, 211, 124, 246, 33, 104, 239, 234, 242, 82, 159, 127, 147, 144, 207, 2, 3, 1, 0, 1] }, 'valid_from': 'Sep 1 12:00:00 1998 GMT', 'valid_to': 'Jan 28 12:00:00 2028 GMT', 'fingerprint': 'B1:BC:96:8B:D4:F4:9D:62:2A:A8:9A:81:F2:15:01:52:A4:1D:82:9C', 'fingerprint256': 'EB:D4:10:40:E4:BB:3E:C7:42:C9:E3:81:D3:1E:F2:A4:1A:48:B6:68:5C:96:E7:CE:F3:C1:DF:6C:D4:33:1C:99', 'fingerprint512': '54:BA:00:4D:54:35:E8:B1:05:31:43:1C:39:2E:D9:97:76:12:0D:36:38:08:13:7D:E7:EB:59:03:04:63:F8:63:CA:DD:02:BD:F9:18:F5:96:B6:D2:09:64:B3:17:25:C2:36:3C:D7:60:17:99:CA:A9:36:0A:1C:36:FE:81:9F:BD', 'serialNumber': '040000000001154B5AC394', 'raw': { 'type': 'Buffer', 'data': [48, 130, 3, 117, 48, 130, 2, 93, 160, 3, 2, 1, 2, 2, 11, 4, 0, 0, 0, 0, 1, 21, 75, 90, 195, 148, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 5, 5, 0, 48, 87, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 66, 69, 49, 25, 48, 23, 6, 3, 85, 4, 10, 19, 16, 71, 108, 111, 98, 97, 108, 83, 105, 103, 110, 32, 110, 118, 45, 115, 97, 49, 16, 48, 14, 6, 3, 85, 4, 11, 19, 7, 82, 111, 111, 116, 32, 67, 65, 49, 27, 48, 25, 6, 3, 85, 4, 3, 19, 18, 71, 108, 111, 98, 97, 108, 83, 105, 103, 110, 32, 82, 111, 111, 116, 32, 67, 65, 48, 30, 23, 13, 57, 56, 48, 57, 48, 49, 49, 50, 48, 48, 48, 48, 90, 23, 13, 50, 56, 48, 49, 50, 56, 49, 50, 48, 48, 48, 48, 90, 48, 87, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 66, 69, 49, 25, 48, 23, 6, 3, 85, 4, 10, 19, 16, 71, 108, 111, 98, 97, 108, 83, 105, 103, 110, 32, 110, 118, 45, 115, 97, 49, 16, 48, 14, 6, 3, 85, 4, 11, 19, 7, 82, 111, 111, 116, 32, 67, 65, 49, 27, 48, 25, 6, 3, 85, 4, 3, 19, 18, 71, 108, 111, 98, 97, 108, 83, 105, 103, 110, 32, 82, 111, 111, 116, 32, 67, 65, 48, 130, 1, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 1, 15, 0, 48, 130, 1, 10, 2, 130, 1, 1, 0, 218, 14, 230, 153, 141, 206, 163, 227, 79, 138, 126, 251, 241, 139, 131, 37, 107, 234, 72, 31, 241, 42, 176, 185, 149, 17, 4, 189, 240, 99, 209, 226, 103, 102, 207, 28, 221, 207, 27, 72, 43, 238, 141, 137, 142, 154, 175, 41, 128, 101, 171, 233, 199, 45, 18, 203, 171, 28, 76, 112, 7, 161, 61, 10, 48, 205, 21, 141, 79, 248, 221, 212, 140, 80, 21, 28, 239, 80, 238, 196, 46, 247, 252, 233, 82, 242, 145, 125, 224, 109, 213, 53, 48, 142, 94, 67, 115, 242, 65, 233, 213, 106, 227, 178, 137, 58, 86, 57, 56, 111, 6, 60, 136, 105, 91, 42, 77, 197, 167, 84, 184, 108, 137, 204, 155, 249, 60, 202, 229, 253, 137, 245, 18, 60, 146, 120, 150, 214, 220, 116, 110, 147, 68, 97, 209, 141, 199, 70, 178, 117, 14, 134, 232, 25, 138, 213, 109, 108, 213, 120, 22, 149, 162, 233, 200, 10, 56, 235, 242, 36, 19, 79, 115, 84, 147, 19, 133, 58, 27, 188, 30, 52, 181, 139, 5, 140, 185, 119, 139, 177, 219, 31, 32, 145, 171, 9, 83, 110, 144, 206, 123, 55, 116, 185, 112, 71, 145, 34, 81, 99, 22, 121, 174, 177, 174, 65, 38, 8, 200, 25, 43, 209, 70, 170, 72, 214, 100, 42, 215, 131, 52, 255, 44, 42, 193, 108, 25, 67, 74, 7, 133, 231, 211, 124, 246, 33, 104, 239, 234, 242, 82, 159, 127, 147, 144, 207, 2, 3, 1, 0, 1, 163, 66, 48, 64, 48, 14, 6, 3, 85, 29, 15, 1, 1, 255, 4, 4, 3, 2, 1, 6, 48, 15, 6, 3, 85, 29, 19, 1, 1, 255, 4, 5, 48, 3, 1, 1, 255, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 96, 123, 102, 26, 69, 13, 151, 202, 137, 80, 47, 125, 4, 205, 52, 168, 255, 252, 253, 75, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 5, 5, 0, 3, 130, 1, 1, 0, 214, 115, 231, 124, 79, 118, 208, 141, 191, 236, 186, 162, 190, 52, 197, 40, 50, 181, 124, 252, 108, 156, 44, 43, 189, 9, 158, 83, 191, 107, 94, 170, 17, 72, 182, 229, 8, 163, 179, 202, 61, 97, 77, 211, 70, 9, 179, 62, 195, 160, 227, 99, 85, 27, 242, 186, 239, 173, 57, 225, 67, 185, 56, 163, 230, 47, 138, 38, 59, 239, 160, 80, 86, 249, 198, 10, 253, 56, 205, 196, 11, 112, 81, 148, 151, 152, 4, 223, 195, 95, 148, 213, 21, 201, 20, 65, 156, 196, 93, 117, 100, 21, 13, 255, 85, 48, 236, 134, 143, 255, 13, 239, 44, 185, 99, 70, 246, 170, 252, 223, 188, 105, 253, 46, 18, 72, 100, 154, 224, 149, 240, 166, 239, 41, 143, 1, 177, 21, 181, 12, 29, 165, 254, 105, 44, 105, 36, 120, 30, 179, 167, 28, 113, 98, 238, 202, 200, 151, 172, 23, 93, 138, 194, 248, 71, 134, 110, 42, 196, 86, 49, 149, 208, 103, 137, 133, 43, 249, 108, 166, 93, 70, 157, 12, 170, 130, 228, 153, 81, 221, 112, 183, 219, 86, 61, 97, 228, 106, 225, 92, 214, 246, 254, 61, 222, 65, 204, 7, 174, 99, 82, 191, 83, 83, 244, 43, 233, 199, 253, 182, 247, 130, 95, 133, 210, 65, 24, 219, 129, 179, 4, 28, 197, 31, 164, 128, 111, 21, 32, 201, 222, 12, 136, 10, 29, 214, 102, 85, 226, 252, 72, 201, 41, 38, 105, 224] }, 'issuerCertificate': None, 'validTo': '2028-01-28T12:00:00.000Z', 'daysRemaining': 1733 }, 'validTo': '2028-01-28T00:00:42.000Z', 'daysRemaining': 1732 }, 'validTo': '2027-09-30T00:00:42.000Z', 'daysRemaining': 1612 }, 'validTo': '2023-06-26T08:24:22.000Z', 'validFor': ['www.google.de'], 'daysRemaining': 56 } } }
- uptime() dict¶
Get monitor uptime.
- Returns:
Monitor uptime.
- Return type:
dict
Example:
>>> api.uptime() { 1: { 24: 1, 720: 1 } }
- info() dict¶
Get server info.
- Returns:
Server info.
- Return type:
dict
Example:
>>> api.info() { 'isContainer': True, 'latestVersion': '1.23.1', 'primaryBaseURL': '', 'serverTimezone': 'Europe/Berlin', 'serverTimezoneOffset': '+02:00', 'version': '1.23.1' }
- clear_events(monitor_id: int) dict¶
Clear monitor events.
- Parameters:
monitor_id (int) – Id of the monitor to clear events.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.clear_events(1) {}
- clear_heartbeats(monitor_id: int) dict¶
Clear monitor heartbeats.
- Parameters:
monitor_id (int) – Id of the monitor to clear heartbeats.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.clear_heartbeats(1) {}
- clear_statistics() dict¶
Clear statistics.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.clear_statistics() {}
- get_tags() list[dict]¶
Get all tags.
- Returns:
All tags.
- Return type:
list
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_tags() [ { 'color': '#ffffff', 'id': 1, 'name': 'tag 1' } ]
- get_tag(id_: int) dict¶
Get a tag.
- Parameters:
id (int) – Id of the monitor to get.
- Returns:
The tag.
- Return type:
dict
- Raises:
UptimeKumaException – If the tag does not exist.
Example:
>>> api.get_tag(1) { 'color': '#ffffff', 'id': 1, 'name': 'tag 1' }
- add_tag(**kwargs) dict¶
Add a tag.
- Parameters:
name (str) – Tag name
color (str) – Tag color
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.add_tag( ... name="tag 1", ... color="#ffffff" ... ) { 'color': '#ffffff', 'id': 1, 'name': 'tag 1' }
- edit_tag(id_: int, **kwargs) dict¶
Edits an existing tag.
- Parameters:
id (int) – Id of the tag to edit.
name (str, optional) – Tag name
color (str, optional) – Tag color
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.edit_tag(1, ... name="tag 1 new", ... color="#000000" ... ) { 'msg': 'Saved', 'tag': { 'id': 1, 'name': 'tag 1 new', 'color': '#000000' } }
- delete_tag(id_: int) dict¶
Delete a tag.
- Parameters:
id (int) – Id of the monitor to delete.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.delete_tag(1) { 'msg': 'Deleted Successfully.' }
- get_settings() dict¶
Get settings.
- Returns:
Settings.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_settings() { 'checkBeta': False, 'checkUpdate': False, 'chromeExecutable': '', 'disableAuth': False, 'dnsCache': True, 'entryPage': 'dashboard', 'keepDataPeriodDays': 180, 'nscd': False, 'primaryBaseURL': '', 'searchEngineIndex': False, 'serverTimezone': 'Europe/Berlin', 'steamAPIKey': '', 'tlsExpiryNotifyDays': [ 7, 14, 21 ], 'trustProxy': False }
- set_settings(password: Optional[str] = None, checkUpdate: bool = True, checkBeta: bool = False, keepDataPeriodDays: int = 180, serverTimezone: str = '', entryPage: str = 'dashboard', searchEngineIndex: bool = False, primaryBaseURL: str = '', steamAPIKey: str = '', nscd: bool = False, dnsCache: bool = False, chromeExecutable: str = '', tlsExpiryNotifyDays: Optional[list] = None, disableAuth: bool = False, trustProxy: bool = False) dict¶
Set settings.
- Parameters:
password (str, optional) – Password, defaults to None
checkUpdate (bool, optional) – Show update if available, defaults to True
checkBeta (bool, optional) – Also check beta release, defaults to False
keepDataPeriodDays (int, optional) – Keep monitor history data for X days. Set to 0 for infinite retention., defaults to 180
serverTimezone (str, optional) – Server Timezone, defaults to “”
entryPage (str, optional) – Entry Page, defaults to “dashboard”
searchEngineIndex (bool, optional) – Search Engine Visibility, defaults to False
primaryBaseURL (str, optional) – Primary Base URL, defaults to “”
steamAPIKey (str, optional) – Steam API Key. For monitoring a Steam Game Server you need a Steam Web-API key., defaults to “”
nscd (bool, optional) – Enable NSCD (Name Service Cache Daemon) for caching all DNS requests, defaults to False
dnsCache (bool, optional) – True to enable DNS Cache. It may be not working in some IPv6 environments, disable it if you encounter any issues., defaults to False
chromeExecutable (str, optional) – Chrome/Chromium Executable, defaults to “”
tlsExpiryNotifyDays (list, optional) – TLS Certificate Expiry. HTTPS Monitors trigger notification when TLS certificate expires in., defaults to None
disableAuth (bool, optional) – Disable Authentication, defaults to False
trustProxy (bool, optional) – Trust Proxy. Trust ‘X-Forwarded-*’ headers. If you want to get the correct client IP and your Uptime Kuma is behind such as Nginx or Apache, you should enable this., defaults to False
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.set_settings( ... checkUpdate=False, ... checkBeta=False, ... keepDataPeriodDays=180, ... serverTimezone="Europe/Berlin", ... entryPage="dashboard", ... searchEngineIndex=False, ... primaryBaseURL="", ... steamAPIKey="", ... dnsCache=False, ... tlsExpiryNotifyDays=[ ... 7, ... 14, ... 21 ... ], ... disableAuth=False, ... trustProxy=False ... ) { 'msg': 'Saved' }
- change_password(old_password: str, new_password: str) dict¶
Change password.
- Parameters:
old_password (str) – Old password
new_password (str) – New password
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.change_password( ... old_password="secret123", ... new_password="321terces" ... ) { 'msg': 'Password has been updated successfully.' }
- upload_backup(json_data: str, import_handle: str = 'skip') dict¶
Import Backup.
- Parameters:
json_data (str) – Backup data as json string.
import_handle (str, optional) – Choose “skip” if you want to skip every monitor or notification with the same name. “overwrite” will delete every existing monitor and notification. “keep” will keep both., defaults to “skip”
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> json_data = json.dumps({ ... "version": "1.17.1", ... "notificationList": [], ... "monitorList": [], ... "proxyList": [] ... }) >>> api.upload_backup( ... json_data=json_data, ... import_handle="overwrite" ... ) { 'msg': 'Backup successfully restored.' }
- twofa_status() dict¶
Get current 2FA status.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.twofa_status() { 'status': False }
- prepare_2fa(password: str) dict¶
Prepare 2FA configuration.
- Parameters:
password (str) – Current password.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> password = "secret123" >>> r = api.prepare_2fa(password) >>> r { 'uri': 'otpauth://totp/Uptime%20Kuma:admin?secret=NBGVQNSNNRXWQ3LJJN4DIWSWIIYW45CZJRXXORSNOY3USSKXO5RG4MDPI5ZUK5CWJFIFOVCBGZVG24TSJ5LDE2BTMRLXOZBSJF3TISA' } >>> uri = r["uri"] >>> >>> from urllib import parse >>> def parse_secret(uri): ... query = parse.urlsplit(uri).query ... params = dict(parse.parse_qsl(query)) ... return params["secret"] >>> secret = parse_secret(uri) >>> secret NBGVQNSNNRXWQ3LJJN4DIWSWIIYW45CZJRXXORSNOY3USSKXO5RG4MDPI5ZUK5CWJFIFOVCBGZVG24TSJ5LDE2BTMRLXOZBSJF3TISA
- verify_token(token: str, password: str) dict¶
Verify the provided 2FA token.
- Parameters:
token (str) – 2FA token.
password (str) – Current password.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> import pyotp >>> def generate_token(secret): ... totp = pyotp.TOTP(secret) ... return totp.now() >>> token = generate_token(secret) >>> token 526564 >>> api.verify_token(token, password) { 'valid': True }
- save_2fa(password: str) dict¶
Save the current 2FA configuration.
- Parameters:
password (str) – Current password.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.save_2fa(password) { 'msg': '2FA Enabled.' }
- disable_2fa(password: str) dict¶
Disable 2FA for this user.
- Parameters:
password (str) – Current password.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.disable_2fa(password) { 'msg': '2FA Disabled.' }
- login(username: Optional[str] = None, password: Optional[str] = None, token: str = '') dict¶
Login.
If username and password is not provided, auto login is performed if disableAuth is enabled.
- Parameters:
username (str, optional) – Username. Must be None if disableAuth is enabled., defaults to None
password (str, optional) – Password. Must be None if disableAuth is enabled., defaults to None
token (str, optional) – 2FA Token. Required if 2FA is enabled., defaults to “”
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> username = "admin" >>> password = "secret123" >>> api.login(username, password) { 'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNjcxMTk3MjkzfQ.lpho_LuKMnoltXOdA7-jZ98gXOU-UbEIuxMwMRm4Nz0' }
- login_by_token(token: str) dict¶
Login by token.
- Parameters:
token (str) – Login token generated by
login()- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.login_by_token(token) {}
- logout() None¶
Logout.
- Returns:
The server response.
- Return type:
None
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.logout() None
- need_setup() bool¶
Check if the server has already been set up.
- Returns:
The server response.
- Return type:
bool
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.need_setup() True
- setup(username: str, password: str) dict¶
Set up the server.
- Parameters:
username (str) – Username
password (str) – Password
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.setup(username, password) { 'msg': 'Added Successfully.' }
- get_database_size() dict¶
Get database size.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_database_size() { 'size': 61440 }
- shrink_database() dict¶
Shrink database.
Trigger database VACUUM for SQLite. If your database is created after 1.10.0, AUTO_VACUUM is already enabled and this action is not needed.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.shrink_database() {}
- get_docker_hosts() list[dict]¶
Get all docker hosts.
- Returns:
All docker hosts.
- Return type:
list
Example:
>>> api.get_docker_hosts() [ { 'dockerDaemon': '/var/run/docker.sock', 'dockerType': <DockerType.SOCKET: 'socket'>, 'id': 1, 'name': 'name 1', 'userID': 1 } ]
- get_docker_host(id_: int) dict¶
Get a docker host.
- Parameters:
id (int) – Id of the docker host to get.
- Returns:
The docker host.
- Return type:
dict
- Raises:
UptimeKumaException – If the docker host does not exist.
Example:
>>> api.get_docker_host(1) { 'dockerDaemon': '/var/run/docker.sock', 'dockerType': 'socket', 'id': 1, 'name': 'name 1', 'userID': 1 }
- test_docker_host(**kwargs) dict¶
Test a docker host.
- Parameters:
name (str) – Friendly Name
dockerType (DockerType) – Connection Type
dockerDaemon (str, optional) – Docker Daemon, defaults to None
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.test_docker_host( ... name="name 1", ... dockerType=DockerType.SOCKET, ... dockerDaemon="/var/run/docker.sock" ... ) { 'msg': 'Connected Successfully. Amount of containers: 10' }
- add_docker_host(**kwargs) dict¶
Add a docker host.
- Parameters:
name (str) – Friendly Name
dockerType (DockerType) – Connection Type
dockerDaemon (str, optional) – Docker Daemon, defaults to None
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.add_docker_host( ... name="name 1", ... dockerType=DockerType.SOCKET, ... dockerDaemon="/var/run/docker.sock" ... ) { 'id': 1, 'msg': 'Saved' }
- edit_docker_host(id_: int, **kwargs) dict¶
Edit a docker host.
- Parameters:
id (int) – Id of the docker host to edit.
name (str, optional) – Friendly Name
dockerType (DockerType, optional) – Connection Type
dockerDaemon (str, optional) – Docker Daemon, defaults to None
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.edit_docker_host(1, ... name="name 2" ... ) { 'id': 1, 'msg': 'Saved' }
- delete_docker_host(id_: int) dict¶
Delete a docker host.
- Parameters:
id (int) – Id of the docker host to delete.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.delete_docker_host(1) { 'msg': 'Deleted' }
- get_maintenances() list[dict]¶
Get all maintenances.
- Returns:
All maintenances.
- Return type:
list
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_maintenances() [ { "id": 1, "title": "title", "description": "description", "strategy": <MaintenanceStrategy.SINGLE: 'single'>, "intervalDay": 1, "active": true, "dateRange": [ "2022-12-27 15:39:00", "2022-12-30 15:39:00" ], "timeRange": [ { "hours": 0, "minutes": 0 }, { "hours": 0, "minutes": 0 } ], "weekdays": [], "daysOfMonth": [], "timeslotList": [ { "startDate": "2022-12-27 22:36:00", "endDate": "2022-12-29 22:36:00" } ], "cron": "", "durationMinutes": null, "timezoneOption": "Europe/Berlin", "timezoneOffset": "+02:00", "status": "ended" } ]
- get_maintenance(id_: int) dict¶
Get a maintenance.
- Parameters:
id (int) – Id of the maintenance to get.
- Returns:
The maintenance.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_maintenance(1) { "id": 1, "title": "title", "description": "description", "strategy": <MaintenanceStrategy.SINGLE: 'single'>, "intervalDay": 1, "active": true, "dateRange": [ "2022-12-27 15:39:00", "2022-12-30 15:39:00" ], "timeRange": [ { "hours": 0, "minutes": 0 }, { "hours": 0, "minutes": 0 } ], "weekdays": [], "daysOfMonth": [], "timeslotList": [ { "startDate": "2022-12-27 22:36:00", "endDate": "2022-12-29 22:36:00" } ], "cron": null, "duration": null, "durationMinutes": 0, "timezoneOption": "Europe/Berlin", "timezoneOffset": "+02:00", "status": "ended" }
- add_maintenance(**kwargs) dict¶
Adds a maintenance.
- Parameters:
title (str) – Title
strategy (MaintenanceStrategy) – Strategy
active (bool, optional) – True if maintenance is active, defaults to
Truedescription (str, optional) – Description, defaults to
""dateRange (list, optional) – DateTime Range, defaults to
["<current date>"]intervalDay (int, optional) – Interval (Run once every day), defaults to
1weekdays (list, optional) – List that contains the days of the week on which the maintenance is enabled (Sun =
0, Mon =1, …, Sat =6). Required forstrategyRECURRING_WEEKDAY., defaults to[].daysOfMonth (list, optional) – List that contains the days of the month on which the maintenance is enabled (Day 1 =
1, Day 2 =2, …, Day 31 =31) and the last day of the month ("lastDay1"). Required forstrategyRECURRING_DAY_OF_MONTH., defaults to[].timeRange (list, optional) – Maintenance Time Window of a Day, defaults to
[{"hours": 2, "minutes": 0}, {"hours": 3, "minutes": 0}].cron (str, optional) – Cron Schedule. Required for
strategyCRON., defaults to"30 3 * * *"durationMinutes (int, optional) – Duration (Minutes). Required for
strategyCRON., defaults to60timezone (str, optional) – Timezone, defaults to
None(Server Timezone)
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example (strategy:
MANUAL):>>> api.add_maintenance( ... title="test", ... description="test", ... strategy=MaintenanceStrategy.MANUAL, ... active=True, ... intervalDay=1, ... dateRange=[ ... "2022-12-27 00:00:00" ... ], ... weekdays=[], ... daysOfMonth=[] ... ) { "msg": "Added Successfully.", "maintenanceID": 1 }
Example (strategy:
SINGLE):>>> api.add_maintenance( ... title="test", ... description="test", ... strategy=MaintenanceStrategy.SINGLE, ... active=True, ... intervalDay=1, ... dateRange=[ ... "2022-12-27 22:36:00", ... "2022-12-29 22:36:00" ... ], ... weekdays=[], ... daysOfMonth=[], ... timezoneOption="Europe/Berlin" ... ) { "msg": "Added Successfully.", "maintenanceID": 1 }
Example (strategy:
RECURRING_INTERVAL):>>> api.add_maintenance( ... title="test", ... description="test", ... strategy=MaintenanceStrategy.RECURRING_INTERVAL, ... active=True, ... intervalDay=1, ... dateRange=[ ... "2022-12-27 22:37:00", ... "2022-12-31 22:37:00" ... ], ... timeRange=[ ... { ... "hours": 2, ... "minutes": 0, ... "seconds": 0 ... }, ... { ... "hours": 3, ... "minutes": 0, ... "seconds": 0 ... } ... ], ... weekdays=[], ... daysOfMonth=[], ... timezoneOption="Europe/Berlin" ... ) { "msg": "Added Successfully.", "maintenanceID": 1 }
Example (strategy:
RECURRING_WEEKDAY):>>> api.add_maintenance( ... title="test", ... description="test", ... strategy=MaintenanceStrategy.RECURRING_WEEKDAY, ... active=True, ... intervalDay=1, ... dateRange=[ ... "2022-12-27 22:38:00", ... "2022-12-31 22:38:00" ... ], ... timeRange=[ ... { ... "hours": 2, ... "minutes": 0, ... "seconds": 0 ... }, ... { ... "hours": 3, ... "minutes": 0, ... "seconds": 0 ... } ... ], ... weekdays=[ ... 1, ... 3, ... 5, ... 0 ... ], ... daysOfMonth=[], ... timezoneOption="Europe/Berlin" ... ) { "msg": "Added Successfully.", "maintenanceID": 1 }
Example (strategy:
RECURRING_DAY_OF_MONTH):>>> api.add_maintenance( ... title="test", ... description="test", ... strategy=MaintenanceStrategy.RECURRING_DAY_OF_MONTH, ... active=True, ... intervalDay=1, ... dateRange=[ ... "2022-12-27 22:39:00", ... "2022-12-31 22:39:00" ... ], ... timeRange=[ ... { ... "hours": 2, ... "minutes": 0, ... "seconds": 0 ... }, ... { ... "hours": 3, ... "minutes": 0, ... "seconds": 0 ... } ... ], ... weekdays=[], ... daysOfMonth=[ ... 1, ... 10, ... 20, ... 30, ... "lastDay1" ... ], ... timezoneOption="Europe/Berlin" ... ) { "msg": "Added Successfully.", "maintenanceID": 1 }
Example (strategy:
CRON):>>> api.add_maintenance( ... title="test", ... description="test", ... strategy=MaintenanceStrategy.CRON, ... active=True, ... intervalDay=1, ... dateRange=[ ... "2022-12-27 22:39:00", ... "2022-12-31 22:39:00" ... ], ... weekdays=[], ... daysOfMonth=[], ... cron="50 5 * * *", ... durationMinutes=120, ... timezoneOption="Europe/Berlin" ... ) { "msg": "Added Successfully.", "maintenanceID": 1 }
- edit_maintenance(id_: int, **kwargs) dict¶
Edits a maintenance.
- Parameters:
id (int) – Id of the maintenance to edit.
title (str, optional) – Title
strategy (MaintenanceStrategy, optional) – Strategy
active (bool, optional) – True if maintenance is active, defaults to
Truedescription (str, optional) – Description, defaults to
""dateRange (list, optional) – DateTime Range, defaults to
["<current date>"]intervalDay (int, optional) – Interval (Run once every day), defaults to
1weekdays (list, optional) – List that contains the days of the week on which the maintenance is enabled (Sun =
0, Mon =1, …, Sat =6). Required forstrategyRECURRING_WEEKDAY., defaults to[].daysOfMonth (list, optional) – List that contains the days of the month on which the maintenance is enabled (Day 1 =
1, Day 2 =2, …, Day 31 =31) and the last day of the month ("lastDay1"). Required forstrategyRECURRING_DAY_OF_MONTH., defaults to[].timeRange (list, optional) – Maintenance Time Window of a Day, defaults to
[{"hours": 2, "minutes": 0}, {"hours": 3, "minutes": 0}].cron (str, optional) – Cron Schedule. Required for
strategyCRON., defaults to"30 3 * * *"durationMinutes (int, optional) – Duration (Minutes). Required for
strategyCRON., defaults to60timezone (str, optional) – Timezone, defaults to
None(Server Timezone)
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.edit_maintenance(1, ... title="test", ... description="test", ... strategy=MaintenanceStrategy.RECURRING_INTERVAL, ... active=True, ... intervalDay=1, ... dateRange=[ ... "2022-12-27 22:37:00", ... "2022-12-31 22:37:00" ... ], ... timeRange=[ ... { ... "hours": 2, ... "minutes": 0, ... "seconds": 0 ... }, ... { ... "hours": 3, ... "minutes": 0, ... "seconds": 0 ... } ... ], ... weekdays=[], ... daysOfMonth=[] ... ) { "msg": "Saved.", "maintenanceID": 1 }
- delete_maintenance(id_: int) dict¶
Deletes a maintenance.
- Parameters:
id (int) – Id of the maintenance to delete.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.delete_maintenance(1) { "msg": "Deleted Successfully." }
- pause_maintenance(id_: int) dict¶
Pauses a maintenance.
- Parameters:
id (int) – Id of the maintenance to pause.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.pause_maintenance(1) { "msg": "Paused Successfully." }
- resume_maintenance(id_: int) dict¶
Resumes a maintenance.
- Parameters:
id (int) – Id of the maintenance to resume.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.resume_maintenance(1) { "msg": "Resume Successfully" }
- get_monitor_maintenance(id_: int) list[dict]¶
Gets all monitors of a maintenance.
- Parameters:
id (int) – Id of the maintenance to get the monitors from.
- Returns:
All monitors of the maintenance.
- Return type:
list
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_monitor_maintenance(1) [ { "id": 1 }, { "id": 2 } ]
- add_monitor_maintenance(id_: int, monitors: list) dict¶
Adds monitors to a maintenance.
- Parameters:
id (int) – Id of the maintenance to add the monitors to.
monitors (list) – The list of monitors to add to the maintenance.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> monitors = [ ... { ... "id": 1 ... }, ... { ... "id": 2 ... } ... ] >>> api.add_monitor_maintenance(1, monitors) { "msg": "Added Successfully." }
- get_status_page_maintenance(id_: int) list[dict]¶
Gets all status pages of a maintenance.
- Parameters:
id (int) – Id of the maintenance to get the status pages from.
- Returns:
All status pages of the maintenance.
- Return type:
list
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_status_page_maintenance(1) [ { "id": 1, "title": "test" } ]
- add_status_page_maintenance(id_: int, status_pages: list) dict¶
Adds status pages to a maintenance.
- Parameters:
id (int) – Id of the maintenance to add the monitors to.
status_pages (list) – The list of status pages to add to the maintenance.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> status_pages = [ ... { ... "id": 1 ... }, ... { ... "id": 2 ... } ... ] >>> api.add_status_page_maintenance(1, status_pages) { "msg": "Added Successfully." }
- get_api_keys() list[dict]¶
Get all api keys.
- Returns:
All api keys.
- Return type:
list
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.get_api_key_list() [ { "id": 1, "name": "test", "userID": 1, "createdDate": "2023-03-20 11:15:05", "active": False, "expires": null, "status": "inactive" }, { "id": 2, "name": "test2", "userID": 1, "createdDate": "2023-03-20 11:20:29", "active": True, "expires": "2023-03-30 12:20:00", "status": "active" } ]
- get_api_key(id_: int) dict¶
Get an api key.
- Parameters:
id (int) – Id of the api key to get.
- Returns:
The api key.
- Return type:
dict
- Raises:
UptimeKumaException – If the api key does not exist.
Example:
>>> api.get_api_key(1) { "id": 1, "name": "test", "userID": 1, "createdDate": "2023-03-20 11:15:05", "active": False, "expires": null, "status": "inactive" }
- add_api_key(name: str, expires: str, active: bool) dict¶
Adds a new api key.
- Parameters:
name (str) – Name of the api key.
expires (str) – Expiration date of the api key. Set to
Noneto disable expiration.active (bool) – True to activate api key.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.add_api_key( ... name="test", ... expires="2023-03-30 12:20:00", ... active=True ... ) { "msg": "Added Successfully.", "key": "uk1_9XPRjV7ilGj9CvWRKYiBPq9GLtQs74UzTxKfCxWY", "keyID": 1 } >>> api.add_api_key( ... name="test2", ... expires=None, ... active=True ... ) { "msg": "Added Successfully.", "key": "uk2_jsB9H1Zmt9eEjycNFMTKgse1B0Vfvb944H4_aRqW", "keyID": 2 }
- enable_api_key(id_: int) dict¶
Enable an api key.
- Parameters:
id (int) – Id of the api key to enable.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.enable_api_key(1) { "msg": "Enabled Successfully" }
- disable_api_key(id_: int) dict¶
Disable an api key.
- Parameters:
id (int) – Id of the api key to disable.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.disable_api_key(1) { "msg": "Disabled Successfully." }
- delete_api_key(id_: int) dict¶
Enable an api key.
- Parameters:
id (int) – Id of the api key to delete.
- Returns:
The server response.
- Return type:
dict
- Raises:
UptimeKumaException – If the server returns an error.
Example:
>>> api.delete_api_key(1) { "msg": "Deleted Successfully." }
- get_monitor_status(monitor_id: int) MonitorStatus¶
Get the monitor status.
- Parameters:
monitor_id (int) – Id of the monitor.
- Returns:
The monitor status.
- Return type:
- Raises:
UptimeKumaException – If the monitor does not exist.
Example:
>>> api.get_monitor_status(1) <MonitorStatus.PENDING: 2>
Enums¶
- class AuthMethod(value)¶
Enumerate authentication methods for monitors.
- NONE = ''¶
Authentication is disabled.
- HTTP_BASIC = 'basic'¶
HTTP Basic Authentication.
- NTLM = 'ntlm'¶
NTLM Authentication.
- MTLS = 'mtls'¶
mTLS Authentication.
- OAUTH2_CC = 'oauth2-cc'¶
OAuth2: Client Credentials
- class MonitorType(value)¶
Enumerate monitor types.
- GROUP = 'group'¶
Group
- HTTP(s) = 'http'¶
HTTP(s)
- PORT = 'port'¶
TCP Port
- PING = 'ping'¶
Ping
- KEYWORD = 'keyword'¶
HTTP(s) - Keyword
- JSON_QUERY = 'json-query'¶
HTTP(s) - Json Query
- GRPC_KEYWORD = 'grpc-keyword'¶
gRPC(s) - Keyword
- DNS = 'dns'¶
DNS
- DOCKER = 'docker'¶
Docker Container
- REAL_BROWSER = 'real-browser'¶
HTTP(s) - Browser Engine (Chrome/Chromium)
- PUSH = 'push'¶
Push
- STEAM = 'steam'¶
Steam Game Server
- GAMEDIG = 'gamedig'¶
GameDig
- MQTT = 'mqtt'¶
MQTT
- KAFKA_PRODUCER = 'kafka-producer'¶
Kafka Producer
- SQLSERVER = 'sqlserver'¶
Microsoft SQL Server
- POSTGRES = 'postgres'¶
PostgreSQL
- MYSQL = 'mysql'¶
MySQL/MariaDB
- MONGODB = 'mongodb'¶
MongoDB
- RADIUS = 'radius'¶
Radius
- REDIS = 'redis'¶
Redis
- TAILSCALE_PING = 'tailscale-ping'¶
Tailscale Ping
- class MonitorStatus(value)¶
Enumerate monitor statuses.
- DOWN = 0¶
DOWN
- UP = 1¶
UP
- PENDING = 2¶
PENDING
- MAINTENANCE = 3¶
MAINTENANCE
- class NotificationType(value)¶
Enumerate notification types.
- ALERTA = 'alerta'¶
Alerta
- ALERTNOW = 'AlertNow'¶
AlertNow
- ALIYUNSMS = 'AliyunSMS'¶
AliyunSMS
- APPRISE = 'apprise'¶
Apprise (Support 50+ Notification services)
- BARK = 'Bark'¶
Bark
- CLICKSENDSMS = 'clicksendsms'¶
ClickSend SMS
- DINGDING = 'DingDing'¶
DingDing
- DISCORD = 'discord'¶
Discord
- FEISHU = 'Feishu'¶
Feishu
- FLASHDUTY = 'FlashDuty'¶
FlashDuty
- FREEMOBILE = 'FreeMobile'¶
FreeMobile (mobile.free.fr)
- GOALERT = 'GoAlert'¶
GoAlert
- GOOGLECHAT = 'GoogleChat'¶
Google Chat (Google Workspace)
- GORUSH = 'gorush'¶
Gorush
- GOTIFY = 'gotify'¶
Gotify
- HOMEASSISTANT = 'HomeAssistant'¶
Home Assistant
- KOOK = 'Kook'¶
Kook
- LINE = 'line'¶
LINE Messenger
- LINENOTIFY = 'LineNotify'¶
LINE Notify
- LUNASEA = 'lunasea'¶
LunaSea
- MATRIX = 'matrix'¶
Matrix
- MATTERMOST = 'mattermost'¶
Mattermost
- NOSTR = 'nostr'¶
Nostr
- NTFY = 'ntfy'¶
Ntfy
- OCTOPUSH = 'octopush'¶
Octopush
- ONEBOT = 'OneBot'¶
OneBot
- OPSGENIE = 'Opsgenie'¶
Opsgenie
- PAGERDUTY = 'PagerDuty'¶
PagerDuty
- PAGERTREE = 'PagerTree'¶
PagerTree
- PROMOSMS = 'promosms'¶
PromoSMS
- PUSHBULLET = 'pushbullet'¶
Pushbullet
- PUSHDEER = 'PushDeer'¶
PushDeer
- PUSHOVER = 'pushover'¶
Pushover
- PUSHY = 'pushy'¶
Pushy
- ROCKET_CHAT = 'rocket.chat'¶
Rocket.Chat
- SERVERCHAN = 'ServerChan'¶
ServerChan
- SERWERSMS = 'serwersms'¶
SerwerSMS.pl
- SIGNAL = 'signal'¶
Signal
- SLACK = 'slack'¶
Slack
- SMSC = 'smsc'¶
SMSC
- SMSEAGLE = 'SMSEagle'¶
SMSEagle
- SMSMANAGER = 'SMSManager'¶
SmsManager (smsmanager.cz)
- SMTP = 'smtp'¶
Email (SMTP)
- SPLUNK = 'Splunk'¶
Splunk
- SQUADCAST = 'squadcast'¶
SquadCast
- STACKFIELD = 'stackfield'¶
Stackfield
- TEAMS = 'teams'¶
Microsoft Teams
- PUSHBYTECHULUS = 'PushByTechulus'¶
Push by Techulus
- TELEGRAM = 'telegram'¶
Telegram
- TWILIO = 'twilio'¶
Twilio
- WEBHOOK = 'webhook'¶
Webhook
- WECOM = 'WeCom'¶
WeCom
- ZOHOCLIQ = 'ZohoCliq'¶
ZohoCliq
- class ProxyProtocol(value)¶
Enumerate proxy protocols.
- HTTPS = 'https'¶
HTTPS
- HTTP = 'http'¶
HTTP
- SOCKS = 'socks'¶
SOCKS
- SOCKS5 = 'socks5'¶
SOCKS v5
- SOCKS5H = 'socks5h'¶
SOCKS v5 (+DNS)
- SOCKS4 = 'socks4'¶
SOCKS v4
- class IncidentStyle(value)¶
Enumerate incident styles.
- INFO = 'info'¶
Info
- WARNING = 'warning'¶
Warning
- DANGER = 'danger'¶
Danger
- PRIMARY = 'primary'¶
Primary
- LIGHT = 'light'¶
Light
- DARK = 'dark'¶
Dark
- class DockerType(value)¶
Enumerate docker connection types.
- SOCKET = 'socket'¶
Socket
- TCP = 'tcp'¶
TCP
- class MaintenanceStrategy(value)¶
Enumerate maintenance strategies.
- MANUAL = 'manual'¶
Active/Inactive Manually
- SINGLE = 'single'¶
Single Maintenance Window
- RECURRING_INTERVAL = 'recurring-interval'¶
Recurring - Interval
- RECURRING_WEEKDAY = 'recurring-weekday'¶
Recurring - Day of Week
- RECURRING_DAY_OF_MONTH = 'recurring-day-of-month'¶
Recurring - Day of Month
- CRON = 'cron'¶
Cron Expression
Exceptions¶
- exception UptimeKumaException¶
There was an exception that occurred while communicating with Uptime Kuma.
- exception Timeout¶
A timeout has occurred while communicating with Uptime Kuma.