summaryrefslogtreecommitdiff
path: root/libeufin
diff options
context:
space:
mode:
authorms <ms@taler.net>2021-10-13 09:42:29 +0200
committerms <ms@taler.net>2021-10-13 09:42:29 +0200
commit902493fa3c85b6fa2b056acb460b9833201e2e2b (patch)
tree6caa1b5cfe2fc5d92414d178614baa8903b9ab08 /libeufin
parenta703e7f8af8cb8aff3686ca6352e0cf37116e5de (diff)
downloaddocs-902493fa3c85b6fa2b056acb460b9833201e2e2b.tar.gz
docs-902493fa3c85b6fa2b056acb460b9833201e2e2b.tar.bz2
docs-902493fa3c85b6fa2b056acb460b9833201e2e2b.zip
Sandbox API.
Define one section per resource being provided, and move the existing endpoints under their respective section.
Diffstat (limited to 'libeufin')
-rw-r--r--libeufin/api-sandbox.rst224
1 files changed, 135 insertions, 89 deletions
diff --git a/libeufin/api-sandbox.rst b/libeufin/api-sandbox.rst
index b30061ae..40456f15 100644
--- a/libeufin/api-sandbox.rst
+++ b/libeufin/api-sandbox.rst
@@ -8,98 +8,82 @@ Sandbox API
..
Current Sandbox endpoints.
- POST /register
- GET /jinja-test
- GET /profile
- GET /static
GET /
- GET /config
- POST /admin/payments/camt
- POST /admin/bank-accounts/$accountLabel
- GET /admin/bank-accounts/$accountLabel
- POST /admin/bank-accounts/$accountLabel/simulate-incoming-transaction
- POST /admin/payments
- POST /admin/ebics/bank-accounts
- GET /admin/bank-accounts
- GET /admin/bank-accounts/$accountLabel/transactions
- POST /admin/bank-accounts/$accountLabel/generate-transactions
- POST /admin/ebics/subscribers
- GET /admin/ebics/subscribers
- POST /admin/ebics/hosts/$hostID/rotate-keys
- POST /admin/ebics/hosts
- GET /admin/ebics/hosts
- POST /ebicsweb
+ Welcome message.
-HTTP API
-========
+ POST /admin/payments/camt
+ give last statement of requesting account
-..
- Payments.
+ ** Bank accounting **
+ POST /admin/bank-accounts/$accountLabel
+ create bank account (no EBICS involved)
-.. http:post:: /admin/payments/camt
+ GET /admin/bank-accounts
+ Give summary of all the bank accounts.
- Return the history of one IBAN in Camt.053 format.
+ GET /admin/bank-accounts/$accountLabel
+ give general information about a bank account
- **Request**
+ POST /admin/bank-accounts/$accountLabel/simulate-incoming-transaction
+ Book one incoming transaction for $accountLabel.
+ The debtor (not required to be in the same bank)
+ information is taken from the request.
- .. code-block:: tsref
+ GET /admin/bank-accounts/$accountLabel/transactions
+ Inform about all the transactions of one bank account.
- interface CamtParams {
+ POST /admin/bank-accounts/$accountLabel/generate-transactions
+ Generate one incoming and one outgoing transaction
+ for one bank account.
- // label of the bank account being queried.
- bankaccount: string;
+ ** EBICS subscribers management **
- // The Camt type to return. Only '53' is allowed
- // at this moment.
- type: number;
- }
+ POST /admin/ebics/subscribers
+ Create a new EBICS subscriber.
- **Response**
+ GET /admin/ebics/subscribers
+ Give details of all the EBICS subscribers in the bank.
- The expected Camt.053 document.
+ POST /admin/ebics/bank-accounts
+ Create a *new* bank account and link it with a existing
+ EBICS subscriber.
-.. http:post:: /admin/payments
+ ** EBICS host management **
- Adds a new payment to the book. Mainly used for testing
- purposes.
+ POST /admin/ebics/hosts/$hostID/rotate-keys
+ Change the bank's keys used in EBICS communication.
- **Request:**
+ POST /admin/ebics/hosts
+ Create a new EBICS host.
- One object of type `SandboxPayment`
+ GET /admin/ebics/hosts
+ Show details of all the EBICS hosts in the bank.
- .. ts:def:: SandboxPayment
+ ** EBICS serving **
- interface SandboxPayment {
+ POST /ebicsweb
+ Processes a EBICS request.
- // IBAN that will receive the payment.
- creditorIban: string;
- // FIXME
- creditorBic: string;
- // FIXME
- creditorName: string;
+ ** Taler .. **
- // IBAN that will send the payment.
- debitorIban: string;
- // FIXME
- debitorBic: string;
- // FIXME
- debitorName: string;
+ GET /taler
+ Show one taler://-URI to initiate a withdrawal.
- amount: string;
- currency: string;
+ - Taler integration API.
+ 80% done.
- // subject of the payment.
- subject: string;
+ - Demobank configuration API.
+ ToDo.
- // Whether the payment is credit or debit *for* the
- // account being managed *by* the running sandbox.
- // Can take the values: "CRDT" or "DBIT".
- direction: string;
- }
+ - Taler access API.
+ ToDo.
-..
- Host management.
+EBICS.
+^^^^^^
+
+Hosts.
+++++++
.. http:post:: /admin/ebics/hosts
@@ -141,8 +125,37 @@ HTTP API
meant for tests (as the Sandbox itself is) and no backup will be
produced along this operation.
-..
- Subscriber management.
+
+Subscribers.
+++++++++++++
+
+.. http:post:: /admin/ebics/bank-accounts
+
+ Associates a new bank account to an existing subscriber.
+
+ **Request:**
+
+ .. ts:def:: BankAccountRequest
+
+ interface BankAccountRequest {
+
+ // Ebics subscriber
+ subscriber: string;
+
+ // IBAN
+ iban: string;
+
+ // BIC
+ bic: string;
+
+ // human name
+ name: string;
+
+ // bank account label
+ label: string;
+
+ }
+
.. http:post:: /admin/ebics/subscribers
@@ -197,36 +210,69 @@ HTTP API
}
-.. http:post:: /admin/ebics/bank-accounts
- Associates a new bank account to an existing subscriber.
+Bank accounts.
+^^^^^^^^^^^^^^
- **Request:**
+.. http:get:: /admin/bank-accounts
- .. ts:def:: BankAccountRequest
+ Give summary of all the bank accounts.
- interface BankAccountRequest {
+.. http:get:: /admin/bank-accounts/$accountLabel
- // Ebics subscriber
- subscriber: string;
+ Give information about a bank account.
- // IBAN
- iban: string;
- // BIC
- bic: string;
+Main EBICS service.
+^^^^^^^^^^^^^^^^^^^
- // human name
- name: string;
+.. http:post:: /ebicsweb
- // bank account label
- label: string;
+ Serves all the Ebics requests.
- }
-..
- Main EBICS service.
+Transactions.
+^^^^^^^^^^^^^
-.. http:post:: /ebicsweb
+JSON.
++++++
- Serves all the Ebics requests.
+.. http:get:: /admin/bank-accounts/$accountLabel/transactions
+
+ Inform about all the transactions of one bank account.
+
+.. http:post:: /admin/bank-accounts/$accountLabel/generate-transactions
+
+ Generate one incoming and one outgoing transaction for one bank account.
+
+.. http:post:: /admin/bank-accounts/$accountLabel/simulate-incoming-transaction
+
+ Book one incoming transaction for $accountLabel.
+ The debtor (not required to be in the same bank)
+ information is taken from the request.
+
+
+Camt.
++++++
+
+.. http:post:: /admin/payments/camt
+
+ Return the last statement of the requesting account.
+
+ **Request**
+
+ .. code-block:: tsref
+
+ interface CamtParams {
+
+ // label of the bank account being queried.
+ bankaccount: string;
+
+ // The Camt type to return. Only '53' is allowed
+ // at this moment.
+ type: number;
+ }
+
+ **Response**
+
+ The expected Camt.053 document.