{
    "basePath": "/admin/v3",
    "definitions": {
        "AuthenticationDataSource": {
            "properties": {
                "commandData": {
                    "type": "string"
                },
                "httpAuthType": {
                    "type": "string"
                },
                "peerAddress": {
                    "$ref": "#/definitions/SocketAddress"
                },
                "subscription": {
                    "type": "string"
                },
                "tlsCertificates": {
                    "items": {
                        "$ref": "#/definitions/Certificate"
                    },
                    "type": "array"
                }
            },
            "type": "object"
        },
        "AuthenticationParameters": {
            "properties": {
                "clientAuthenticationDataSource": {
                    "$ref": "#/definitions/AuthenticationDataSource"
                },
                "clientRole": {
                    "type": "string"
                },
                "originalPrincipal": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "Certificate": {
            "properties": {
                "encoded": {
                    "items": {
                        "format": "byte",
                        "type": "string"
                    },
                    "type": "array"
                },
                "publicKey": {
                    "$ref": "#/definitions/PublicKey"
                },
                "type": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "CompletableFuture": {
            "properties": {
                "cancelled": {
                    "type": "boolean"
                },
                "completedExceptionally": {
                    "type": "boolean"
                },
                "done": {
                    "type": "boolean"
                },
                "numberOfDependents": {
                    "format": "int32",
                    "type": "integer"
                }
            },
            "type": "object"
        },
        "CompletableFutureClusterData": {
            "properties": {
                "cancelled": {
                    "type": "boolean"
                },
                "completedExceptionally": {
                    "type": "boolean"
                },
                "done": {
                    "type": "boolean"
                },
                "numberOfDependents": {
                    "format": "int32",
                    "type": "integer"
                }
            },
            "type": "object"
        },
        "CompletableFutureVoid": {
            "properties": {
                "cancelled": {
                    "type": "boolean"
                },
                "completedExceptionally": {
                    "type": "boolean"
                },
                "done": {
                    "type": "boolean"
                },
                "numberOfDependents": {
                    "format": "int32",
                    "type": "integer"
                }
            },
            "type": "object"
        },
        "PublicKey": {
            "properties": {
                "algorithm": {
                    "type": "string"
                },
                "encoded": {
                    "items": {
                        "format": "byte",
                        "type": "string"
                    },
                    "type": "array"
                },
                "format": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "SocketAddress": {
            "type": "object"
        }
    },
    "info": {
        "description": "This provides the REST API for Pulsar Transactions operations",
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "title": "Pulsar Transactions REST API",
        "version": "v3"
    },
    "paths": {
        "/transactions/coordinatorInternalStats/{coordinatorId}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getCoordinatorInternalStats",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "in": "path",
                        "name": "coordinatorId",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "default": false,
                        "in": "query",
                        "name": "metadata",
                        "required": false,
                        "type": "boolean"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Transaction coordinator not found"
                    },
                    "405": {
                        "description": "Broker don't use MLTransactionMetadataStore!"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "Get coordinator internal stats.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/coordinatorStats": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getCoordinatorStats",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "format": "int32",
                        "in": "query",
                        "name": "coordinatorId",
                        "required": false,
                        "type": "integer"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Transaction coordinator not found"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "Get transaction coordinator stats.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/coordinators": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_listCoordinators",
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "List transaction coordinators.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/pendingAckInternalStats/{tenant}/{namespace}/{topic}/{subName}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getPendingAckInternalStats",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "topic",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "subName",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "default": false,
                        "in": "query",
                        "name": "metadata",
                        "required": false,
                        "type": "boolean"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "307": {
                        "description": "Topic is not owned by this broker!"
                    },
                    "400": {
                        "description": "Topic is not a persistent topic!"
                    },
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Tenant or cluster or namespace or topic or subscription name doesn't exist"
                    },
                    "405": {
                        "description": "Pending ack handle don't use managedLedger!"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "Get transaction pending ack internal stats.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/pendingAckStats/{tenant}/{namespace}/{topic}/{subName}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getPendingAckStats",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "topic",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "subName",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "default": false,
                        "in": "query",
                        "name": "lowWaterMarks",
                        "required": false,
                        "type": "boolean"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "307": {
                        "description": "Topic is not owned by this broker!"
                    },
                    "400": {
                        "description": "Topic is not a persistent topic!"
                    },
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Tenant or cluster or namespace or topic or subName doesn't exist"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "Get transaction pending ack stats in topic.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/positionStatsInPendingAck/{tenant}/{namespace}/{topic}/{subName}/{ledgerId}/{entryId}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getPositionStatsInPendingAck",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "topic",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "subName",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "format": "int64",
                        "in": "path",
                        "name": "ledgerId",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "format": "int64",
                        "in": "path",
                        "name": "entryId",
                        "required": true,
                        "type": "integer"
                    },
                    {
                        "format": "int32",
                        "in": "query",
                        "name": "batchIndex",
                        "required": false,
                        "type": "integer"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "307": {
                        "description": "Topic is not owned by this broker!"
                    },
                    "400": {
                        "description": "Topic is not a persistent topic!"
                    },
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Tenant or cluster or namespace or topic or subscription name doesn't exist"
                    },
                    "405": {
                        "description": "Pending ack handle don't use managedLedger!"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "Get position stats in pending ack.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/slowTransactions/{timeout}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getSlowTransactions",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "in": "path",
                        "name": "timeout",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "format": "int32",
                        "in": "query",
                        "name": "coordinatorId",
                        "required": false,
                        "type": "integer"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "307": {
                        "description": "Topic don't owner by this broker!"
                    },
                    "400": {
                        "description": "Topic is not a persistent topic!"
                    },
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Tenant or cluster or namespace or topic or coordinator or transaction doesn't exist"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "Get slow transactions.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/transactionBufferInternalStats/{tenant}/{namespace}/{topic}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getTransactionBufferInternalStats",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "topic",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "default": false,
                        "in": "query",
                        "name": "metadata",
                        "required": false,
                        "type": "boolean"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "307": {
                        "description": "Topic is not owned by this broker!"
                    },
                    "400": {
                        "description": "Topic is not a persistent topic!"
                    },
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Tenant or cluster or namespace or topic doesn't exist"
                    },
                    "405": {
                        "description": "Transaction buffer don't use managedLedger!"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not enable transaction"
                    }
                },
                "summary": "Get transaction buffer internal stats.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/transactionBufferStats/{tenant}/{namespace}/{topic}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getTransactionBufferStats",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "topic",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "default": false,
                        "in": "query",
                        "name": "lowWaterMarks",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "default": false,
                        "in": "query",
                        "name": "segmentStats",
                        "required": false,
                        "type": "boolean"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "307": {
                        "description": "Topic is not owned by this broker!"
                    },
                    "400": {
                        "description": "Topic is not a persistent topic!"
                    },
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Tenant or cluster or namespace or topic doesn't exist"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "Get transaction buffer stats in topic.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/transactionCoordinator/replicas": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "operationId": "Transactions_scaleTransactionCoordinators",
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "401": {
                        "description": "This operation requires super-user access"
                    },
                    "406": {
                        "description": "The number of replicas should be more than the current number of transaction coordinator replicas"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/transactionInBufferStats/{tenant}/{namespace}/{topic}/{mostSigBits}/{leastSigBits}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getTransactionInBufferStats",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "topic",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "mostSigBits",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "leastSigBits",
                        "required": true,
                        "type": "string"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "307": {
                        "description": "Topic is not owned by this broker!"
                    },
                    "400": {
                        "description": "Topic is not a persistent topic!"
                    },
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Tenant or cluster or namespace or topic doesn't exist"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "Get transaction state in transaction buffer.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/transactionInPendingAckStats/{tenant}/{namespace}/{topic}/{subName}/{mostSigBits}/{leastSigBits}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getTransactionInPendingAckStats",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "topic",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "mostSigBits",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "leastSigBits",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "subName",
                        "required": true,
                        "type": "string"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "307": {
                        "description": "Topic is not owned by this broker!"
                    },
                    "400": {
                        "description": "Topic is not a persistent topic!"
                    },
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Tenant or cluster or namespace or topic doesn't exist"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "Get transaction state in pending ack.",
                "tags": [
                    "transactions"
                ]
            }
        },
        "/transactions/transactionMetadata/{mostSigBits}/{leastSigBits}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Transactions_getTransactionMetadata",
                "parameters": [
                    {
                        "default": false,
                        "in": "query",
                        "name": "authoritative",
                        "required": false,
                        "type": "boolean"
                    },
                    {
                        "in": "path",
                        "name": "mostSigBits",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "leastSigBits",
                        "required": true,
                        "type": "string"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "307": {
                        "description": "Topic is not owned by this broker!"
                    },
                    "400": {
                        "description": "Topic is not a persistent topic!"
                    },
                    "403": {
                        "description": "Don't have admin permission"
                    },
                    "404": {
                        "description": "Tenant or cluster or namespace or topic or coordinator or transaction doesn't exist"
                    },
                    "409": {
                        "description": "Concurrent modification"
                    },
                    "503": {
                        "description": "This Broker is not configured with transactionCoordinatorEnabled=true."
                    }
                },
                "summary": "Get transaction metadata",
                "tags": [
                    "transactions"
                ]
            }
        }
    },
    "schemes": [
        "http",
        "https"
    ],
    "swagger": "2.0",
    "tags": [
        {
            "name": "transactions"
        }
    ]
}
