Notification-settings
Admin
Projects
Users
Required-builds
Build-status
Comments
Issues
UpstreamServers
Account
AnalyticsSettings
Authenticate
MirrorServers
Repos
Requests
Keys
Settings
Ssh
Application-properties
Build
Dashboard
Deployment
Groups
Hook-scripts
Hooks
Inbox
Labels
Logs
Markup
Migration
Profile
Tasks

Rate this page:

About

The Bitbucket Data Center and Server REST API enables you to interact with Bitbucket programmatically. This page documents the REST resources available in Bitbucket, including the HTTP response codes and example requests and responses.

General information about using the REST APIs can be found at Using the REST API and Authenticating with the REST API.

Rolling Upgrades REST API

Provides Rolling Upgrade capabilities.

Table of Contents

Servers

URLDescription
/rest/zduThe ZDU REST resource for the server

Paths

GET /state

Gets the Cluster State

Gets the State of the Cluster and the responding Node's information.

Responses

▶ 200 - Returns full JSON representation of cluster state
Headers

No headers specified

application/json
NameTypeDescriptionAccepted values
state string The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
buildInfo object Represents a Cluster Node and its current state.Any
buildInfo.id string The id of the Node in cluster.Any
buildInfo.name string The name of the Node.Any
buildInfo.ipAddress string The IP address of the Node.Any
buildInfo.state string The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
buildInfo.tasksTotal integer The total number of active tasks on the Node.Any
buildInfo.activeUserCount integer The total number of active users on the Node.Any
buildInfo.buildNumber string The build number (DB schema version) of the Node's installed Product.Any
buildInfo.version string The version of the Node's installed Product.Any
buildInfo.local boolean True if this is the local node for the current session; otherwise false for remote nodes.Any
buildInfo.portNumber integer Any
buildInfo.links array(object) Hypermedia linksAny
buildInfo.links.rel string relAny
buildInfo.links.href string uriAny
Example (generated)
1
2
{
  "state": "STABLE",
  "buildInfo": {
    "id": "string",
    "name": "string",
    "ipAddress": "string",
    "state": "STARTING",
    "tasksTotal": 0,
    "activeUserCount": 0,
    "buildNumber": "string",
    "version": "string",
    "local": true,
    "portNumber": 0,
    "links": [
      {
        "rel": "string",
        "href": "http://example.com"
      }
    ]
  }
}
▶ 401 - Returned if user is not authenticated
Headers

No headers specified

▶ 403 - Returned if the calling user does not have permission to view the content
Headers

No headers specified

Tags

GET /nodes/{nodeId}

Gets the Node's overview

Gets the requested Node's information.

Path parameters

▷ nodeId
NameTypeInDescriptionAccepted values
nodeId (required) string pathAny

Responses

▶ 200 - Returns full JSON representation of the cluster node
Headers

No headers specified

application/json
NameTypeDescriptionAccepted values
id string The id of the Node in cluster.Any
name string The name of the Node.Any
ipAddress string The IP address of the Node.Any
state string The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
tasksTotal integer The total number of active tasks on the Node.Any
activeUserCount integer The total number of active users on the Node.Any
buildNumber string The build number (DB schema version) of the Node's installed Product.Any
version string The version of the Node's installed Product.Any
local boolean True if this is the local node for the current session; otherwise false for remote nodes.Any
portNumber integer Any
links array(object) Hypermedia linksAny
links.rel string relAny
links.href string uriAny
Example (generated)
1
2
{
  "id": "string",
  "name": "string",
  "ipAddress": "string",
  "state": "STARTING",
  "tasksTotal": 0,
  "activeUserCount": 0,
  "buildNumber": "string",
  "version": "string",
  "local": true,
  "portNumber": 0,
  "links": [
    {
      "rel": "string",
      "href": "http://example.com"
    }
  ]
}
▶ 401 - Returned if user is not authenticated
Headers

No headers specified

▶ 403 - Returned if the calling user does not have permission to view the content
Headers

No headers specified

▶ 404 - Returned if there is no content with the given id
Headers

No headers specified

Tags

GET /cluster

Gets the Cluster overview

Gets an overview of a Cluster including its current state and composition of Nodes.

Responses