anchor.diff:  <strong><%= modified_date %></strong>
   
   This topic explains how to query the Cloud Controller API (CAPI) to retrieve current information about apps and events.
  +
   
   ## <a id='target'></a> Target and Log In
   
  
positive.code: 
  Use the `app-usage-events` endpoint to retrieve information about app usage events.
  
  <pre class='terminal'>
  $ cf curl /v2/app_usage_events
  {
    "total_results": 2,
    "total_pages": 2,
    "prev_url": null,
    "next_url": "/v2/app_usage_events?after_guid=5a3416b0-cf3c-425a-a14c-45a317c497ed&order-direction=asc&page=2&results-per-page=1",
    "resources": [
      {
        "metadata": {
          "guid": "b32241a5-5508-4d42-893c-360e42a300b6",
          "url": "/v2/app_usage_events/b32241a5-5508-4d42-893c-360e42a300b6",
          "created_at": "2016-06-08T16:41:33Z"
        },
        "entity": {
          "state": "STARTED",
          "previous_state": null,
          "memory_in_mb_per_instance": 564,
          "previous_memory_in_mb_per_instance": null,
          "instance_count": 1,
          "previous_instance_count": null,
          "app_guid": "guid-d9fbb7f8-cba5-44a2-b720-c24f1fe5e1c4",
          "app_name": "name-1663",
          "space_guid": "guid-5e28f12f-9d80-473e-b826-537b148eb338",
          "space_name": "name-1664",
          "org_guid": "guid-036444f4-f2f5-4ea8-a353-e73330ca0f0a",
          "buildpack_guid": "guid-df37754c-819b-4697-a523-4b457d3c83dd",
          "buildpack_name": "name-1665",
          "package_state": "STAGED",
          "previous_package_state": null,
          "parent_app_guid": null,
          "parent_app_name": null,
          "process_type": "web",
          "task_name": null,
          "task_guid": null
        }
      }
    ]
  }
  </pre>
  
  For more information, see the [Usage Events and Billing](./usage-events.html) topic and [List all App Usage Events](https://apidocs.cloudfoundry.org/6.7.0/app_usage_events/list_all_app_usage_events.html) in the Cloud Foundry API documentation.
  
negative.code:               "version": null
  [...]
  </pre>
  
  ### <a id='events'></a> Events
  
  Use the `events` endpoint to retrieve information about app events.
  
  For more information, see the [Audit Events](./audit-events.html) topic and [List all Events](https://apidocs.cloudfoundry.org/6.7.0/events/list_all_events.html) in the Cloud Foundry API documentation.
  
  