get-private-tokenfamilies.rst (1609B)
1 .. http:get:: [/instances/$INSTANCE]/private/tokenfamilies 2 3 This is used to list all configured token families for an instance. 4 5 **Required permission:** ``tokenfamilies-read`` 6 7 **Response:** 8 9 :http:statuscode:`200 OK`: 10 The merchant backend has successfully returned all token families. 11 Returns a `TokenFamiliesList`. 12 13 :http:statuscode:`404 Not found`: 14 The merchant backend is unaware of 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:: TokenFamiliesList 22 23 // TODO: Add pagination 24 25 interface TokenFamiliesList { 26 27 // All configured token families of this instance. 28 token_families: TokenFamilySummary[]; 29 30 } 31 32 .. ts:def:: TokenFamilySummary 33 34 interface TokenFamilySummary { 35 // Identifier for the token family consisting of unreserved characters 36 // according to RFC 3986. 37 slug: string; 38 39 // Human-readable name for the token family. 40 name: string; 41 42 // Human-readable description for the token family. 43 // @since protocol **v23**. 44 description: string; 45 46 // Optional map from IETF BCP 47 language tags to localized descriptions. 47 // @since protocol **v23**. 48 description_i18n?: { [lang_tag: string]: string }; 49 50 // Start time of the token family's validity period. 51 valid_after: Timestamp; 52 53 // End time of the token family's validity period. 54 valid_before: Timestamp; 55 56 // Kind of the token family. 57 kind: TokenFamilyKind; 58 }