This API is designed for efficient retrieval of events in a simple, paginated manner with time-based filtering only. If you need more advanced filtering or queries, refer to the /events endpoint.
This tutorial will help you to:
Transition from the /events
endpoint to the new /events-stream
endpoint.
Utilize time-based filtering for polling events.
Implement Bearer authentication with an API key.
To complete this migration, you need the following:
Org Admin access to Atlassian Administration.
An API key to authenticate requests using Bearer token.
The new /events-stream
endpoint requires Bearer authentication with an API key.
Go to Atlassian Administration and select your organization.
Navigate to Settings > API keys.
Select Create API key.
Name the API key, set an expiration date if needed, and select Create.
Copy the API key and store it securely, as it won't be visible again.
Modify your API calls from /v1/orgs/{orgId}/events
to the new /v1/orgs/{orgId}/events-stream
path.
Ensure your requests only include the following:
from
and to
for time-based filtering, using epochMillis
.
cursor
for pagination, leveraging prev/next from responses.
Consider using sortOrder
(desc
/asc
) for consistent sorting.
Set a limit for page size, with the new default being 200.
To manage changes effectively, ensure the following:
The new endpoint uses event processing time for sorting, instead of the time the event occurred. This is to ensure no events that are processed out of order are missed as you poll for new events.
Expect processedAt as a new attribute in event responses.
Example Request
1 2curl --request GET \ --url '<https://api.atlassian.com/admin/v1/orgs/{orgId}/events-stream'> \ --header 'Authorization: Bearer <api_key>' \ --header 'Accept: application/json'
The sortOrder is maintained in the cursor and does not need to be provided through multiple pages to maintain consistent ordering.
A cursor is now returned on the last page of events to facilitate seamless polling.
Transitioning to the new /events-stream
endpoint enhances the efficiency and reliability of polling events. Implement these changes to ensure a smooth migration and improved performance of your applications.
For more information, refer to the API documentation.
Rate this page: