Get Hub's desired activities

FieldTypeDescription
from_date
optional when to_date is also not provided
StringTo filter the hub activities logs for the events from the given date string.

DEFAULT VALUE: current_date - 1week
FORMAT : "MM/DD/YYYY"
to_date
optional when from_date is also not provided
StringTo filter the hub activities logs for the events till the given date string.

DEFAULT VALUE: Current date
FORMAT : "MM/DD/YYYY"
eventsStringTo filter the hub activities logs for the passed events within the given date range.

FORMAT: String with comma separated values.
EXAMPLE: add_device,remove_device
POSSIBLE VALUES: add_device, remove_device

The API returns status code 422 - Unprocessable Entity for the following scenarios:

  • When the events param is not available
  • When events param is passed with empty value
  • When events has values other than permitted event_types
  • When from_date is available in the param but not to_date
  • When to_date is available in the param but not from_date
  • When either of date field doesn't match format MM/DD/YYYY
  • When the from_date is after the to_date
  • When the date range is more than a week

The API returns status code 403 - Forbidden for the following scenarios:

  • When hub is not found
  • When resident access the API
  • When the agent doesn't have access for the hub logs requested
    • When the agent is from different company
    • When the agent access hub's previous logs (when both from_date and to_date are before hub's company_change_date)

NOTE:

  • When the from_date is before the hub's company change date, but the agent has access to the logs within the given date range, then the API returns the response hash with requested events from the date to which the agent has access.
  • Example 1:
    • hub's company_change_date -> Jan 10 2023
    • from_date -> '01/07/2023'
    • to_date -> '01/12/2023'
    • In this scenario, the API returns data from Jan 10 till Jan 12.
  • Example 2:
    • hub's company_change_date -> Jan 10 2023
    • from_date -> '01/01/2023'
    • to_date -> '01/07/2023'
    • In this scenario, the API returns data 403 error.
  • Example 3:
    • hub's company_change_date -> Jan 10 2023
    • from_date -> '01/10/2023'
    • to_date -> '01/10/2023'
    • In this scenario, the API returns Jan 10 activities.
Language
URL
Click Try It! to start a request and see the response here!