taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

get-private-templates.rst (1144B)


      1 .. http:get:: [/instances/$INSTANCE]/private/templates
      2 
      3   This is used to return the list of all the templates.
      4 
      5 
      6   **Required permission:** ``templates-read``
      7 
      8   **Response:**
      9 
     10   :http:statuscode:`200 OK`:
     11      The backend has successfully returned all the templates. Returns a `TemplateSummaryResponse`.
     12   :http:statuscode:`401 Unauthorized`:
     13     The request is unauthorized.
     14   :http:statuscode:`404 Not found`:
     15      The backend has does not know about the instance.
     16   :http:statuscode:`500 Internal Server Error`:
     17     The server experienced an internal failure.
     18     Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``.
     19 
     20   **Details:**
     21 
     22   .. ts:def:: TemplateSummaryResponse
     23 
     24     interface TemplateSummaryResponse {
     25 
     26       // List of templates that are present in our backend.
     27       templates: TemplateEntry[];
     28     }
     29 
     30   The `TemplateEntry` object describes a template. It has the following structure:
     31 
     32   .. ts:def:: TemplateEntry
     33 
     34     interface TemplateEntry {
     35 
     36       // Template identifier, as found in the template.
     37       template_id: string;
     38 
     39       // Human-readable description for the template.
     40       template_description: string;
     41 
     42     }