aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/documentation/chapters/developer.texi54
1 files changed, 54 insertions, 0 deletions
diff --git a/doc/documentation/chapters/developer.texi b/doc/documentation/chapters/developer.texi
index c7d7ddaac..e95355302 100644
--- a/doc/documentation/chapters/developer.texi
+++ b/doc/documentation/chapters/developer.texi
@@ -75,6 +75,7 @@ new chapters, sections or insightful comments.
75* REVOCATION Subsystem:: 75* REVOCATION Subsystem::
76* File-sharing (FS) Subsystem:: 76* File-sharing (FS) Subsystem::
77* REGEX Subsystem:: 77* REGEX Subsystem::
78* REST Subsystem::
78@end menu 79@end menu
79 80
80@node Developer Introduction 81@node Developer Introduction
@@ -8365,3 +8366,56 @@ create_strings.py <input path> <outfile>
8365@noindent 8366@noindent
8366to create a search strings file from the previously created 8367to create a search strings file from the previously created
8367regular expressions. 8368regular expressions.
8369
8370@cindex REST subsystem
8371@node REST Subsystem
8372@section REST Subsystem
8373
8374@c %**end of header
8375
8376Using the REST subsystem, you can expose REST-based APIs or services.
8377The REST service is designed as a pluggable architecture.
8378To create a new REST endpoint, simply add a library in the form
8379``plugin_rest_*''.
8380The REST service will automatically load all REST plugins on startup.
8381
8382@strong{Configuration}
8383
8384The rest service can be configured in various ways.
8385The reference config file can be found in
8386@file{src/rest/rest.conf}:
8387@example
8388[rest]
8389REST_PORT=7776
8390REST_ALLOW_HEADERS=Authorization,Accept,Content-Type
8391REST_ALLOW_ORIGIN=*
8392REST_ALLOW_CREDENTIALS=true
8393@end example
8394
8395The port as well as Cross-origin resource sharing (CORS) headers that
8396are supposed to be advertised by the rest service are configurable.
8397
8398@menu
8399* Namespace considerations::
8400* Endpoint documentation::
8401@end menu
8402
8403@node Namespace considerations
8404@subsection Namespace considerations
8405
8406The gnunet-rest-service will load all plugins that are installed.
8407As such it is important that the endpoint namespaces do not clash.
8408For example, plugin X might expose the endpoint ``/xxx'' while plugin Y exposes
8409endpoint ``/xxx/yyy''.
8410This is a problem if plugins X is also supposed to handle a call to
8411``/xxx/yyy''.
8412Currently, the REST service will not complain or warn about such clashes so
8413please make sure that endpoints are unambiguous.
8414
8415@node Endpoint documentation
8416@subsection Endpoint documentation
8417
8418This is WIP. Endpoints should be documented appropriately.
8419Perferably using annotations.
8420
8421