---
title: "POST /v1/spaces/{spaceName}/eventLogs"
method: POST
path: "/v1/spaces/{spaceName}/eventLogs"
---

# POST /v1/spaces/{spaceName}/eventLogs

`POST /v1/spaces/{spaceName}/eventLogs`

Retrieves a list of events that occurred during a specific time in a space. You can use these events to audit user and system activity in a space. For more information, see [Monitoring](https://docs.aws.amazon.com/codecatalyst/latest/userguide/ipa-monitoring.html) in the _Amazon CodeCatalyst User Guide_.

ListEventLogs guarantees events for the last 30 days in a given space. You can also view and retrieve a list of management events over the last 90 days for Amazon CodeCatalyst in the CloudTrail console by viewing Event history, or by creating a trail to create and maintain a record of events that extends past 90 days. For more information, see [Working with CloudTrail Event History](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html) and [Working with CloudTrail trails](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-getting-started.html).

## Path parameters

- `spaceName` string, required

## Request body

- object
  - `startTime` string, date-time, required — The date and time when you want to start retrieving events, in coordinated universal time (UTC) timestamp format as specified in <a href="https://www.rfc-editor.org/rfc/rfc3339#section-5.6">RFC 3339</a>.
  - `endTime` string, date-time, required — The time after which you do not want any events retrieved, in coordinated universal time (UTC) timestamp format as specified in <a href="https://www.rfc-editor.org/rfc/rfc3339#section-5.6">RFC 3339</a>.
  - `eventName` string — The name of the event.
  - `nextToken` string — A token returned from a call to this API to indicate the next batch of results to return, if any.
  - `maxResults` integer — The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a <code>NextToken</code> element, which you can use to obtain additional results.

## Response `200`

Success

- ListEventLogsResponse
  - `nextToken` string — A token returned from a call to this API to indicate the next batch of results to return, if any.
  - `items` EventLogEntry[], required — Information about each event retrieved in the list.
    - `id` string, required — The system-generated unique ID of the event.
    - `eventName` string, required — The name of the event.
    - `eventType` string, required — The type of the event.
    - `eventCategory` string, required — The category for the event.
    - `eventSource` string, required — The source of the event.
    - `eventTime` string, date-time, required — The time the event took place, in coordinated universal time (UTC) timestamp format as specified in <a href="https://www.rfc-editor.org/rfc/rfc3339#section-5.6">RFC 3339</a>.
    - `operationType` 'READONLY' | 'MUTATION', required — The type of the event.
    - `userIdentity` object, required — The system-generated unique ID of the user whose actions are recorded in the event.
      - `userType` 'USER' | 'AWS_ACCOUNT' | 'UNKNOWN', required — The role assigned to the user in a Amazon CodeCatalyst space or project when the event occurred.
      - `principalId` string, required — The ID of the Amazon CodeCatalyst service principal.
      - `userName` string — The display name of the user in Amazon CodeCatalyst.
      - `awsAccountId` string — The Amazon Web Services account number of the user in Amazon Web Services, if any.
    - `projectInformation` object — Information about the project where the event occurred.
      - `name` string — The name of the project in the space.
      - `projectId` string — The system-generated unique ID of the project.
    - `requestId` string — The system-generated unique ID of the request.
    - `requestPayload` object — Information about the payload of the request.
      - `contentType` string — The type of content in the event payload.
      - `data` string — The data included in the event payload.
    - `responsePayload` object — Information about the payload of the response, if any.
      - `contentType` string — The type of content in the event payload.
      - `data` string — The data included in the event payload.
    - `errorCode` string — The code of the error, if any.
    - `sourceIpAddress` string — The IP address of the user whose actions are recorded in the event.
    - `userAgent` string — The user agent whose actions are recorded in the event.

## Other responses

- `480` — ThrottlingException
- `481` — ConflictException
- `482` — ValidationException
- `483` — ServiceQuotaExceededException
- `484` — ResourceNotFoundException
- `485` — AccessDeniedException

---

[API](https://skmtc.net/aws/apis/codecatalyst.md) · [All operations](https://skmtc.net/aws/apis/codecatalyst/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/codecatalyst/revisions/b82f5a10dc49/schema)
