Rate This Article
Send Docs Feedback

List audit entries

API Platform Base Path: https://api.enterprise.apigee.com/v1/o/{org_name}

API Resource Path: /audits

Lists audit records for organizations, APIs, API revisions, and policies. (Note that base path inserts audits before organizations: /audits/organizations/{myorg}.

Verb: GET

Auth: Basic Auth

Media types:


The list of audit records provides the details of all calls to the Apigee Platform API made by user within an organization during the specified interval of time.

Append the target resource as a URL parameter to the base path of the request for an audit.

Supported audit targets:

  • /apis/{api_name}
  • /apis/{api_name}/revisions/{revision_number}/policies/{policy_name}
  • /apis/{api_name}/revisions/{revision_number}/resources/{resource_name}

Note that a resource name identifies a JavaScript, Python, Java, or XSLT file stored under /resources in an API proxy configuration.

An audit returns a history of GET, CREATE, UPDATE, and DELETE operations on the audit target.

To retrieve all audit records for sub-entities, use the query parameter expand=true. By setting expand=true on /apis, you return audit records for all revisions, policies, and resources for all API proxies in your organization.

For API revisions, deploy and undeploy actions are recorded as CREATE operations. Therefore a CREATE action on an API revision indicates that a new revision was deployed while the previous revision was undeployed.

Sample Request:
$ curl "https://api.enterprise.apigee.com/v1/audits/o/[org_name}/apis/{api_name}?operation=create&timeline=week" \ -u myname:mypass
Query Parameters:
Name Description Default Required?
user Filters results by Apigee user's email address N/A No
timeline Filters results by time interval, defaults to day if no value is specified. Valid values are day, week, month. Last 24 hours Yes
operation Filters results by operation. Valid values are create, update, get, delete. N/A No
expand 'true' is the only valid value for this query parameter. When set to true, the audit records for all sub-resources are returned in the list of records. N/A No
Sample Response:
    "auditRecord": [
            "operation": "CREATE", 
            "request": "'{  'configurationVersion' : {    'majorVersion' : 4,    'minorVersion' : 0  },  'contextInfo' : 'Revision null of application -NA-, in organization -NA-',  'createdAt' : 1368567737681,  'createdBy' : 'andrew@apigee.com',  'lastModifiedAt' : 1368567737681,  'lastModifiedBy' : 'andrew@apigee.com',  'name' : 'testnode',  'policies' : [ ],  'proxyEndpoints' : [ ],  'resourceFiles' : [ ],  'resources' : [ ],  'targetEndpoints' : [ ],  'targetServers' : [ ],  'type' : 'Application'}'", 
            "requestUri": "/v1/organizations/apifactory/apis/weatherapi/", 
            "response": "{  'configurationVersion' : {    'majorVersion' : 4,    'minorVersion' : 0  },  'contextInfo' : 'Revision 1 of application testnode, in organization apifactory',  'createdAt' : 1368567737681,  'createdBy' : 'andrew@apigee.com',  'displayName' : 'weatherapi',  'lastModifiedAt' : 1368567737681,  'lastModifiedBy' : 'andrew@apigee.com',  'name' : 'testnode',  'policies' : [ ],  'proxyEndpoints' : [ ],  'resourceFiles' : [ ],  'resources' : [ ],  'revision' : '1',  'targetEndpoints' : [ ],  'targetServers' : [ ],  'type' : 'Application'}", 
            "responseCode": "201", 
            "timeStamp": 1368567737771, 
            "user": "andrew@apigee.com"
Response Payload Elements:
Name Description
auditRecord The audit record for an operation on the target resource
operation The operation (GET, CREATE, UPDATE, or DELETE) logged for this target
requestUri The URI path of the request to the audit target
response The configuration of the API proxy that managed the outbound response
responseCode The HTTP response code returned for the operation from the AIP Platform to the requesting app
timeStamp Unix time when the action was logged by the auditing system
request The configuration of the API proxy that managed the inbound request
user The ID of the user who who issued the API call in the audit record
  <Message>Search parameter is not valid </Message>

Help or comments?

  • Something's not working: Ask the Apigee Community or see Apigee Support
  • Something's wrong with the docs: Click Send Docs Feedback on this page.
    (Incorrect? Unclear? Broken link? Typo?)