device_posture_monitor.metrics_api_client module

class device_posture_monitor.metrics_api_client.MetricsApiClient

Bases: object

Simple client for the worker api that collects metrics

send_test_data(test_name: str, status: str) dict

Sends test data to the Worker API.

I think there is rate limiting on these APIs so we don’t want to make a ton of requests. A single test result is fine for now.

Parameters:
  • test_name (str) – The name of the test.

  • status (str) – The test status (‘passed’, ‘failed’, etc.).

Returns:

The JSON response from the API.

Return type:

dict