Skip to content

Commit

Permalink
📝 Update websocket documentation to include new endpoint (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
ff137 authored Apr 2, 2024
1 parent b75c729 commit 631a512
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,29 @@
cloud_api_docs_description = """
Welcome to the Aries CloudAPI Python project.
In addition to the traditional HTTP-based endpoints described below, we also offer WebSocket endpoints for real-time interfacing with webhook events.
In addition to the traditional HTTP-based endpoints described below, we also offer WebSocket endpoints for
real-time interfacing with webhook events.
WebSocket endpoints are authenticated. This means that only users with valid authentication tokens can establish a WebSocket connection, and they can only subscribe to their own wallet's events. However, Admin users have the ability to subscribe by topic, or to any wallet.
WebSocket endpoints are authenticated. This means that only users with valid authentication tokens can establish
a WebSocket connection, and they can only subscribe to their own wallet's events. However, Admin users have the
ability to subscribe by topic, or to any wallet in their group.
Our WebSocket endpoints are as follows:
1. `/v1/ws/topic/{topic}`: (Admin only) This endpoint allows admins to receive all webhook events on a specific topic (e.g. `connections`, `credentials`, `proofs`, `endorsements`).
1. `/v1/ws/`: This endpoint allows admins to receive all webhook events for their group.
2. `/v1/ws/{wallet_id}`: This endpoint allows authenticated users to receive webhook events associated with a specific wallet ID.
2. `/v1/ws/{wallet_id}`: This endpoint allows admins (or authenticated users holding this wallet) to receive webhook
events for a specific wallet ID.
3. `/v1/ws/{wallet_id}/{topic}`: Similar to above, but with topic-specific subscription.
3. `/v1/ws/{wallet_id}/{topic}`: Similar to above, but subscribing to a specific topic.
4. `/v1/ws/topic/{topic}`: This endpoint allows admins to receive all webhook events on a specific topic (e.g.
`connections`, `credentials`, `proofs`, `endorsements`).
For authentication, the WebSocket headers should include `x-api-key`: `<your key>`.
Please refer to our API documentation for more details about our authentication mechanism, as well as for information about the available topics.
Please refer to our API documentation for more details about our authentication mechanism, as well as for information
about the available topics.
"""

default_docs_description = """
Expand Down

0 comments on commit 631a512

Please sign in to comment.