get-private-otp-devices.rst (1041B)
1 .. http:get:: [/instances/$INSTANCE]/private/otp-devices 2 3 This is used to return the list of all the OTP devices. 4 5 **Required permission:** ``otp-devices-read`` 6 7 **Response:** 8 9 :http:statuscode:`200 OK`: 10 The backend has successfully returned all the templates. Returns a `OtpDeviceSummaryResponse`. 11 :http:statuscode:`401 Unauthorized`: 12 The request is unauthorized. 13 :http:statuscode:`404 Not found`: 14 The backend has does not know about the instance. 15 :http:statuscode:`500 Internal Server Error`: 16 The server experienced an internal failure. 17 Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 18 19 **Details:** 20 21 .. ts:def:: OtpDeviceSummaryResponse 22 23 interface OtpDeviceSummaryResponse { 24 25 // Array of devices that are present in our backend. 26 otp_devices: OtpDeviceEntry[]; 27 } 28 29 .. ts:def:: OtpDeviceEntry 30 31 interface OtpDeviceEntry { 32 33 // Device identifier. 34 otp_device_id: string; 35 36 // Human-readable description for the device. 37 device_description: string; 38 }