Asana: Get audit log events
Asana auditLogApi.getAuditLogEvents: arguments, response, policy and SDK examples.
← Audit log API operations · Get started
Operation asana.getauditlogevents
Provider route: GET /workspaces/{workspace_gid}/audit_log_events. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/asana with npm, or alter-sdk-asana with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { AsanaIntegration } from "@alter-ai/asana";
async function execute(input: Parameters<AsanaIntegration["auditLogApi"]["getAuditLogEvents"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new AsanaIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.auditLogApi.getAuditLogEvents(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_asana import AsanaIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = AsanaIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.audit_log_api.get_audit_log_events(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.workspace_gid | string | Required within parent | |
query | object | Optional | Additional keys: not allowed |
query.start_at | string | Optional | Format: date-time |
query.end_at | string | Optional | Format: date-time |
query.event_type | string | Optional | |
query.actor_type | string | Optional | One of: user, asana, asana_support, anonymous, external_administrator |
query.actor_gid | string | Optional | |
query.resource_gid | string | Optional | |
query.limit | integer | Optional | Minimum: 1 Maximum: 100 |
query.offset | string | Optional |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | object | All variants apply | |
$ (allOf 1).data | array | Optional | |
$ (allOf 1).data[] | Model | Each item | Expand Get audit log events — response body — data, next page data item — Audit Log Event |
$ (allOf 1).next_page | Model | Optional | Expand Get goals — response body — data, next page next page |
$ (allOf 2) | Model | All variants apply | Expand Get audit log events — response body — data, next page |
Referenced models: Get goals — response body — data, next page next page, Get audit log events — response body — data, next page data item — Audit Log Event, Get audit log events — response body — data, next page
Schemas
Section titled “Schemas”4 more schemas are linked from the tables above, on the schema pages.
Get goals — response body — data, next page next page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | object | Alternative | *Conditional*. This property is only present when a limit query parameter is provided in the request. When making a paginated request, the API will return a number of results as specified by the limit parameter. If more results exist, then the response will contain a next_page attribute, which will include an offset, a relative path attribute, and a full uri attribute. If there are no more pages available, next_page will be null and no offset will be provided. Note that an offset token will expire after some time, as data may have changed. |
$ (anyOf 1).offset | string | Optional | Pagination offset for the request. Read only: true |
$ (anyOf 1).path | string | Optional | A relative path containing the query parameters to fetch for next_page Read only: true |
$ (anyOf 1).uri | string | Optional | A full uri containing the query parameters to fetch for next_page Format: uri Read only: true |
$ (anyOf 2) | null | Alternative |
Get audit log events — response body — data, next page data item — Audit Log Event
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An object representing a single event within an Asana domain. Every audit log event is comprised of an `event_type`, `actor`, `resource`, and `context`. Some events will include additional metadata about the event under `details`. See our [currently supported list of events](/docs/audit-log-events#supported-audit-log-events) for more details. |
gid | string | Optional | Globally unique identifier of the `AuditLogEvent`, as a string. |
created_at | string | Optional | The time the event was created. Format: date-time |
event_type | string | Optional | The type of the event. |
event_category | string | Optional | The category that this `event_type` belongs to. |
actor | Model | Optional | Expand Get audit log events — response body — data, next page data item actor — Audit Log Event Actor |
resource | Model | Optional | Expand Get audit log events — response body — data, next page data item resource — Audit Log Event Resource |
details | Model | Optional | Expand Get audit log events — response body — data, next page data item details — Audit Log Event Details |
context | Model | Optional | Expand Get audit log events — response body — data, next page data item context — Audit Log Event Context |
Referenced models: Get audit log events — response body — data, next page data item details — Audit Log Event Details, Get audit log events — response body — data, next page data item resource — Audit Log Event Resource, Get audit log events — response body — data, next page data item actor — Audit Log Event Actor, Get audit log events — response body — data, next page data item context — Audit Log Event Context
Get audit log events — response body — data, next page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | |
data[] | Model | Each item | Expand Get audit log events — response body — data, next page data item — sdk__Audit Log Event |
next_page | Model | Optional | Expand Get goals — response body — data, next page next page |
Referenced models: Get goals — response body — data, next page next page, Get audit log events — response body — data, next page data item — sdk__Audit Log Event
Get audit log events — response body — data, next page data item details — Audit Log Event Details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Event specific details. The schema will vary depending on the `event_type`. Additional keys: allowed |
old_value | JSON | Optional | |
old_value (anyOf 1) | string | Alternative | The previous value of the field that was modified in the audited event. |
old_value (anyOf 2) | null | Alternative | |
new_value | JSON | Optional | |
new_value (anyOf 1) | string | Alternative | The new value after the modification in the audited event. |
new_value (anyOf 2) | null | Alternative | |
group | object | Optional | The division or organizational unit where the event occurred. Primarily used to scope role change events (e.g., `user_division_admin_role_changed`), but may appear in other contexts involving group-level changes. Additional keys: allowed |
saml_response | JSON | Optional | |
saml_response (anyOf 1) | string | Alternative | The response received from the IdP when a user logs in with SAML SSO. Present on `user_login_failed` and `user_login_succeeded` events. |
saml_response (anyOf 2) | null | Alternative |
Get audit log events — response body — data, next page data item resource — Audit Log Event Resource
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The primary object that was affected by this event. |
resource_type | string | Optional | The type of resource. |
resource_subtype | string | Optional | The subtype of resource. Most resources will not have a subtype. |
gid | string | Optional | Globally unique identifier of the resource. |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The name of the resource. |
name (anyOf 2) | null | Alternative | |
email | string | Optional | The email of the resource, if applicable. |
Get audit log events — response body — data, next page data item actor — Audit Log Event Actor
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The entity that triggered the event. Will typically be a user. |
actor_type | string | Optional | The type of actor. Can be one of `user`, `asana`, `asana_support`, `anonymous`, `external_administrator`, or `data_retention_policy`. Known values: user, asana, asana_support, anonymous, external_administrator, data_retention_policy |
gid | string | Optional | Globally unique identifier of the actor, if it is a user. |
name | string | Optional | The name of the actor, if it is a user. |
email | string | Optional | The email of the actor, if it is a user. |
Get audit log events — response body — data, next page data item context — Audit Log Event Context
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The context from which this event originated. |
context_type | string | Optional | The type of context. Can be one of `web`, `desktop`, `mobile`, `asana_support`, `asana`, `email`, or `api`. Known values: web, desktop, mobile, asana_support, asana, email, api |
api_authentication_method | string | Optional | The authentication method used in the context of an API request. Only present if the `context_type` is `api`. Can be one of `cookie`, `oauth`, `personal_access_token`, or `service_account`. Known values: cookie, oauth, personal_access_token, service_account |
client_ip_address | string | Optional | The IP address of the client that initiated the event, if applicable. |
user_agent | string | Optional | The user agent of the client that initiated the event, if applicable. |
oauth_app_name | string | Optional | The name of the OAuth App that initiated the event. Only present if the `api_authentication_method` is `oauth`. |
rule_name | string | Optional | The name of the automation rule that initiated the event. |
on_behalf_of_user_id | JSON | Optional | |
on_behalf_of_user_id (anyOf 1) | integer | Alternative | The ID of the user who requested a change via support. |
on_behalf_of_user_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Get audit log events — response body — data, next page data item details — shared_auditlogeventdetails_5d1508c34080
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Event specific details. The schema will vary depending on the `event_type`. Additional keys: allowed |
old_value | JSON | Optional | |
old_value (anyOf 1) | string | Alternative | The previous value of the field that was modified in the audited event. |
old_value (anyOf 2) | null | Alternative | |
new_value | JSON | Optional | |
new_value (anyOf 1) | string | Alternative | The new value after the modification in the audited event. |
new_value (anyOf 2) | null | Alternative | |
group | object | Optional | The division or organizational unit where the event occurred. Primarily used to scope role change events (e.g., `user_division_admin_role_changed`), but may appear in other contexts involving group-level changes. Additional keys: allowed |
saml_response | JSON | Optional | |
saml_response (anyOf 1) | string | Alternative | The response received from the IdP when a user logs in with SAML SSO. Present on `user_login_failed` and `user_login_succeeded` events. |
saml_response (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: asana.getauditlogevents. Catalog operation: asana:getAuditLogEvents. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.