Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook fedcalls into api docs #2988

Merged
merged 8 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/4-docs/hook-fedcalls-into-api-docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hook federated API call documentation into docs.wire.com (manually).
6 changes: 3 additions & 3 deletions docs/src/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,11 @@ helm upgrade --install --namespace metallb-system metallb wire/metallb \
Install `nginx-ingress-[controller,services]`:

::
: helm upgrade --install --namespace demo demo-nginx-ingress-controller wire/nginx-ingress-controller
: helm upgrade --install --namespace demo demo-nginx-ingress-controller wire/nginx-ingress-controller

: --wait

helm upgrade --install --namespace demo demo-nginx-ingress-services wire/nginx-ingress-services
helm upgrade --install --namespace demo demo-nginx-ingress-services wire/nginx-ingress-services

: -f values/nginx-ingress-services/demo-values.yaml -f values/nginx-ingress-services/demo-secrets.yaml --wait

Expand Down Expand Up @@ -633,7 +633,7 @@ account-pages:

## Configuring authentication cookie throttling

Authentication cookies and the related throttling mechanism is described in the *Client API documentation*:
Authentication cookies and the related throttling mechanism is described in the *API documentation*:
{ref}`login-cookies`

The maximum number of cookies per account and type is defined by the brig option
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Connecting Wire Clients <how-to/associate/index>
Optional Configuration <configuration-options>
Understanding wire-server components <understand/index>
Single-Sign-On and user provisioning <how-to/single-sign-on/index.rst>
Client API documentation <understand/api-client-perspective/index>
API documentation <understand/api-client-perspective/index>
Security responses <security-responses/index>
Notes for developers <developer/index>
```
Expand Down
4 changes: 0 additions & 4 deletions docs/src/understand/api-client-perspective/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

The following documentation provides information for, and takes the perspective of a Wire client developer. (wire-desktop, wire-android and wire-ios are examples of Wire Clients). This means only publicly accessible endpoints are mentioned.

```{warning}
This section of the documentation is very incomplete at the time of writing (summer 2020) - more pages on the client API will follow in the future.
```

```{toctree}
:glob: true
:maxdepth: 2
Expand Down
16 changes: 6 additions & 10 deletions docs/src/understand/api-client-perspective/swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,20 @@
Our staging system provides swagger documentation of our public rest
API.

We are currently (as of 2021-09-29) migrating our documentation into a
new system that is automatically checked for correctness. The old
documentation still has some endpoints, but the new one is getting more and more complete. We will completely replace the old one eventually.
The swagger docs are correct by construction (compiled from the server
code), and the are complete up to bots/services and event notification
payloads (as of 2023-01-16).

Please check the new docs first, and if you can't find what you're
looking for, double-check the old.

## New docs

These docs show swagger 2.0:
## New docs (swagger 2.0)

