<@U04UQ68083H> How can I fetch the Ory event logs ...
# ory-copilot
p
@chilly-king-10285 How can I fetch the Ory event logs (e.g. session issues) with the REST API or CLI?
b
A message from kapa.ai
Based on the knowledge sources, Ory provides live event streams for tracking various activities like sign-ups, logins, and session events. These event streams are available for Ory Network enterprise contracts. ## Event Streams Ory emits events for many different actions, including session-related events such as: - SessionIssued - SessionChanged - SessionLifespanExtended - SessionRevoked - SessionChecked - SessionTokenizedAsJWT And many other events related to identities, OAuth2, and more [Live event streams](https://www.ory.sh/docs/actions/live-events#event-descriptions). ## Accessing Event Logs To access these event logs, Ory provides event streams that can be configured to send events to your infrastructure. Currently, the documentation shows support for AWS SNS as a destination: 1. You need an enterprise contract with Ory Network to access live event streams 2. You can configure event streams using the Ory CLI:
Copy code
ory create event-stream \   --project "$YOUR_PROJECT_ID" \   --type sns \   --aws-sns-topic-arn "$YOUR_TOPIC_ARN" \   --aws-iam-role-arn "$YOUR_IAM_ROLE_ARN"
The API also supports managing event streams with endpoints like: -
PUT /projects/{project_id}/eventstreams/{event_stream_id}
to update an event stream - There are also endpoints for listing event streams Note that authentication is required to perform these operations, specifically using the
oryWorkspaceApiKey
method [Authentication](https://www.ory.sh/docs/reference/api). If you're looking for other ways to access event logs or if you need a different destination than AWS SNS, the documentation suggests reaching out to Ory directly: "Is your workload not running on AWS or you don't want to use SNS? [Reach out](https://www.ory.sh/contact/) to discuss your requirements!" [Configure event streams](https://www.ory.sh/docs/actions/live-events#configure-event-streams). For more detailed information about configuring event streams, please refer to the [Live event streams documentation](https://www.ory.sh/docs/actions/live-events).