From a073c127d324bb0667bacff1f94499340c3f6385 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 19 May 2020 18:24:46 +0530 Subject: libeufin docs --- libeufin/api-nexus.rst | 111 +++++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 60 deletions(-) (limited to 'libeufin/api-nexus.rst') diff --git a/libeufin/api-nexus.rst b/libeufin/api-nexus.rst index 681811aa..f175c9d9 100644 --- a/libeufin/api-nexus.rst +++ b/libeufin/api-nexus.rst @@ -36,7 +36,7 @@ Users Management .. http:post:: /users - Create a new user. Only the super-user can call this API. + Create a new user. Only a superuser can call this API. **Request:** @@ -59,6 +59,11 @@ Users Management password: string; } + +.. http:get:: /users + + Return list of users. + Bank Account Management ----------------------- @@ -95,27 +100,13 @@ Bank Account Management // to submit at the bank. uuid: string; - // Specify the bank transport to use for the submission. - transport?: Transport; + // Specify the bank connectionto use for the submission. + connection?: string; } - .. ts:def:: Transport - - interface Transport { - - // Transport type: 'ebics', 'local', 'fints' (forthcoming). - // It must match one of the types actually implemented by - // nexus. - type: string; - - // A mnemonic identifier given by the user to one particular - // transport instance. - name: string; - } - :status 404 Not Found: the unique identifier **or** - the bank transport could not be found in the system + the bank connection could not be found in the system .. http:get:: /bank-accounts//prepared-payments/$uuid @@ -193,16 +184,16 @@ Bank Account Management .. http:post:: /bank-accounts/collected-transactions - Nexus will download bank transactions from the given transport. + Nexus will download bank transactions using the given connection. **Request:** .. ts:def:: CollectedTransaction interface CollectedTransaction { - // Optional field to specify the bank transport to + // Optional field to specify the bank connection to // use for such operation. - bankTransport?: Transport; + bankConnection: connection; // dashed date (YYYY-MM-DD) of the earliest payment // in the result. Optional, defaults to "earliest // possible" date. @@ -254,57 +245,58 @@ Bank Account Management subject: string; } -Bank Transports + +Bank Connections --------------- -Bank transports connect the local LibEuFin bank account +Bank connections connect the local LibEuFin bank account to the real bank. -.. http:post:: /bank-transports +.. http:post:: /bank-connections - Activate a new bank transport for the requesting user. + Activate a new bank connection for the requesting user. **Request:** - .. ts:def:: BankTransport + .. ts:def:: BankConnectionRestoreRequest - interface BankTransport { + interface BankConnectionRestoreRequest { - transport: Transport; + name: string; - // Restore a previous transport. Take precedence + // Restore a previous connection. Take precedence // over the 'new' field. - backup?: TransportBackup; + backup?: BankConnectionBackup; - // Data to create a fresh bank transport without + // Data to create a fresh bank connection without // restoring any backup. - data?: TransportNew; + data?: BankConnectionNew; } - .. ts:def:: TransportNew + .. ts:def:: ConnectionNew - interface TransportNew { + interface ConnectionNew { // This type is strictly dependent on - // the transport being created. For Ebics, + // the connection being created. For Ebics, // it will contain the required fields (as strings): // 'ebicsURL', 'userID', 'partnerID', 'hostID', and // the optional 'systemID'. - // Other transport types, like 'local' (used for testing + // Other connection types, like 'local' (used for testing // purposes skipping any interaction with the bank service) // and 'fints' are all work in progress! } - .. ts:def:: TransportBackup + .. ts:def:: BankConnectionBackup - interface TransportBackup { + interface BankConnectionBackup { // The information needed in this type depend entirely - // on which transport is being restored. + // on which connectionis being restored. } @@ -313,30 +305,29 @@ to the real bank. :status 409 Conflict: The ``name`` field exists already for the requesting user. -.. http:post:: /bank-transports/sendMSG. - - Perform the ``MSG`` operation offered by ``transport-name`` - **without** affecting the nexus database. - **Request:** - - A `Transport` object. +.. http:post:: /bank-connections - **Response:** + List available bank connections. - :status 404 Not Found: ``transport-name`` doesn't exist for - the requesting user. -.. http:post:: /bank-transports//syncMSG. - - Some transports **do** have operations that aren't semantically - related to a bank account but need to be stored locally at the nexus. - One typical example is the downloading of the bank's keys vie the - EBICS transport. This API lets the user perform the ``MSG`` - operation that should result in new data being stored locally - at the nexus. +EBICS-specific APIs +------------------- - **Response:** +The following endpoints are only available for EBICS bank connections. +They are namespaced under the ``/ebics/`` sub-resource. - :status 404 Not Found: ``transport-name`` doesn't exist for - the requesting user. +.. http:post:: /bank-connections//ebics/download/ + + + Perform an EBICS download transaction of type ``msg``. + This request will not affect any bank account or other state + in the nexus database. It will just make a request to the bank + and return the answer. + +.. http:post:: /bank-connections//ebics/upload/ + + Perform an EBICS upload transaction of type ``msg``. + This request will not affect any bank account or other state + in the nexus database. It will just make a request to the bank + and return the answer. -- cgit v1.2.3