Query parameters
-
Return only events whose
effective_at(Unix seconds) is in this range. -
Return only events for these projects.
-
Return only events with a
typein one of these values. For example,project.created. For all options, see the documentation for the audit log object.Values are
api_key.created,api_key.updated,api_key.deleted,invite.sent,invite.accepted,invite.deleted,login.succeeded,login.failed,logout.succeeded,logout.failed,organization.updated,project.created,project.updated,project.archived,service_account.created,service_account.updated,service_account.deleted,rate_limit.updated,rate_limit.deleted,user.added,user.updated, oruser.deleted. -
Return only events performed by these actors. Can be a user ID, a service account ID, or an api key tracking ID.
-
Return only events performed by users with these emails.
-
Return only events performed on these targets. For example, a project ID updated.
-
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
Default value is
20. -
A cursor for use in pagination.
afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. -
A cursor for use in pagination.
beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
curl \
--request GET 'https://api.openai.com/v1/organization/audit_logs' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"object": "list",
"data": [
{
"id": "string",
"type": "api_key.created",
"effective_at": 42,
"project": {
"id": "string",
"name": "string"
},
"actor": {
"type": "session",
"session": {
"user": {
"id": "string",
"email": "string"
},
"ip_address": "string"
},
"api_key": {
"id": "string",
"type": "user",
"user": {
"id": "string",
"email": "string"
},
"service_account": {
"id": "string"
}
}
},
"api_key.created": {
"id": "string",
"data": {
"scopes": [
"string"
]
}
},
"api_key.updated": {
"id": "string",
"changes_requested": {
"scopes": [
"string"
]
}
},
"api_key.deleted": {
"id": "string"
},
"invite.sent": {
"id": "string",
"data": {
"email": "string",
"role": "string"
}
},
"invite.accepted": {
"id": "string"
},
"invite.deleted": {
"id": "string"
},
"login.failed": {
"error_code": "string",
"error_message": "string"
},
"logout.failed": {
"error_code": "string",
"error_message": "string"
},
"organization.updated": {
"id": "string",
"changes_requested": {
"title": "string",
"description": "string",
"name": "string",
"settings": {
"threads_ui_visibility": "string",
"usage_dashboard_visibility": "string"
}
}
},
"project.created": {
"id": "string",
"data": {
"name": "string",
"title": "string"
}
},
"project.updated": {
"id": "string",
"changes_requested": {
"title": "string"
}
},
"project.archived": {
"id": "string"
},
"rate_limit.updated": {
"id": "string",
"changes_requested": {
"max_requests_per_1_minute": 42,
"max_tokens_per_1_minute": 42,
"max_images_per_1_minute": 42,
"max_audio_megabytes_per_1_minute": 42,
"max_requests_per_1_day": 42,
"batch_1_day_max_input_tokens": 42
}
},
"rate_limit.deleted": {
"id": "string"
},
"service_account.created": {
"id": "string",
"data": {
"role": "string"
}
},
"service_account.updated": {
"id": "string",
"changes_requested": {
"role": "string"
}
},
"service_account.deleted": {
"id": "string"
},
"user.added": {
"id": "string",
"data": {
"role": "string"
}
},
"user.updated": {
"id": "string",
"changes_requested": {
"role": "string"
}
},
"user.deleted": {
"id": "string"
}
}
],
"first_id": "audit_log-defb456h8dks",
"last_id": "audit_log-hnbkd8s93s",
"has_more": true
}