Logs

OneAndOne::Log()

The Log class allows a user to perform actions against the 1and1 API.

list(page: nil, per_page: nil, sort: nil, q: nil, fields: nil, period: 'LAST_24H', start_date: nil, end_date: nil)

List all logs by time period.

Parameters:
  • page (int) – Allows the use of pagination. Indicate which page to start on.
  • per_page (int) – Number of items per page.
  • sort (str) – sort: 'name' retrieves a list of elements sorted alphabetically. sort: 'creation_date' retrieves a list of elements sorted by their creation date in descending order.
  • q (str) – q is for query. Use this parameter to return only the items that match your search query.
  • fields (str) – Returns only the parameters requested. (i.e. fields: ‘id, name, description, hardware.ram’)
  • period (str) – the time range of logs to be shown. Possible values are 'LAST_HOUR', 'LAST_24H', 'LAST_7D', 'LAST_30D', 'LAST_365D', or 'CUSTOM'
  • start_date (str) – start point. Only required if using 'CUSTOM' for the period parameter. Format: 2015-19-05T00:05:00Z
  • end_date (str) – end point. Only required if using 'CUSTOM' for the period parameter. Format: 2015-19-05T00:10:00Z
Return type:

JSON

get(log_id: nil)

Returns information about a log

Parameters:
  • log_id (str) – the unique identifier for the log.
Return type:

JSON