taler-docs

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

api-apns.rst (2627B)


      1 ..
      2   This file is part of GNU TALER.
      3 
      4   Copyright (C) 2026 Taler Systems SA
      5 
      6   TALER is free software; you can redistribute it and/or modify it under the
      7   terms of the GNU Affero General Public License as published by the Free Software
      8   Foundation; either version 2.1, or (at your option) any later version.
      9 
     10   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     11   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     12   A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
     13 
     14   You should have received a copy of the GNU Affero General Public License along with
     15   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     16 
     17 ============================
     18 Taler APNs Relay RESTful API
     19 ============================
     20 
     21 .. contents:: Table of Contents
     22   :local:
     23 
     24 Version History
     25 ---------------
     26 
     27 The current protocol version is **v0**.
     28 
     29 * Nothing depends on the apns relay API at this point.
     30 
     31 **Version history:**
     32 
     33 * ``v0``: Initial version.
     34 
     35 **Upcoming versions:**
     36 
     37 * None anticipated.
     38 
     39 **Ideas for future version:**
     40 
     41 * ``vXXX``: marker for features not yet targeted for release
     42 
     43 
     44 Introduction
     45 ------------
     46 
     47 APNs Relay API.
     48 
     49 
     50 Config
     51 ------
     52 
     53 .. http:get:: /config
     54 
     55   Return the protocol version and configuration information about the bank.
     56   This specification corresponds to ``current`` protocol being version **v0**.
     57 
     58   **Response:**
     59 
     60   :http:statuscode:`200 OK`:
     61     Response is a `ApnsRelayConfig`.
     62 
     63   **Details:**
     64 
     65   .. ts:def:: ApnsRelayConfig
     66 
     67     interface ApnsRelayConfig {
     68       // Name of the API.
     69       name: "taler-apns-relay";
     70 
     71       // libtool-style representation of the Bank protocol version, see
     72       // https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning
     73       // The format is "current:revision:age".
     74       version: string;
     75 
     76       // URN of the implementation (needed to interpret 'revision' in version).
     77       implementation: string;
     78     }
     79 
     80 Device Registration
     81 -------------------
     82 
     83 .. http:post:: /devices
     84 
     85   Register an iOS device for recurrent wakeup.
     86 
     87   **Request:**
     88 
     89   .. ts:def:: DeviceRegistrationRequest
     90 
     91     interface DeviceRegistrationRequest {
     92       // Device token
     93       token: string;
     94     }
     95 
     96   **Response:**
     97 
     98   :http:statuscode:`204 No Content`:
     99     The device have been registered.
    100 
    101 .. http:delete:: /devices
    102 
    103   Register an iOS device.
    104 
    105   **Request:**
    106 
    107   .. ts:def:: DeviceUnregistrationRequest
    108 
    109     interface DeviceUnregistrationRequest {
    110       // Device token
    111       token: string;
    112     }
    113 
    114   **Response:**
    115 
    116   :http:statuscode:`204 No Content`:
    117     The device have been registered.