Amazon CloudTrail Events API

Operations for looking up and querying events

Operations 2

POST /events/lookup Amazon CloudTrail Look up events #
POST /#LookupEvents Lookup Events #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-cloudtrail:amazon-cloudtrail-events-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-cloudtrail-events-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Amazon Cloudtrail Events API
  version: '2013-11-01'
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  description: 'Operations tagged Events across 2 of this provider''s published API definitions: amazon-cloudtrail-openapi.yml, amazon-cloudtrail-events-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://cloudtrail.{region}.amazonaws.com
  description: Amazon CloudTrail Regional Endpoint
  variables:
    region:
      default: us-east-1
      description: AWS Region
tags:
- name: Events
  description: Operations for looking up and querying events
paths:
  /events/lookup:
    post:
      operationId: LookupEvents
      summary: Amazon CloudTrail Look up events
      description: Looks up management events or CloudTrail Insights events captured by CloudTrail. You can look up events that occurred in a region within the last 90 days.
      tags:
      - Events
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LookupEventsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupEventsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidLookupAttributesException'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationNotPermittedException'
    servers:
    - url: https://cloudtrail.{region}.amazonaws.com
      description: Amazon CloudTrail Regional Endpoint
      variables:
        region:
          default: us-east-1
          description: AWS Region
  /#LookupEvents:
    post:
      operationId: post#LookupEvents
      summary: Lookup Events
      description: 'Looks up management events or CloudTrail Insights events that are captured by CloudTrail. You can look up events that occurred in a Region within the last 90 days. LookupEvents returns recent Insights events for trails that enable Insights. To view Insights events for an event data store, you can run queries on your Insights event data store, and you can also view the Lake dashboard for Insights. Lookup supports the following attributes for management events: Amazon Web Services access key Event ID Event name Event source Read only Resource name Resource type User name Lookup supports the following attributes for Insights events: Event ID Event name Event source All attributes are optional. The default number of results returned is 50, with a maximum of 50 possible. The response includes a token that you can use to get the next page of results. The rate of lookup requests is limited to two per second, per account, per Region. If this limit is exceeded, a throttling error occurs.'
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/LookupEventsResponse_2'
        '400':
          description: InvalidEventCategoryException; InvalidLookupAttributesException; InvalidMaxResultsException; InvalidNextTokenException; InvalidTimeRangeException; OperationNotPermittedException; UnsupportedOperationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InvalidEventCategoryException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - CloudTrail_20131101.LookupEvents
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/LookupEventsRequest_2'
      tags:
      - Events
      security:
      - sigv4: []
      x-operation-id-source: normalized
      x-operation-id-original: LookupEvents
    servers:
    - url: https://cloudtrail.{region}.amazonaws.com
      variables:
        region:
          default: us-east-1
