get-private-tokenfamilies-TOKEN_FAMILY_SLUG.rst (2644B)
1 .. http:get:: [/instances/$INSTANCE]/private/tokenfamilies/$TOKEN_FAMILY_SLUG 2 3 This is used to get detailed information about a specific token family. 4 5 **Required permission:** ``tokenfamilies-read`` 6 7 **Response:** 8 9 :http:statuscode:`200 OK`: 10 The merchant backend has successfully returned the detailed information 11 about a specific token family. Returns a `TokenFamilyDetails`. 12 13 :http:statuscode:`401 Unauthorized`: 14 The request is unauthorized. 15 :http:statuscode:`404 Not found`: 16 The merchant backend is unaware of the token family or instance. 17 :http:statuscode:`500 Internal Server Error`: 18 The server experienced an internal failure. 19 Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 20 21 **Details:** 22 23 The `TokenFamilyDetails` object describes a configured token family. 24 25 .. ts:def:: TokenFamilyDetails 26 27 interface TokenFamilyDetails { 28 29 // Identifier for the token family consisting of unreserved characters 30 // according to RFC 3986. 31 slug: string; 32 33 // Human-readable name for the token family. 34 name: string; 35 36 // Human-readable description for the token family. 37 description: string; 38 39 // Optional map from IETF BCP 47 language tags to localized descriptions. 40 description_i18n?: { [lang_tag: string]: string }; 41 42 // Additional meta data, such as the ``trusted_domains`` 43 // or ``expected_domains``. Depends on the ``kind``. 44 extra_data?: object; 45 46 // Start time of the token family's validity period. 47 // No token validities can start before this time 48 // (but they could be sold before). 49 valid_after: Timestamp; 50 51 // End time of the token family's validity period. 52 // No tokens will be accepted after this time. 53 valid_before: Timestamp; 54 55 // Validity duration of an issued token. 56 duration: RelativeTime; 57 58 // Rounding granularity for the start validity of keys. 59 // The desired time is rounded down to a multiple of this 60 // granularity and then the ``start_offset`` is added to 61 // compute the actual start time of the token keys' validity. 62 // The end is then computed by adding the ``duration``. 63 validity_granularity: RelativeTime; 64 65 // Offset in seconds to subtract from the start time rounded to ``validity_granularity`` 66 // to compute the actual start time for a key. 67 start_offset: RelativeTime; 68 69 // Kind of the token family. 70 kind: TokenFamilyKind; 71 72 // How many tokens have been issued for this family. 73 issued: Integer; 74 75 // How many tokens have been used for this family. 76 used: Integer; 77 78 }