Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.workspace_gidstringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.start_atstringOptionalFormat: date-time
query.end_atstringOptionalFormat: date-time
query.event_typestringOptional
query.actor_typestringOptionalOne of: user, asana, asana_support, anonymous, external_administrator
query.actor_gidstringOptional
query.resource_gidstringOptional
query.limitintegerOptionalMinimum: 1
Maximum: 100
query.offsetstringOptional

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)objectAll variants apply
$ (allOf 1).dataarrayOptional
$ (allOf 1).data[]ModelEach itemExpand Get audit log events — response body — data, next page data item — Audit Log Event
$ (allOf 1).next_pageModelOptionalExpand Get goals — response body — data, next page next page
$ (allOf 2)ModelAll variants applyExpand 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

4 more schemas are linked from the tables above, on the schema pages.

Get goals — response body — data, next page next page
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternative*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).offsetstringOptionalPagination offset for the request.
Read only: true
$ (anyOf 1).pathstringOptionalA relative path containing the query parameters to fetch for next_page
Read only: true
$ (anyOf 1).uristringOptionalA full uri containing the query parameters to fetch for next_page
Format: uri
Read only: true
$ (anyOf 2)nullAlternative
Get audit log events — response body — data, next page data item — Audit Log Event
FieldTypePresenceDescription and constraints
$objectRootAn 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.
gidstringOptionalGlobally unique identifier of the `AuditLogEvent`, as a string.
created_atstringOptionalThe time the event was created.
Format: date-time
event_typestringOptionalThe type of the event.
event_categorystringOptionalThe category that this `event_type` belongs to.
actorModelOptionalExpand Get audit log events — response body — data, next page data item actor — Audit Log Event Actor
resourceModelOptionalExpand Get audit log events — response body — data, next page data item resource — Audit Log Event Resource
detailsModelOptionalExpand Get audit log events — response body — data, next page data item details — Audit Log Event Details
contextModelOptionalExpand 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
FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parent
data[]ModelEach itemExpand Get audit log events — response body — data, next page data item — sdk__Audit Log Event
next_pageModelOptionalExpand 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
FieldTypePresenceDescription and constraints
$objectRootEvent specific details. The schema will vary depending on the `event_type`.
Additional keys: allowed
old_valueJSONOptional
old_value (anyOf 1)stringAlternativeThe previous value of the field that was modified in the audited event.
old_value (anyOf 2)nullAlternative
new_valueJSONOptional
new_value (anyOf 1)stringAlternativeThe new value after the modification in the audited event.
new_value (anyOf 2)nullAlternative
groupobjectOptionalThe 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_responseJSONOptional
saml_response (anyOf 1)stringAlternativeThe 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)nullAlternative
Get audit log events — response body — data, next page data item resource — Audit Log Event Resource
FieldTypePresenceDescription and constraints
$objectRootThe primary object that was affected by this event.
resource_typestringOptionalThe type of resource.
resource_subtypestringOptionalThe subtype of resource. Most resources will not have a subtype.
gidstringOptionalGlobally unique identifier of the resource.
nameJSONOptional
name (anyOf 1)stringAlternativeThe name of the resource.
name (anyOf 2)nullAlternative
emailstringOptionalThe email of the resource, if applicable.
Get audit log events — response body — data, next page data item actor — Audit Log Event Actor
FieldTypePresenceDescription and constraints
$objectRootThe entity that triggered the event. Will typically be a user.
actor_typestringOptionalThe 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
gidstringOptionalGlobally unique identifier of the actor, if it is a user.
namestringOptionalThe name of the actor, if it is a user.
emailstringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRootThe context from which this event originated.
context_typestringOptionalThe 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_methodstringOptionalThe 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_addressstringOptionalThe IP address of the client that initiated the event, if applicable.
user_agentstringOptionalThe user agent of the client that initiated the event, if applicable.
oauth_app_namestringOptionalThe name of the OAuth App that initiated the event.
Only present if the `api_authentication_method` is `oauth`.
rule_namestringOptionalThe name of the automation rule that initiated the event.
on_behalf_of_user_idJSONOptional
on_behalf_of_user_id (anyOf 1)integerAlternativeThe ID of the user who requested a change via support.
on_behalf_of_user_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
Get audit log events — response body — data, next page data item details — shared_auditlogeventdetails_5d1508c34080
FieldTypePresenceDescription and constraints
$objectRootEvent specific details. The schema will vary depending on the `event_type`.
Additional keys: allowed
old_valueJSONOptional
old_value (anyOf 1)stringAlternativeThe previous value of the field that was modified in the audited event.
old_value (anyOf 2)nullAlternative
new_valueJSONOptional
new_value (anyOf 1)stringAlternativeThe new value after the modification in the audited event.
new_value (anyOf 2)nullAlternative
groupobjectOptionalThe 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_responseJSONOptional
saml_response (anyOf 1)stringAlternativeThe 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)nullAlternative

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.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.