components:
  schemas:
    InvalidLookupAttributesException:
      type: object
      properties:
        message:
          type: string
    OperationNotPermittedException:
      type: object
      properties:
        message:
          type: string
    LookupEventsRequest:
      type: object
      properties:
        LookupAttributes:
          type: array
          items:
            type: object
            properties:
              AttributeKey:
                type: string
                enum:
                - EventId
                - EventName
                - ReadOnly
                - Username
                - ResourceType
                - ResourceName
                - EventSource
                - AccessKeyId
              AttributeValue:
                type: string
        StartTime:
          type: string
          format: date-time
        EndTime:
          type: string
          format: date-time
        MaxResults:
          type: integer
        NextToken:
          type: string
    LookupEventsResponse:
      type: object
      properties:
        Events:
          type: array
          items:
            type: object
            properties:
              EventId:
                type: string
              EventName:
                type: string
              EventTime:
                type: string
                format: date-time
              EventSource:
                type: string
              Username:
                type: string
              CloudTrailEvent:
                type: string
              ReadOnly:
                type: string
        NextToken:
          type: string
    LookupEventsResponse_2:
      type: object
      properties:
        Events:
          type: array
          items:
            $ref: '#/components/schemas/Event'
          description: A list of events returned based on the lookup attributes specified and the CloudTrail event. The events list is sorted by time. The most recent event is listed first.
        NextToken:
          type: string
          description: The token to use to get the next page of results after a previous API call. If the token does not appear, there are no more results to return. The token must be passed in with the same parameters as the previous call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.
    Event:
      type: object
      properties:
        EventId:
          type: string
          description: The CloudTrail ID of the event returned.
        EventName:
          type: string
          description: The name of the event returned.
        ReadOnly:
          type: string
          description: Information about whether the event is a write event or a read event.
        AccessKeyId:
          type: string
          description: The Amazon Web Services access key ID that was used to sign the request. If the request was made with temporary security credentials, this is the access key ID of the temporary credentials.
        EventTime:
          type: string
          format: date-time
          description: The date and time of the event returned.
        EventSource:
          type: string
          description: The Amazon Web Services service to which the request was made.
        Username:
          type: string
          description: A user name or role name of the requester that called the API in the event returned.
        Resources:
          type: array
          items:
            $ref: '#/components/schemas/Resource'
          description: A list of resources referenced by the event returned.
        CloudTrailEvent:
          type: string
          description: A JSON string that contains a representation of the event returned.
    Resource:
      type: object
      properties:
        ResourceType:
          type: string
          description: 'The type of a resource referenced by the event returned. When the resource type cannot be determined, null is returned. Some examples of resource types are: Instance for EC2, Trail for CloudTrail, DBInstance for Amazon RDS, and AccessKey for IAM. To learn more about how to look up and filter events by the resource types supported for a service, see Filtering CloudTrail Events.'
        ResourceName:
          type: string
          description: The name of the resource referenced by the event returned. These are user-created names whose values will depend on the environment. For example, the resource name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567" for an EC2 Instance.
    LookupAttribute:
      type: object
      properties:
        AttributeKey:
          type: string
          enum:
          - EventId
          - EventName
          - ReadOnly
          - Username
          - ResourceType
          - ResourceName
          - EventSource
          - AccessKeyId
          description: Specifies an attribute on which to filter the events returned.
        AttributeValue:
          type: string
          description: Specifies a value for the specified AttributeKey. The maximum length for the AttributeValue is 2000 characters. The following characters ('_', ' ', ',', '\\n') count as two characters towards the 2000 character limit.
      required:
      - AttributeKey
      - AttributeValue
    LookupEventsRequest_2:
      type: object
      properties:
        LookupAttributes:
          type: array
          items:
            $ref: '#/components/schemas/LookupAttribute'
          description: Contains a list of lookup attributes. Currently the list can contain only one item.
        StartTime:
          type: string
          format: date-time
          description: Specifies that only events that occur after or at the specified time are returned. If the specified start time is after the specified end time, an error is returned.
        EndTime:
          type: string
          format: date-time
          description: Specifies that only events that occur before or at the specified time are returned. If the specified end time is before the specified start time, an error is returned.
        EventCategory:
          type: string
          enum:
          - insight
          description: Specifies the event category. If you do not specify an event category, events of the category are not returned in the response. For example, if you do not specify insight as the value of EventCategory, no Insights events are returned.
        MaxResults:
          type: integer
          description: The number of events to return. Possible values are 1 through 50. The default is 50.
        NextToken:
          type: string
          description: The token to use to get the next page of results after a previous API call. This token must be passed in with the same parameters that were specified in the original call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.
    InvalidEventCategoryException:
      type: object
      properties:
        Message:
          type: string
          description: Brief description of the exception returned by the request.
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: cloudtrail
externalDocs:
  description: Amazon CloudTrail API Reference
  url: https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/
x-refined-from:
- amazon-cloudtrail-openapi.yml
- amazon-cloudtrail-events-api-openapi.yml