@@ -366,7 +366,7 @@ This table shows how V2 resources map to their respective V3 counterparts. Note
366366| Buildpacks| Buildpacks|
367367| Domains, Shared Domains, Private Domains| Domains| [ Domains in V3] ( #domains-in-v3 ) |
368368| Environment Variable Groups| Environment Variable Groups|
369- | Events| Audit Events|
369+ | Events| Audit Events| [ Audit Events in V3 ] ( #audit-events-in-v3 ) |
370370| Feature Flags| Feature Flags|
371371| Jobs| Jobs|
372372| Organizations| Organizations|
@@ -394,6 +394,43 @@ In V3, there is only one domain resource. A domain is "shared" if it has an "own
394394
395395Read more about the [ domain resource] ( #domains ) .
396396
397+ ### Audit Events in V3
398+
399+ In V2, these were called "events" (e.g. ` /v2/events ` ). In V3, we adopt the term
400+ "audit events" to better distinguish them from usage events.
401+
402+ V2 audit events contained information about the "actee" (the resource that the
403+ event affected). V3 audit events refer to the affected resource as the "target".
404+
405+ V2 audit events had a ` timestamp ` field. In V3, this field has been renamed to
406+ ` created_at ` for consistency with other resources. The value is the same.
407+
408+ In general, V3 audit events contain all of the same information that they
409+ contained in V2, but the JSON is structured a little differently. In particular:
410+
411+ - The ` metadata ` field has been renamed to ` data ` .
412+ - Actor-related fields have been grouped into an object under the ` actor ` key
413+ (e.g. ` actor.type ` instead of ` actor_type ` ).
414+ - Actee-related fields have been grouped under the ` target ` key (e.g.
415+ ` target.type ` instead of ` actee_type ` ).
416+
417+ At the time of this writing, V3 does not support greater-than or less-than
418+ filtering for the ` created_at ` field. In V2, this was supported via
419+ ` /v2/events?q=timestamp>some_timestamp ` . There are plans support this in the
420+ future.
421+
422+ V3 endpoints attempt to report audit events in the same way as V2 endpoints did.
423+ A notable case where this was not possible is for the ` audit.app.restage ` event.
424+ In V2, there was a restage-app endpoint, and this event was reported when that
425+ endpoint was used. In V3, the concept of "staging" has been broken down into
426+ composable pieces (creating packages, creating builds to produce droplets,
427+ assigning droplets, etc.). There is no longer a clear concept of "restaging" on
428+ the V3 API. Instead, it is suggested to rely on events corresponding to these
429+ individual steps (e.g. ` audit.app.package.create ` , ` audit.app.build.create ` ,
430+ ` audit.app.droplet.create ` ).
431+
432+ Read more about the [ audit event resource] ( #audit-events ) .
433+
397434### Organization Quotas in V3
398435
399436In V2, ` -1 ` represented an unlimited value for a quota limit.
0 commit comments