[new staging swagger page](https://staging-nginz-https.zinfra.io/api/swagger-ui/)

## Old docs

Some endpoints are only shown using swagger 1.2.
## Old docs (swagger 1.2)

At the time of writing, both swagger version 1.2 and version 2.0 are in use. If you are an employee of Wire, you can log in here and try out requests in the browser; if not, you can make use of the "List Operations" button on both 1.2 and 2.0 pages to see the possible API requests.
If you are an employee of Wire, you can log in here and try out requests in the browser; if not, you can make use of the "List Operations" button on both 1.2 and 2.0 pages to see the possible API requests.

Browse to our [old staging swagger page](https://staging-nginz-https.zinfra.io/swagger-ui/) to see rendered swagger documentation for the remaining endpoints.

Expand Down
18 changes: 18 additions & 0 deletions docs/src/understand/federation/fedcalls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Federated API calls by client API end-point (generated)

**Updated manually using using [the fedcalls tool](https://github.com/wireapp/wire-server/blob/8760b4978ccb039b229d458b7a08136a05e12ff9/tools/fedcalls/README.md); last change: 2023-01-16.**

This is most likely only interesting for backend developers.

This graph and csv file describe which public (client) API end-points trigger calls to which end-points at backends federating with the one that is called. The data is correct by construction (see [the fedcalls tool](https://github.com/wireapp/wire-server/blob/8760b4978ccb039b229d458b7a08136a05e12ff9/tools/fedcalls/README.md) for more details).

The target can only be understood in the context of the [backend code base](https://github.com/wireapp/wire-server/). It is described by component (sub-directory in `/services`) and end-point name (use grep to find it).

links:

- [dot](img/wire-fedcalls.dot)
- [png](img/wire-fedcalls.png)
- [csv](img/wire-fedcalls.csv)

```{image} img/wire-fedcalls.png
```
122 changes: 122 additions & 0 deletions docs/src/understand/federation/img/wire-fedcalls.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
source method,source path,target component,target name
get,/users/{uid_domain}/{uid},brig,get-users-by-ids
post,/list-users,brig,get-users-by-ids
put,/self,brig,on-user-deleted-connections
delete,/self,brig,on-user-deleted-connections
delete,/self/phone,brig,on-user-deleted-connections
delete,/self/email,brig,on-user-deleted-connections
put,/self/locale,brig,on-user-deleted-connections
put,/self/handle,brig,on-user-deleted-connections
post,/register,brig,on-user-deleted-connections
post,/delete,brig,on-user-deleted-connections
get,/activate,brig,on-user-deleted-connections
post,/activate,brig,on-user-deleted-connections
get,/users/{uid_domain}/{uid}/clients,brig,get-user-clients
get,/users/{uid_domain}/{uid}/clients/{client},brig,get-user-clients
post,/users/list-clients,brig,get-user-clients
get,/users/{uid_domain}/{uid}/prekeys/{client},brig,claim-prekey
get,/users/{uid_domain}/{uid}/prekeys,brig,claim-prekey-bundle
post,/users/list-prekeys,brig,claim-multi-prekey-bundle
post,/clients,brig,on-user-deleted-connections
put,/connections/{uid_domain}/{uid},brig,send-connection-action
post,/connections/{uid_domain}/{uid},brig,send-connection-action
get,/search/contacts,brig,get-users-by-ids
get,/search/contacts,brig,search-users
post,/mls/key-packages/claim/{user_domain}/{user},brig,claim-key-packages
post,/access,brig,on-user-deleted-connections
post,/login,brig,on-user-deleted-connections
get,/assets/{key_domain}/{key},cargohold,get-asset
get,/assets/{key_domain}/{key},cargohold,stream-asset
put,/conversations/{cnv},galley,on-conversation-updated
put,/conversations/{cnv},galley,on-mls-message-sent
put,/conversations/{cnv},galley,on-new-remote-conversation
get,/conversations/{cnv_domain}/{cnv},galley,get-conversations
get,/conversations/{cnv_domain}/{cnv}/groupinfo,galley,query-group-info
post,/conversations/list,galley,get-conversations
post,/conversations/join,galley,on-conversation-updated
post,/conversations/join,galley,on-new-remote-conversation
post,/conversations,galley,on-conversation-created
post,/conversations/one2one,galley,on-conversation-created
post,/conversations/{cnv_domain}/{cnv}/members,galley,on-conversation-updated
post,/conversations/{cnv_domain}/{cnv}/members,galley,on-mls-message-sent
post,/conversations/{cnv_domain}/{cnv}/members,galley,on-new-remote-conversation
post,/conversations/{cnv}/join,galley,on-conversation-updated
post,/conversations/{cnv}/join,galley,on-new-remote-conversation
post,/conversations/{cnv_domain}/{cnv}/typing,galley,on-typing-indicator-updated
put,/conversations/{cnv_domain}/{cnv}/members/{usr_domain}/{usr},galley,on-conversation-updated
put,/conversations/{cnv_domain}/{cnv}/members/{usr_domain}/{usr},galley,on-mls-message-sent
put,/conversations/{cnv_domain}/{cnv}/members/{usr_domain}/{usr},galley,on-new-remote-conversation
delete,/conversations/{cnv_domain}/{cnv}/members/{usr_domain}/{usr},galley,leave-conversation
delete,/conversations/{cnv_domain}/{cnv}/members/{usr_domain}/{usr},galley,on-conversation-updated
delete,/conversations/{cnv_domain}/{cnv}/members/{usr_domain}/{usr},galley,on-mls-message-sent
delete,/conversations/{cnv_domain}/{cnv}/members/{usr_domain}/{usr},galley,on-new-remote-conversation
put,/conversations/{cnv}/members/{usr},galley,on-conversation-updated
put,/conversations/{cnv}/members/{usr},galley,on-mls-message-sent
put,/conversations/{cnv}/members/{usr},galley,on-new-remote-conversation
put,/conversations/{cnv}/name,galley,on-conversation-updated
put,/conversations/{cnv}/name,galley,on-mls-message-sent
put,/conversations/{cnv}/name,galley,on-new-remote-conversation
put,/conversations/{cnv_domain}/{cnv}/name,galley,on-conversation-updated
put,/conversations/{cnv_domain}/{cnv}/name,galley,on-mls-message-sent
put,/conversations/{cnv_domain}/{cnv}/name,galley,on-new-remote-conversation
put,/conversations/{cnv}/message-timer,galley,on-conversation-updated
put,/conversations/{cnv}/message-timer,galley,on-mls-message-sent
put,/conversations/{cnv}/message-timer,galley,on-new-remote-conversation
put,/conversations/{cnv_domain}/{cnv}/message-timer,galley,on-conversation-updated
put,/conversations/{cnv_domain}/{cnv}/message-timer,galley,on-mls-message-sent
put,/conversations/{cnv_domain}/{cnv}/message-timer,galley,on-new-remote-conversation
put,/conversations/{cnv}/receipt-mode,galley,on-conversation-updated
put,/conversations/{cnv}/receipt-mode,galley,on-mls-message-sent
put,/conversations/{cnv}/receipt-mode,galley,on-new-remote-conversation
put,/conversations/{cnv}/receipt-mode,galley,update-conversation
put,/conversations/{cnv_domain}/{cnv}/receipt-mode,galley,on-conversation-updated
put,/conversations/{cnv_domain}/{cnv}/receipt-mode,galley,on-mls-message-sent
put,/conversations/{cnv_domain}/{cnv}/receipt-mode,galley,on-new-remote-conversation
put,/conversations/{cnv_domain}/{cnv}/receipt-mode,galley,update-conversation
put,/conversations/{cnv_domain}/{cnv}/access,galley,on-conversation-updated
put,/conversations/{cnv_domain}/{cnv}/access,galley,on-mls-message-sent
put,/conversations/{cnv_domain}/{cnv}/access,galley,on-new-remote-conversation
delete,/teams/{tid}/conversations/{cid},galley,on-conversation-updated
delete,/teams/{tid}/conversations/{cid},galley,on-mls-message-sent
delete,/teams/{tid}/conversations/{cid},galley,on-new-remote-conversation
post,/conversations/{cnv}/otr/messages,galley,on-message-sent
post,/conversations/{cnv}/otr/messages,brig,get-user-clients
post,/conversations/{cnv_domain}/{cnv}/proteus/messages,brig,get-user-clients
post,/conversations/{cnv_domain}/{cnv}/proteus/messages,galley,on-message-sent
post,/conversations/{cnv_domain}/{cnv}/proteus/messages,galley,send-message
post,/bot/messages,galley,on-message-sent
post,/bot/messages,brig,get-user-clients
put,/teams/{tid}/features/legalhold,galley,on-conversation-updated
put,/teams/{tid}/features/legalhold,galley,on-mls-message-sent
put,/teams/{tid}/features/legalhold,galley,on-new-remote-conversation
post,/mls/welcome,galley,mls-welcome
post,/mls/messages,galley,on-mls-message-sent
post,/mls/messages,galley,send-mls-message
post,/mls/messages,galley,on-conversation-updated
post,/mls/messages,galley,on-new-remote-conversation
post,/mls/messages,brig,get-mls-clients
post,/mls/commit-bundles,galley,on-mls-message-sent
post,/mls/commit-bundles,galley,mls-welcome
post,/mls/commit-bundles,galley,send-mls-commit-bundle
post,/mls/commit-bundles,galley,on-conversation-updated
post,/mls/commit-bundles,galley,on-new-remote-conversation
post,/mls/commit-bundles,brig,get-mls-clients
delete,/teams/{tid}/legalhold/settings,galley,on-conversation-updated
delete,/teams/{tid}/legalhold/settings,galley,on-mls-message-sent
delete,/teams/{tid}/legalhold/settings,galley,on-new-remote-conversation
post,/teams/{tid}/legalhold/{uid},galley,on-conversation-updated
post,/teams/{tid}/legalhold/{uid},galley,on-mls-message-sent
post,/teams/{tid}/legalhold/{uid},galley,on-new-remote-conversation
delete,/teams/{tid}/legalhold/{uid},galley,on-conversation-updated
delete,/teams/{tid}/legalhold/{uid},galley,on-mls-message-sent
delete,/teams/{tid}/legalhold/{uid},galley,on-new-remote-conversation
post,/teams/{tid}/legalhold/consent,galley,on-conversation-updated
post,/teams/{tid}/legalhold/consent,galley,on-mls-message-sent
post,/teams/{tid}/legalhold/consent,galley,on-new-remote-conversation
put,/teams/{tid}/legalhold/{uid}/approve,galley,on-conversation-updated
put,/teams/{tid}/legalhold/{uid}/approve,galley,on-mls-message-sent
put,/teams/{tid}/legalhold/{uid}/approve,galley,on-new-remote-conversation
post,/i/users,brig,on-user-deleted-connections
post,/i/users/spar,brig,on-user-deleted-connections
post,/i/legalhold-login,brig,on-user-deleted-connections
post,/i/sso-login,brig,on-user-deleted-connections
Loading