taler-docs

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

patch-private-fountains-FOUNTAIN_ID.rst (1522B)


      1 .. http:patch:: [/instances/$INSTANCE]/private/fountains/$FOUNTAIN_ID
      2 
      3   Modifies a fountain. Used for campaign or eligibility changes:
      4   replacing the grants does not invalidate
      5   the fountain secret; wallets learn about the changed grants on
      6   their next ``GET /fountain/info`` poll.
      7   This endpoint is available since protocol **vTokenFountains**.
      8 
      9   **Required permission:** ``fountains-write``
     10 
     11   **Request:**
     12 
     13   The request must be a `FountainPatchRequest`.
     14 
     15   **Response:**
     16 
     17   :http:statuscode:`204 No content`:
     18     The fountain was modified successfully.
     19   :http:statuscode:`400 Bad Request`:
     20     The request body is malformed.
     21     Returned with ``TALER_EC_GENERIC_PARAMETER_MALFORMED``.
     22   :http:statuscode:`404 Not found`:
     23     The fountain or merchant instance is unknown, or a
     24     ``token_family_slug`` in the grants does not refer to a known
     25     token family.
     26     Returned with ``TALER_EC_MERCHANT_GENERIC_FOUNTAIN_UNKNOWN``.
     27   :http:statuscode:`500 Internal Server Error`:
     28     The server experienced an internal failure.
     29 
     30   **Details:**
     31 
     32   .. ts:def:: FountainPatchRequest
     33 
     34     interface FountainPatchRequest {
     35 
     36       // New human-readable description.
     37       // Optional, keeps the previous value if absent.
     38       description?: string;
     39 
     40       // New poll frequency.
     41       // Optional, keeps the previous value if absent.
     42       poll_freq?: RelativeTime;
     43 
     44       // New set of grants, fully replacing the previous one.
     45       // Optional, keeps the previous grants if absent.
     46       grants?: FountainGrant[];
     47     }