get-private-tokenfamilies.rst (1582B)
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`` (see :ref:`Scopes <merchant-api-scopes>`) 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. 36 slug: Slug; 37 38 // Human-readable name for the token family. 39 name: string; 40 41 // Human-readable description for the token family. 42 // @since protocol **v23**. 43 description: string; 44 45 // Optional map from IETF BCP 47 language tags to localized descriptions. 46 // @since protocol **v23**. 47 description_i18n?: { [lang_tag: string]: string }; 48 49 // Start time of the token family's validity period. 50 valid_after: Timestamp; 51 52 // End time of the token family's validity period. 53 valid_before: Timestamp; 54 55 // Kind of the token family. 56 kind: TokenFamilyKind; 57 }