api-observability.rst (2116B)
1 .. 2 This file is part of GNU TALER. 3 4 Copyright (C) 2025 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 .. target audience: developer, core developer 18 19 .. _observability-api: 20 21 ======================= 22 Taler Observability API 23 ======================= 24 25 .. contents:: Table of Contents 26 :local: 27 28 Introduction 29 ------------ 30 31 This section describes the API offered by many Taler components. The API is 32 used to track the internal state of a Taler component. 33 34 Config 35 ------ 36 37 .. http:get:: /config 38 39 Return the protocol version and configuration information about the bank. 40 This specification corresponds to ``current`` protocol being version **v0**. 41 42 **Response:** 43 44 :http:statuscode:`200 OK`: 45 Response is a `Config`. 46 47 **Details:** 48 49 .. ts:def:: Config 50 51 interface Config { 52 // Name of the API. 53 name: "taler-observability"; 54 55 // libtool-style representation of the Bank protocol version, see 56 // https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning 57 // The format is "current:revision:age". 58 version: string; 59 } 60 61 Metrics 62 ------- 63 64 .. http:get:: /metrics 65 66 Exposes application metrics in the Prometheus exposition format. These metrics can be scraped by Prometheus or other monitoring systems for observability, alerting, and analysis. 67 68 **Response:** 69 70 :http:statuscode:`200 Ok`: 71 Response woth metrics in the Prometheus text format. 72 :http:statuscode:`401 Unauthorized`: 73 Authentication failed, likely the credentials are wrong.