summaryrefslogtreecommitdiff
path: root/man/libeufin-nexus.1
blob: cfeb1f7e121e7ee64120ce2e7ddcbb85a4057b0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
.\" Man page generated from reStructuredText.
.
.TH "LIBEUFIN-NEXUS" "1" "Jul 06, 2022" "0.9" "GNU Taler"
.SH NAME
libeufin-nexus \- service to interface to various bank access APIs
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.sp
\fBlibeufin\-nexus\fP
[\fB\-h\fP\ |\ \fB\-\-help\fP]
[\fB\-\-version\fP]
COMMAND [ARGS...]
.sp
Commands: serve, superuser, parse\-camt, reset\-tables
.SH DESCRIPTION
.sp
\fBlibeufin\-nexus\fP is a program that provides a service to interface to
various bank access APIs, using JSON as the response format.
It maintains state in its own private database.
You interact with it through HTTP
requests either over the network or via a Unix domain socket.
Related program \fBlibeufin\-cli\fP is the preferred front end
for that mode of operation.
There is also a mode where \fBlibeufin\-nexus\fP accepts commands directly,
useful for doing administrative tasks.
.sp
Its options are as follows:
.INDENT 0.0
.TP
\fB\-h\fP | \fB\-\-help\fP
Print short help on options.
.TP
\fB–version\fP
Print version information.
.UNINDENT
.sp
The interaction model is as follows:
.INDENT 0.0
.IP \(bu 2
Configure the nexus with command \fBsuperuser\fP\&.
.IP \(bu 2
Start the HTTP server with command \fBserve\fP\&.
Let this run in a shell, writing logs to stderr.
.IP \(bu 2
Interact with \fBlibeufin\-nexus\fP\&.
.IP \(bu 2
When finished, interrupt the \fBserve\fP process and clean up with command
\fBreset\-tables\fP\&.
.UNINDENT
.sp
The following sections describe each command in detail.
.SS superuser
.sp
This command adds a superuser, or changes the password.
It takes argument \fBUSERNAME\fP\&.
Option \fB\-\-password TEXT\fP specifies the password.
If omitted, \fBlibeufin\-nexus\fP will query interactively for it.
.sp
For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ libeufin\-nexus superuser joe
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
This creates superuser \fBjoe\fP and interactively queries for the password.
.SS parse\-camt
.sp
This command parses a camt file and displays the result to stdout.
It takes argument \fBFILENAME\fP, which names a file in CAMT format.
Parsing may also display log information to stderr.
The normal log level is \fBDEBUG\fP\&.
To change it, use \fB\-\-log\-level LEVEL\fP, where \fBLEVEL\fP is one of:
\fBERROR\fP, \fBWARN\fP, \fBINFO\fP, \fBDEBUG\fP, \fBTRACE\fP\&.
.sp
For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ libeufin\-nexus parse\-camt camt53\-gls\-style\-0.xml
{
  "transactions" : [ {
    "amount" : "EUR:2.35",
    "creditDebitIndicator" : "DBIT",
    ...
  } ]
}
.ft P
.fi
.UNINDENT
.UNINDENT
.SS serve
.sp
This command starts the HTTP server, listening on port 5001.
To use a different port, use option \fB\-\-port INT\fP\&.
To listen, instead, on a Unix domain socket,
use option \fB\-\-with\-unix\-socket PATH\fP\&.
When both \fB\-\-port\fP and \fB\-\-with\-unix\-socket\fP are given,
\fB\-\-with\-unix\-socket\fP takes precedence.
.sp
The process runs in the foreground, writing its logs to standard error.
The normal log level is \fBDEBUG\fP\&.
To change it, use \fB\-\-log\-level LEVEL\fP, where \fBLEVEL\fP is one of:
\fBERROR\fP, \fBWARN\fP, \fBINFO\fP, \fBDEBUG\fP, \fBTRACE\fP\&.
.sp
Before invoking \fBserve\fP, the following environment variable needs to be set:
.INDENT 0.0
.TP
.B \fBLIBEUFIN_NEXUS_DB_CONNECTION\fP
This specifies the database \fBlibeufin\-nexus\fP uses to maintain state.
Currently, both Sqlite and PostgreSQL are supported.
(Only one needs to be specified.)
Examples:
.INDENT 7.0
.IP \(bu 2
\fBjdbc:sqlite:/tmp/libeufin\-nexus.db\fP
.IP \(bu 2
\fBjdbc:postgresql://localhost:5432/libeufindb?user=Foo&password=secret\fP
.UNINDENT
.UNINDENT
.sp
Normally, the \fBserve\fP command runs until interrupted.
When run in a shell, you can use \fBControl\-C\fP for that.
.SS reset\-tables
.sp
This command drops all the tables in the internal database.
(The next time the tables are needed, \fBlibeufin\-nexus\fP creates them
again, automatically.)
.sp
It should only be used when the nexus is quiescent.
.SH SEE ALSO
.SH BUGS
.sp
Report bugs by using \fI\%https://bugs.taler.net\fP or by sending electronic
mail to <\fI\%taler@gnu.org\fP>.
.SH AUTHOR
GNU Taler contributors
.SH COPYRIGHT
2014-2022 Taler Systems SA (GPLv3+ or GFDL 1.3+)
.\" Generated by docutils manpage writer.
.