OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.3.5

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.3.5
    iconOceanBase Database
    SQL - V 4.3.5
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    UploadPkg

    Last Updated:2026-04-09 08:28:54  Updated
    share
    What is on this page
    Call description
    Limitations
    Request path
    Request type
    Request parameters
    Response parameters
    Examples
    Sample request
    Sample response
    References

    folded

    share

    This API operation is used to upload the RPM package required for an upgrade.

    Call description

    Limitations

    The OceanBase Shell (obshell) server verifies the security of requests to this API operation. For more information, see Hybrid encryption for API operations.

    Request path

    POST /api/v1/upgrade/package

    Request type

    multipart/form-data

    Request parameters

    Parameter
    Type
    Required?
    Example value
    Description
    file file Yes N/A The path to the RPM package required for the upgrade.

    Response parameters

    Parameter
    Type
    Description
    successful Boolean Indicates whether the request is successful.
    timestamp time.Time The timestamp when the server completed the request.
    duration Integer The amount of time taken by the server to process the request, in milliseconds.
    status Integer The HTTP status code.
    traceId String The trace ID of the request.
    data UpgradePkgInfo The details of the upgrade package. For more information, see the data structure of UpgradePkgInfo.
    error ApiError The error caused by the request, which contains the following information:
    • code: the error code.
    • message: the error message.
    • subErrors: the suberrors.

    The following table describes the data structure of UpgradePkgInfo.

    Parameter
    Type
    Description
    pkgId Integer The ID of the RPM package.
    name String The name of the RPM package.
    version String The version of the RPM package.
    releaseDistribution String The release version and build version of the RPM package.
    distribution String The release version of the RPM package.
    release String The build version of the RPM package.
    architecture String The system architecture of the RPM package.
    Size Integer The size of the RPM package, in bytes, after it is decompressed.
    PayloadSize Integer The size of the RPM package, in bytes.
    ChunkCount Integer The number of chunks of the RPM package.
    Md5 String The MD5 hash value of the RPM package.
    UpgradeDepYaml String The file that specifies the upgrade path.
    GmtModify time.Time The time when the RPM package was last modified.

    Examples

    Sample request

     -F "file=@/home/rpmbuild/RPMS/x86_64/oceanbase-ce-4.2.1.1-101000062023110109.el7.x86_64.rpm" 
    /api/v1/upgrade/package
    

    Sample response

    {
      "successful": true,
      "timestamp": "2024-01-09T16:55:58.153159003+08:00",
      "duration": 68288,
      "status": 200,
      "traceId": "42464438789e774e",
      "data": {
        "PkgId": 1,
        "Name": "oceanbase-ce",
        "Version": "4.2.1.1",
        "ReleaseDistribution": "101000062023110109.el7",
        "Distribution": "el7",
        "Release": "101000062023110109",
        "Architecture": "x86_64",
        "Size": 433648329,
        "PayloadSize": 96547244,
        "ChunkCount": 6,
        "Md5": "550d75397013d00ca0a8e529d17020c3",
        "UpgradeDepYaml": "# Describes the upgrade dependencies of different OceanBase Database versions.\n# For more information, see release/ptw5y7\n\n# For each officially released OceanBase Database version, a record with the following attributes is added to the .yaml file:\n#  * version: the source version or a transition version during the upgrade. The value is a version number in the A.B.C format. If the value is in the A.B.C-D format, the build number must be greater than or equal to D.\n#  * can_be_upgraded_to: the target versions that the current version can be *directly* upgraded to. The value is a list of versions that are determined through compatibility tests by the quality assurance (QA) team of OceanBase Database.\n#  * deprecated: The default value is False. The value True indicates that the current version has been deprecated and \n# can serve as the source version or a transition version of the upgrade, but cannot be the target version of the upgrade.\n#  * require_from_binary: The default value is False. The value True indicates that if the current version acts as a transition version of the upgrade, you must run the upgrade script and upgrade the OBServer node to this version.\n#\n\n# The OceanBase Database upgrade module of OceanBase Cloud Platform (OCP) reads this file. Given the source and target versions of the upgrade, the upgrade module automatically\n# determines the shortest upgrade path if the preceding requirements are met. Algorithm:\n# The upgrade module builds a diagram based on the following descriptions. Each version is represented by a node and the value of can_be_upgraded_to is represented by a\n# side. The upgrade module finds the shortest path between the source and target versions. Except the start node, other nodes in an upgrade path\n# must not represent a version that has been deprecated. If two version formats A.B.C and A.B.C-D are matched, the latter is preferred.\n#\n#\n\n- version: 4.0.0.0\n  can_be_upgraded_to:\n      - 4.1.0.0\n\n# 4.1.0.x is barrier\n- version: 4.1.0.0-100000192023032010   # V4.1 BETA cannot be the target version of the upgrade.\n  can_be_upgraded_to:\n    - 4.1.0.0\n  deprecated: True\n\n- version: 4.1.0.0\n  can_be_upgraded_to:\n      - 4.1.0.1\n\n- version: 4.1.0.1\n  can_be_upgraded_to:\n      - 4.1.0.2\n\n- version: 4.1.0.2\n  can_be_upgraded_to:\n      - 4.2.0.0\n  require_from_binary:\n    value: True\n    when_come_from: [4.0.0.0, 4.1.0.0-100000192023032010]\n\n- version: 4.2.0.0-100000152023080109   # V4.2 RC2 cannot be the target version of the upgrade.\n  can_be_upgraded_to:\n    - 4.2.0.0\n  deprecated: True\n\n- version: 4.2.0.0-100010022023081817   # V4.2 RC2 hotfix cannot be the target version of the upgrade.\n  can_be_upgraded_to:\n    - 4.2.0.0\n  deprecated: True\n\n- version: 4.2.0.0\n  can_be_upgraded_to:\n      - 4.2.1.0\n\n# 4.2.1.x is barrier\n- version: 4.2.1.0\n  can_be_upgraded_to:\n      - 4.2.1.1\n\n- version: 4.2.1.1\n  can_be_upgraded_to:\n      - 4.3.0.0\n  require_from_binary:\n    value: True\n    when_come_from: [4.1.0.0, 4.1.0.1, 4.1.0.2, 4.2.0.0]\n",
        "GmtModify": "0001-01-01T00:00:00Z"
      }
    }
    

    References

    In addition to using the CLI, you can use SDKs to call the API operation.

    • For more information about how to call the API operation by using obshell-sdk-python, see Upload an RPM package.

    • For more information about how to call the API operation by using obshell-sdk-go, see Upload an RPM package.

    Previous topic

    QueryLastAgentTask
    Last

    Next topic

    GetPublicKey
    Next
    What is on this page
    Call description
    Limitations
    Request path
    Request type
    Request parameters
    Response parameters
    Examples
    Sample request
    Sample response
    References