Module maxar_platform.monitoring
Provides
Functions to maintain Monitors:
- create and update a monitor
- enable/disable a monitor
- get one or list many monitors
- see events that the monitor has matched
Reference
https://developers.maxar.com/docs/monitoring/
Functions
create_monitor(monitor_payload)
: Create a new monitor
Parameters
----------
monitor_payload : dict
Dictionary of monitor settings
Returns
-------
dict
Data for the monitor
disable_monitor(monitor_id)
: Disable a monitor
Parameters
----------
monitor_id : str
monitor ID to disable
Returns
-------
enable_monitor(monitor_id)
: Enable a monitor
Parameters
----------
monitor_id : str
monitor ID to enable
Returns
-------
get_monitor(monitor_id)
: Fetch raw data about a monitor from an ID
Parameters
----------
monitor_id : str
Monitor ID to fetch metadata for
Returns
-------
dict
API data for the given monitor
list_monitor_events(monitor_id)
: Fetch the events for a monitor from an ID
Parameters
----------
monitor_id : str
monitor ID to fetch events for
Returns
-------
list
Matched events for the given monitor
list_monitors(limit=100, sort='desc', filter=None)
: Fetch user's monitors
Parameters
----------
limit: int or None, default None
Maximum number of orders to fetch, None means unlimited, default is 100.
sort: str
Sort order for order IDs, either 'asc' (ascending) or 'desc' (descending). Default is 'desc'.
filter: str or iterable of strings
Filter results using `field:value` syntax.
Matches are case sensitive and will match if the value is found anywhere in the field: filtering on a value of `description:NV` will return `Las Vegas, NV` along with `DENVER CO` descriptions.
Multiple filters can be passed but keys must be unique since filters will be logically ANDed.
Example: 'description:denver' or ['name:denver', 'description:parking']
Returns
-------
list
monitor objects matching parameters
update_monitor(monitor_id, monitor_payload)
: Update an existing monitor with new settings
Parameters
----------
monitor_id : str
Monitor ID to fetch metadata for
monitor_payload : dict
Dictionary of updated fields for the existing monitor
Returns
-------
dict
Data for the updated monitor