{
    "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"
        },
        "PackageMetadata": {
            "properties": {
                "contact": {
                    "type": "string"
                },
                "createTime": {
                    "format": "int64",
                    "type": "integer"
                },
                "description": {
                    "type": "string"
                },
                "modificationTime": {
                    "format": "int64",
                    "type": "integer"
                },
                "properties": {
                    "additionalProperties": {
                        "type": "string"
                    },
                    "type": "object"
                }
            },
            "type": "object"
        },
        "PublicKey": {
            "properties": {
                "algorithm": {
                    "type": "string"
                },
                "encoded": {
                    "items": {
                        "format": "byte",
                        "type": "string"
                    },
                    "type": "array"
                },
                "format": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "SocketAddress": {
            "type": "object"
        },
        "StreamingOutput": {
            "type": "object"
        }
    },
    "info": {
        "description": "This provides the REST API for Pulsar Packages operations",
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "title": "Pulsar Packages REST API",
        "version": "v3"
    },
    "paths": {
        "/packages/{type}/{tenant}/{namespace}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Packages_listPackages",
                "parameters": [
                    {
                        "in": "path",
                        "name": "type",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "Return all the specified type package names in the specified namespace.",
                        "schema": {
                            "items": {
                                "$ref": "#/definitions/PackageMetadata"
                            },
                            "type": "array"
                        }
                    },
                    "412": {
                        "description": "The package type is illegal."
                    },
                    "500": {
                        "description": "Internal server error."
                    },
                    "503": {
                        "description": "Package Management Service is not enabled in the broker."
                    }
                },
                "summary": "Get all the specified type packages in a namespace.",
                "tags": [
                    "packages"
                ]
            }
        },
        "/packages/{type}/{tenant}/{namespace}/{packageName}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Packages_listPackageVersion",
                "parameters": [
                    {
                        "in": "path",
                        "name": "type",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "packageName",
                        "required": true,
                        "type": "string"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "Return the package versions of the specified package.",
                        "schema": {
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        }
                    },
                    "404": {
                        "description": "The specified package is not existent."
                    },
                    "412": {
                        "description": "The package name is illegal."
                    },
                    "500": {
                        "description": "Internal server error."
                    },
                    "503": {
                        "description": "Package Management Service is not enabled in the broker."
                    }
                },
                "summary": "Get all the versions of a package.",
                "tags": [
                    "packages"
                ]
            }
        },
        "/packages/{type}/{tenant}/{namespace}/{packageName}/{version}": {
            "delete": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Packages_delete",
                "parameters": [
                    {
                        "in": "path",
                        "name": "type",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "packageName",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "version",
                        "required": true,
                        "type": "string"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "204": {
                        "description": "Delete the specified package successfully."
                    },
                    "404": {
                        "description": "The specified package is not existent."
                    },
                    "412": {
                        "description": "The package name is illegal."
                    },
                    "500": {
                        "description": "Internal server error."
                    },
                    "503": {
                        "description": "Package Management Service is not enabled in the broker."
                    }
                },
                "summary": "Delete a package with the package name.",
                "tags": [
                    "packages"
                ]
            },
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Packages_download",
                "parameters": [
                    {
                        "in": "path",
                        "name": "type",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "packageName",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "version",
                        "required": true,
                        "type": "string"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "Download the specified package successfully.",
                        "schema": {
                            "$ref": "#/definitions/StreamingOutput"
                        }
                    },
                    "404": {
                        "description": "The specified package is not existent."
                    },
                    "412": {
                        "description": "The package name is illegal."
                    },
                    "500": {
                        "description": "Internal server error."
                    },
                    "503": {
                        "description": "Package Management Service is not enabled in the broker."
                    }
                },
                "summary": "Download a package with the package name.",
                "tags": [
                    "packages"
                ]
            },
            "post": {
                "consumes": [
                    "multipart/form-data"
                ],
                "description": "",
                "operationId": "Packages_upload",
                "parameters": [
                    {
                        "in": "path",
                        "name": "type",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "packageName",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "version",
                        "required": true,
                        "type": "string"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "204": {
                        "description": "Upload the specified package successfully."
                    },
                    "412": {
                        "description": "The package name is illegal."
                    },
                    "500": {
                        "description": "Internal server error."
                    },
                    "503": {
                        "description": "Package Management Service is not enabled in the broker."
                    }
                },
                "summary": "Upload a package.",
                "tags": [
                    "packages"
                ]
            }
        },
        "/packages/{type}/{tenant}/{namespace}/{packageName}/{version}/metadata": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Packages_getMeta",
                "parameters": [
                    {
                        "in": "path",
                        "name": "type",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "packageName",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "version",
                        "required": true,
                        "type": "string"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "Return the metadata of the specified package.",
                        "schema": {
                            "$ref": "#/definitions/PackageMetadata"
                        }
                    },
                    "404": {
                        "description": "The specified package is not existent."
                    },
                    "412": {
                        "description": "The package name is illegal."
                    },
                    "500": {
                        "description": "Internal server error."
                    },
                    "503": {
                        "description": "Package Management Service is not enabled in the broker."
                    }
                },
                "summary": "Get the metadata of a package.",
                "tags": [
                    "packages"
                ]
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "description": "",
                "operationId": "Packages_updateMeta",
                "parameters": [
                    {
                        "in": "path",
                        "name": "type",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "tenant",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "namespace",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "packageName",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "path",
                        "name": "version",
                        "required": true,
                        "type": "string"
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "204": {
                        "description": "Update the metadata of the specified package successfully."
                    },
                    "404": {
                        "description": "The specified package is not existent."
                    },
                    "412": {
                        "description": "The package name is illegal."
                    },
                    "500": {
                        "description": "Internal server error."
                    },
                    "503": {
                        "description": "Package Management Service is not enabled in the broker."
                    }
                },
                "summary": "Update the metadata of a package.",
                "tags": [
                    "packages"
                ]
            }
        }
    },
    "schemes": [
        "http",
        "https"
    ],
    "swagger": "2.0",
    "tags": [
        {
            "name": "packages"
        }
    ]
}
