HubstaffDeveloper Portal

Audit log entries

Read organization audit log entries

List organization audit log entries

GET/v2/organizations/{organization_id}/audit_log_entries

Returns a collection of audit log entries for the given organization.

Requires the organization to be on an Enterprise plan. Requires Owner or Organization Manager role (with view others data permission). Payment-scoped entries are visible only to Owners and Managers with the manage billing permission.

Results can be filtered by created[start]/[stop], event_action, record_type, subject_user_id, and ip.

Date range limit is 7 days. To walk a longer history, slide the created[start]/created[stop] window across the retention range.

Parameters

NameInTypeDescription
organization_idrequired
pathinteger (int32)
page_start_id
queryinteger (int32)
The page start ID.
page_limit
queryinteger (int32)
The default page size
created[start]required
querystring (date-time)
Start time (ISO 8601)
created[stop]required
querystring (date-time)
Stop time (ISO 8601, exclusive)
event_action
querystring
Filter by event action
record_type
querystring
Filter by audited record type
subject_user_id
queryinteger (int32)
Filter by subject user ID
ip
querystring
Filter by the IP recorded on the audit row
include_removed_members
queryboolean
Include rows whose subject user is a removed member
include_archived_projects
queryboolean
Include rows for archived projects

Responses

200A list of audit log entries
object
  • organization_audit_log_entriesarray
    array<object>
    items
    object

    OrganizationAuditLogEntry model

    • idinteger required

      Audit log entry ID

    • organization_idinteger required

      Organization ID

    • subject_user_idinteger required

      Subject user ID (may be null)

    • actionstring required

      The event action (e.g. location_changed)

    • record_typestring required

      Record type the action was applied to

    • record_idinteger required

      Record ID the action was applied to

    • user_idinteger required

      Actor user ID (may be null for system-initiated changes)

    • ipstring required

      IP address recorded with the event

    • detailsobject required

      Action-specific details, whitelisted per action

      object

      Action-specific details, whitelisted per action

    • created_atstring required

      When the record was created

    • updated_atstring required

      When the record was last updated

Example response
json
{
  "organization_audit_log_entries": [
    {
      "id": 0,
      "organization_id": 0,
      "subject_user_id": 0,
      "action": "string",
      "record_type": "string",
      "record_id": 0,
      "user_id": 0,
      "ip": "string",
      "details": {},
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ]
}
400Invalid parameters
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
401Unauthorized
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
403API access is only for organizations on an active plan
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
404Could not find record
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}
429Rate limit exceeded
object

Hubstaff_Public_V2_Entities_Error model

  • codestring required

    Legacy string error code for backward compatibility

  • error_codeinteger

    Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference.

  • errorstring required

    Human-readable error message

  • detailsarray

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    array<string>

    Per-attribute validation errors: [{attribute, error}]. Present on validation failures.

    items
    string
Example response
json
{
  "code": "string",
  "error_code": 0,
  "error": "string",
  "details": [
    "string"
  ]
}