Skip to content

Commit 81da4e8

Browse files
cl0eteff137
andauthored
Update docs (#650)
* Update doc strings with new ws url * Update names and routes to match current config * Update route and names to match api split * Update routes/names to match api split * 🎨 * drop generic --------- Co-authored-by: ff137 <[email protected]>
1 parent 446991a commit 81da4e8

14 files changed

+70
-54
lines changed

app/main.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
4747
Our WebSocket endpoints are as follows:
4848
49-
1. `/ws/topic/{topic}`: (Admin only) This endpoint allows admins to receive all webhook events on a specific topic (e.g. `connections`, `credentials`, `proofs`, `endorsements`).
49+
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`).
5050
51-
2. `/ws/{wallet_id}`: This endpoint allows authenticated users to receive webhook events associated with a specific wallet ID.
51+
2. `/v1/ws/{wallet_id}`: This endpoint allows authenticated users to receive webhook events associated with a specific wallet ID.
5252
53-
3. `/ws/{wallet_id}/{topic}`: Similar to above, but with topic-specific subscription.
53+
3. `/v1/ws/{wallet_id}/{topic}`: Similar to above, but with topic-specific subscription.
5454
5555
For authentication, the WebSocket headers should include `x-api-key`: `<your key>`.
5656

docs/Bootstrap Trust Ecosystem.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
## 2. Generate a New DID
1010

11-
1. Access the API through [Governance Cloud API](http://localhost:8100/docs)
11+
1. Access the API through [CloudAPI-Governance](http://localhost:8200/docs)
1212
2. Authenticate with `governance.`+`APIKEY` role
13-
3. Generate a new DID with a `POST` to the following API endpoint: `/wallet/dids/`
13+
3. Generate a new DID with a `POST` to the following API endpoint: `/v1/wallet/dids/`
1414
4. An example successful response to generate a DID would look like this:
1515

1616
```json
@@ -90,8 +90,8 @@ Verkey: BUxNgHYEYm5bsTEpjo9Dkgr5zGA4feeiuiq32HfqyCKg
9090

9191
## 5. Set Public DID
9292

93-
1. Go to the [Governance Cloud API](http://localhost:8100/docs)
94-
2. Execute the PUT endpoint to set a Public DID: `/wallet/dids/public?did=`
93+
1. Go to the [CloudAPI-Governance](http://localhost:8200/docs)
94+
2. Execute the PUT endpoint to set a Public DID: `/v1/wallet/dids/public?did=`
9595
3. Use the DID that you anchored to the ledger in step 3
9696
4. A successful response should look like this. You can also query the Public DID Endpoint `/wallet/dids/public` of the Governance Agent to confirm that the public DID is now set:
9797

docs/Common Steps.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
This document will guide you through some common steps and interactions. Please read it carefully, and feel free to open an issue if further questions arise or if you spot a mistake.
44

5-
>**Note:** It is always helpful to inspect the CloudAPI Swagger UI to understand the available endpoints, their expected inputs, and the corresponding outputs. If requests fail, check the Swagger UI to ensure you've called the correct endpoint with the correct data. The Swagger UI is accessible at [http://localhost:8100/docs](http://localhost:8100/docs) under a vanilla setup. If you find any model to be unclear from the document below, try finding it in Swagger UI before opening an issue. This document describes only some basic steps; more detailed workflows can be found [here](./Example%20Flows.md).
5+
>**Note:** It is always helpful to inspect the CloudAPI Swagger UI to understand the available endpoints, their expected inputs, and the corresponding outputs. If requests fail, check the Swagger UI to ensure you've called the correct endpoint with the correct data. The Swagger UI is accessible at:
6+
>
7+
> * CloudAPI-Multitenant-Admin -> [http://localhost:8100/docs](http://localhost:8100/docs)
8+
> * CloudAPI-Governance -> [http://localhost:8200/docs](http://localhost:8200/docs)
9+
> * CloudAPI-Tenant -> [http://localhost:8300/docs](http://localhost:8300/docs)
10+
> * CloudAPI-Public (trust registry) -> [http://localhost:8400/docs](http://localhost:8400/docs)
11+
>
12+
> under a vanilla setup. If you find any model to be unclear from the document below, try finding it in Swagger UI before opening an issue. This document describes only some basic steps; more detailed workflows can be found [here](./Example%20Flows.md).
613
714
It is also recommended to set up a webhook listener (refer to our [Webhooks doc](./Webhooks.md)). This will significantly aid in understanding the activities occurring in the ACA-Py instances in the background.
815

@@ -25,7 +32,7 @@ The admin "wallet" is already configured as it is not a subwallet on a multi-ten
2532
}
2633
```
2734

28-
Send this to the `/admin/tenants` endpoint. You can omit the roles field altogether or pass "issuer" and/or "verifier". All payloads are documented in Swagger, so if in doubt, consult the [Swagger docs](http://localhost:8100/docs).
35+
Send this to the `/tenant-admin/v1/admin/tenants` endpoint. You can omit the roles field altogether or pass "issuer" and/or "verifier". All payloads are documented in Swagger, so if in doubt, consult the [CloudAPI-Multitenant-Admin](http://localhost:8100/docs).
2936

3037
Creating a tenant with roles will update the trust registry by writing an entry for an `actor`, including wallet details and its associated roles.
3138

@@ -53,7 +60,7 @@ To create schemas and effectively write them to the ledger as well as registerin
5360
}
5461
```
5562

56-
Note that you will need to have a public DID to do so (if your agent lacks one, you can use the governance role to create one: see [Bootstrapping the Trust Ecosystem](./Bootstrap%20Trust%20Ecosystem.md)). Run the request with the header from 1. and the payload from 2. against the CloudAPI URL and endpoint `/admin/governance/schemas/` (POST method). Upon success, the created schema will be returned.
63+
Note that you will need to have a public DID to do so (if your agent lacks one, you can use the governance role to create one: see [Bootstrapping the Trust Ecosystem](./Bootstrap%20Trust%20Ecosystem.md)). Run the request with the header from 1. and the payload from 2. against the [CloudAPI-Governance URL](http://localhost:8200/docs) and endpoint `/v1/definitions/schemas` (POST method). Upon success, the created schema will be returned.
5764

5865
## Issuing a Credential
5966

@@ -62,7 +69,7 @@ To create schemas and effectively write them to the ledger as well as registerin
6269
3. Issuer creates credential definition
6370
4. Create a connection between the issuer and prospect holder
6471

65-
1. Create an invitation using either the issuer or the holder using the `/connections` endpoint of the CloudAPI. Here, you will also need to authenticate via the header, e.g., using
72+
1. Create an invitation using either the issuer or the holder using the `/v1/connections/create-invitation` endpoint of the [CloudAPI-Tenant URL](http://localhost:8300/docs). Here, you will also need to authenticate via the header, e.g., using
6673

6774
```json
6875
{ "x-api-key": "tenant.WALLET_TOKEN" }

docs/Governance as Code.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Schemas are used to define attributes related to credentials. To define schemas for your trust ecosystem, follow the steps below:
66

7-
1. Access the API through the [Governance Cloud API](http://localhost:8100/docs).
7+
1. Access the API through the [Governance Cloud API](http://localhost:8200/docs).
88
2. Authenticate with `governance.` + `APIKEY` role.
99
3. Generate a new schema with a `POST` to the following API endpoint: `/v1/definitions/schemas`.
1010

@@ -27,9 +27,9 @@ Creating new tenants in the multi-tenant environment for the various tenant type
2727

2828
Tenants are custodial wallets created within the Trust Ecosystem's multitenant AcaPy agent. To create new tenants for your trust ecosystem, follow the steps below:
2929

30-
1. Access the API through the [Governance Cloud API](http://localhost:8100/docs).
30+
1. Access the API through the [CloudAPI-Multitenant-Admin](http://localhost:8100/docs).
3131
2. Authenticate with `tenant-admin.` + `APIKEY` role.
32-
3. Create a new tenant with a `POST` to the following API endpoint: `/admin/tenants/`, using the example request body below.
32+
3. Create a new tenant with a `POST` to the following API endpoint: `/tenant-admin/v1/admin/tenants/`, using the example request body below.
3333

3434
```json
3535
{
@@ -62,9 +62,9 @@ An example of a successful response to create a new Issuer Tenant:
6262

6363
Tenants, functioning as custodial wallets, are established within the Trust Ecosystem's multitenant AcaPy agent. Follow the steps below to create new tenants for your trust ecosystem:
6464

65-
1. Access the API through [Governance Cloud API](http://localhost:8100/docs)
65+
1. Access the API through [CloudAPI-Multitenant-Admin](http://localhost:8100/docs)
6666
2. Authenticate using the `tenant-admin.`+`APIKEY` role
67-
3. Generate a new tenant with a `POST` request to the API endpoint `/admin/tenants/` using the request body detailed in the example below
67+
3. Generate a new tenant with a `POST` request to the API endpoint `/tenant-admin/v1/admin/tenants/` using the request body detailed in the example below
6868

6969
```json
7070
{
@@ -97,9 +97,9 @@ Tenants, functioning as custodial wallets, are established within the Trust Ecos
9797

9898
Similar to Verifiers, Tenants for Holders are created within the Trust Ecosystem's multitenant AcaPy agent. Follow these steps to create new Holders for your trust ecosystem:
9999

100-
1. Access the API through [Governance Cloud API](http://localhost:8100/docs)
100+
1. Access the API through [CloudAPI-Multitenant-Admin](http://localhost:8100/docs)
101101
2. Authenticate using `tenant-admin.`+`APIKEY` role
102-
3. Generate a new tenant with a `POST` to the API endpoint `/admin/tenants/` using the request body in the example below
102+
3. Generate a new tenant with a `POST` to the API endpoint `/tenant-admin/v1/admin/tenants/` using the request body in the example below
103103

104104
```json
105105
{
@@ -131,7 +131,7 @@ Credential definitions are expected to be created by all **_Issuers_** within th
131131

132132
To create credential definitions through the `Transaction Endorser Protocol` for trust ecosystem _issuers_, follow the steps below:
133133

134-
1. Access the [Cloud API Swagger UI](http://localhost:8100/docs)
134+
1. Access the [CloudAPI-Tenant Swagger UI](http://localhost:8300/docs)
135135
2. Authenticate as an Issuer using `tenant.`+`JWTKey` x-api-key
136136
3. Create a new schema with a `POST` to the API endpoint `/v1/definitions/credentials` using the request body illustrated in the example below.
137137

@@ -158,13 +158,13 @@ To create credential definitions through the `Transaction Endorser Protocol` for
158158

159159
To query entries in the Trust Registry, adhere to the following steps:
160160

161-
1. Access the [Cloud API Swagger UI](http://localhost:8100/docs)
161+
1. Access the [CloudAPI-Public Swagger UI](http://localhost:8400/docs)
162162
2. Authenticate as an Issuer using `tenant.`+`JWTKey` role
163163

164164
>NOTE: The Trust Registry is currently public and accessible to anyone on the internet
165165
166166
3. The trust-registry has 5 GET endpoints:
167-
- `GET` `/trust-registry/schemas` will return all schemas on the trust registry
167+
- `GET` `/v1/trust-registry/schemas` will return all schemas on the trust registry
168168

169169
Response:
170170

@@ -197,7 +197,7 @@ To query entries in the Trust Registry, adhere to the following steps:
197197
]
198198
```
199199

200-
- `GET` `/trust-registry/schemas/{schema_id}` will return the schema based on id passed
200+
- `GET` `/v1/trust-registry/schemas/{schema_id}` will return the schema based on id passed
201201

202202
Response:
203203

@@ -210,7 +210,7 @@ To query entries in the Trust Registry, adhere to the following steps:
210210
}
211211
```
212212

213-
- `GET` `/trust-registry/actors` will return all actors on the trust registry
213+
- `GET` `/v1/trust-registry/actors` will return all actors on the trust registry
214214
- Optionally one of the following query parameters can be passed to get a specific actor:
215215
- `actor_did`
216216
- `actor_id`
@@ -251,5 +251,5 @@ To query entries in the Trust Registry, adhere to the following steps:
251251
]
252252
```
253253

254-
- `GET` `/trust-registry/actors/issuers` will return all actors with `issuer` as a role
255-
- `GET` `/trust-registry/actors/verifiers` will return all actors with `verifier` as a role
254+
- `GET` `/v1/trust-registry/actors/issuers` will return all actors with `issuer` as a role
255+
- `GET` `/v1/trust-registry/actors/verifiers` will return all actors with `verifier` as a role

docs/Quick Start Guide.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ This guide provides a simple walkthrough for starting, managing, and stopping a
4444

4545
Once the project is running, you'll have access to several services via Swagger interfaces. These can be found at the following URLs:
4646

47-
- [ACA-Py CloudAPI Admin](http://localhost:8100/docs)
47+
- [CloudAPI-Multitenant-Admin](http://localhost:8100/docs)
48+
- [CloudAPI-Governance](http://localhost:8200/docs)
49+
- [CloudAPI-Tenant](http://localhost:8300/docs)
50+
- [CloudAPI-Public](http://localhost:8400/docs)
4851
- [ACA-Py Governance Agent Admin](http://localhost:3021)
49-
- [ACA-Py CloudAPI Multitenant](http://localhost:8100/docs)
5052
- [ACA-Py Multitenant Agent Admin](http://localhost:4021)
5153
- [Webhooks](http://localhost:3010/docs)
5254
- [Trust Registry](http://localhost:8001/docs)

docs/README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@
1111

1212
## First Steps
1313

14-
After spinning up the containers following the [Quick Start Guide](Quick%20Start%20Guide.md), you are ready to rumble. Navigating to the [Swagger UI](http://localhost:8100/docs/) provides a good overview of the intended functionalities. You'll see that there are `generic` endpoints for common actions, wallet specific actions, and admin actions. On top of that, you'll find trust registry and webhooks endpoints.
14+
After spinning up the containers following the [Quick Start Guide](Quick%20Start%20Guide.md), you are ready to rumble. Navigating to the **Swagger UI** :
1515

16-
>NOTE: Regardless of the multitude of containers and mechanisms running, [CloudAPI](http://localhost:8100) and its [Swagger UI](http://localhost:8100/docs) are the main interaction points intended between clients and the stack. This should be the only endpoint clients should interact with. There is no need (and no intention to allow) for clients to directly interact with the webhooks or trust registry container. For a production deployment or a close-to-production/smoke-testing deployment, you are well advised to only expose this endpoint to clients and leave all other endpoints unexposed to the outside world.
16+
- [CloudAPI-Multitenant-Admin](http://localhost:8100/docs)
17+
- [CloudAPI-Governance](http://localhost:8200/docs)
18+
- [CloudAPI-Tenant](http://localhost:8300/docs)
19+
- [CloudAPI-Public](http://localhost:8400/docs)
20+
21+
provides a good overview of the intended functionalities. You'll see that there are endpoints for common actions, wallet specific actions, and admin actions. On top of that, you'll find trust registry and webhooks endpoints.
22+
23+
>NOTE: Regardless of the multitude of containers and mechanisms running in **CloudAPI**, its aforementioned Swagger UI's are the main interaction points intended between clients and the stack. This should be the only endpoints clients should interact with. There is no need (and no intention to allow) for clients to directly interact with the webhooks or trust registry container. For a production deployment or a close-to-production/smoke-testing deployment, you are well advised to only expose this endpoint to clients and leave all other endpoints unexposed to the outside world.
1724
1825
### Using the Swagger UI
1926

docs/Webhooks.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ How this works is that either procedure instantiates a client connecting to the
8181

8282
There are five different endpoints for listening to server-sent events (SSE).
8383

84-
- `GET` `/sse/{wallet_id}`
85-
- `GET` `/sse/{wallet_id}/{topic}`
86-
- `GET` `/sse/{wallet_id}/{topic}/{desired_state}`
87-
- `GET` `/sse/{wallet_id}/{topic}/{field}/{field_id}`
88-
- `GET` `/sse/{wallet_id}/{topic}/{field}/{field_id}/{desired_state}`
84+
- `GET` `/v1/sse/{wallet_id}`
85+
- `GET` `/v1/sse/{wallet_id}/{topic}`
86+
- `GET` `/v1/sse/{wallet_id}/{topic}/{desired_state}`
87+
- `GET` `/v1/sse/{wallet_id}/{topic}/{field}/{field_id}`
88+
- `GET` `/v1/sse/{wallet_id}/{topic}/{field}/{field_id}/{desired_state}`
8989

9090
Valid topics are same as noted above.
9191

docs/examples/1. Onboarding.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 1: Onboarding Tenants
22

3-
When onboarding users, also referred to as tenants or wallets, you need to use the `tenant-admin` role. Below, you will find the curl commands used to create an `Issuer`, `Verifier` and a `Holder`. If you are using the [Swagger UI](http://localhost:8100/docs) to do the onboarding, just use the JSON in the field marked with `-d` in the curl commands.
3+
When onboarding users, also referred to as tenants or wallets, you need to use the `tenant-admin` role. Below, you will find the curl commands used to create an `Issuer`, `Verifier` and a `Holder`. If you are using the [CloudAPI-Multitenant-Admin Swagger UI](http://localhost:8100/docs) to do the onboarding, just use the JSON in the field marked with `-d` in the curl commands.
44

55
The difference between an `Issuer`, `Verifier` and `Holder` is that issuers and verifiers have privileged roles, and are therefore written to the trust registry, allowing them to issue credentials and to verify proof requests in our ecosystem. A holder is a regular tenant without a role, and therefore cannot act as an issuer or verifier. They are all "tenants", and therefore each will have a tenant access token.
66

@@ -10,7 +10,7 @@ The difference between an `Issuer`, `Verifier` and `Holder` is that issuers and
1010
1111
```bash
1212
curl -X 'POST' \
13-
'http://localhost:8100/v1/admin/tenants' \
13+
'http://localhost:8100/tenant-admin/v1/admin/tenants' \
1414
-H 'accept: application/json' \
1515
-H 'Content-Type: application/json' \
1616
-H 'x-api-key: tenant-admin.adminApiKey' \
@@ -45,7 +45,7 @@ The `access_token` is what must be used as x-api-key to act as this tenant.
4545

4646
```bash
4747
curl -X 'POST' \
48-
'http://localhost:8100/v1/admin/tenants' \
48+
'http://localhost:8100/tenant-admin/v1/admin/tenants' \
4949
-H 'accept: application/json' \
5050
-H 'Content-Type: application/json' \
5151
-H 'x-api-key: tenant-admin.adminApiKey' \
@@ -79,7 +79,7 @@ Response:
7979

8080
```bash
8181
curl -X 'POST' \
82-
'http://localhost:8100/v1/admin/tenants' \
82+
'http://localhost:8100/tenant-admin/v1/admin/tenants' \
8383
-H 'accept: application/json' \
8484
-H 'Content-Type: application/json' \
8585
-H 'x-api-key: tenant-admin.adminApiKey' \

docs/examples/2. Create Schema.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Only the `Governance` role can create Schemas. Note the `x-api-key` used in the
44

55
```bash
66
curl -X 'POST' \
7-
'http://localhost:8100/v1/definitions/schemas' \
7+
'http://localhost:8200/v1/definitions/schemas' \
88
-H 'accept: application/json' \
99
-H 'Content-Type: application/json' \
1010
-H 'x-api-key: governance.adminApiKey' \

docs/examples/3. Create Credential Definition.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Once a schema has been created by the governance agent, the `Issuer` can create
44

55
```bash
66
curl -X 'POST' \
7-
'http://localhost:8100/v1/definitions/credentials' \
7+
'http://localhost:8300/v1/definitions/credentials' \
88
-H 'accept: application/json' \
99
-H 'Content-Type: application/json' \
1010
-H 'x-api-key: tenant.<Issuer token>' \

docs/examples/4. Create Connection with Issuer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ As the `Issuer` we create a connection invitation.
1010
1111
```bash
1212
curl -X 'POST' \
13-
'http://localhost:8100/v1/connections/create-invitation' \
13+
'http://localhost:8300/v1/connections/create-invitation' \
1414
-H 'accept: application/json' \
1515
-H 'Content-Type: application/json' \
1616
-H 'x-api-key: tenant.<Issuer token>' \
@@ -48,7 +48,7 @@ The `Holder` accepts the connection by using the `invitation` object above, and
4848
4949
```bash
5050
curl -X 'POST' \
51-
'http://localhost:8100/v1/connections/accept-invitation' \
51+
'http://localhost:8300/v1/connections/accept-invitation' \
5252
-H 'accept: application/json' \
5353
-H 'Content-Type: application/json' \
5454
-H 'x-api-key: tenant.<Holder token>' \

0 commit comments

Comments
 (0)