preheat_open.api.api_get

preheat_open.api.api_get(endpoint, out='json', payload=None, headers=None, bare_url=False)

Method to send a GET request to the API

Parameters:
  • endpoint (str) – URL of the endpoint

  • out (str) – output type (json or csv)

  • payload (Optional[dict[str, Any]]) – payload for the request

  • headers (Optional[dict[str, Any]]) – headers to use for the request

  • bare_url (bool) – if True, uses the endpoint as full URL (and skips base URL additions)

Return type:

Response

Returns:

API response in request.Response format