taler-docs

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

get-private-templates.rst (920B)


      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:`404 Not found`:
     13      The backend has does not know about the instance.
     14 
     15   **Details:**
     16 
     17   .. ts:def:: TemplateSummaryResponse
     18 
     19     interface TemplateSummaryResponse {
     20 
     21       // List of templates that are present in our backend.
     22       templates: TemplateEntry[];
     23     }
     24 
     25   The `TemplateEntry` object describes a template. It has the following structure:
     26 
     27   .. ts:def:: TemplateEntry
     28 
     29     interface TemplateEntry {
     30 
     31       // Template identifier, as found in the template.
     32       template_id: string;
     33 
     34       // Human-readable description for the template.
     35       template_description: string;
     36 
     37     }