IBM Db2 Disaster recovery API

The Disaster recovery API from IBM Db2 — 5 operation(s) for disaster recovery.

GitHub OpenAPI

Operations 6

GET /manage/dr List disaster recovery enablement information #
POST /manage/dr Enable disaster recovery #
GET /manage/dr/remotes/status List disaster recovery remotes pair information #
POST /manage/dr/takeover Perform disaster recovery takeover #
POST /manage/dr/resync Resync disaster recovery remote pair #
GET /manage/dr/resync/status Check current disaster recovery resync status #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ibm-db2:ibm-db2-disaster-recovery-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ibm-db2-disaster-recovery-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ibm Db2 Disaster recovery API
  version: '4'
  termsOfService: http://www.ibm.com/software/sla/sladb.nsf
  x-github: https://github.ibm.com/cloud-api-docs/db2-saas
  x-github-issues: https://github.ibm.com/cloud-api-docs/db2-saas/issues/new
  x-last-updated: '2025-06-25'
  x-sdk-supported-languages:
  - java
  - node
  - go
  - python
  x-try-it-out-enabled: true
  description: 'Operations tagged Disaster recovery across 2 of this provider''s published API definitions: ibm-db2-db2-on-cloud-v4-openapi.json, ibm-db2-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://_HOSTNAME_VARIABLE_/dbapi/v4
security:
- authToken: []
- deploymentId: []
tags:
- name: Disaster recovery
paths:
  /manage/dr:
    get:
      tags:
      - Disaster recovery
      summary: List disaster recovery enablement information
      description: List available regions that can be used for disaster recovery.
      operationId: getDREnablementDetails
      responses:
        '200':
          description: List disaster recovery enablement information successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessDREnablementDetailsResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-sdk-operations:
        request-examples:
          go:
          - name: Example request
            example:
            - type: code
              source:
              - "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://{HOSTNAME}/dbapi/v4/manage/dr\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n\treq.Header.Add(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          java:
          - name: Example request
            example:
            - type: code
              source:
              - "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://{HOSTNAME}/dbapi/v4/manage/dr\")\n  .get()\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n  .addHeader(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
          node:
          - name: Example request
            example:
            - type: code
              source:
              - "var http = require(\"https\");\n\nvar options = {\n  \"method\": \"GET\",\n  \"hostname\": \"{HOSTNAME}\",\n  \"port\": null,\n  \"path\": \"/dbapi/v4/manage/dr\",\n  \"headers\": {\n    \"content-type\": \"application/json\",\n    \"authorization\": \"Bearer {AUTH_TOKEN}\",\n    \"x-deployment-id\": \"{DEPLOYMENT_ID}\"\n  }\n};\n\nvar req = http.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"
          python:
          - name: Example request
            example:
            - type: code
              source:
              - "import http.client\n\nconn = http.client.HTTPSConnection(\"{HOSTNAME}\")\n\nheaders = {\n    'content-type': \"application/json\",\n    'authorization': \"Bearer {AUTH_TOKEN}\",\n    'x-deployment-id': \"{DEPLOYMENT_ID}\"\n    }\n\nconn.request(\"GET\", \"/dbapi/v4/manage/dr\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          curl:
          - name: Example request
            example:
            - type: code
              source:
              - "curl -X GET \\\n  https://{HOSTNAME}/dbapi/v4/manage/dr \\\n  -H 'authorization: Bearer {AUTH_TOKEN}' \\\n  -H 'content-type: application/json' \\\n  -H 'x-deployment-id: {DEPLOYMENT_ID}'"
    post:
      tags:
      - Disaster recovery
      summary: Enable disaster recovery
      description: Enable disaster recovery.
      operationId: enableDR
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnableDRRequest'
      x-codegen-request-body-name: body
      responses:
        '200':
          description: Disaster recovery enabled successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessEnableDRResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-sdk-operations:
        request-examples:
          go:
          - name: Example request
            example:
            - type: code
              source:
              - "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://{HOSTNAME}/dbapi/v4/manage/dr\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"<ADD STRING VALUE>\\\",\\\"region\\\":\\\"<ADD STRING VALUE>\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n\treq.Header.Add(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          java:
          - name: Example request
            example:
            - type: code
              source:
              - "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"name\\\":\\\"<ADD STRING VALUE>\\\",\\\"region\\\":\\\"<ADD STRING VALUE>\\\"}\");\nRequest request = new Request.Builder()\n  .url(\"https://{HOSTNAME}/dbapi/v4/manage/dr\")\n  .post(body)\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n  .addHeader(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
          node:
          - name: Example request
            example:
            - type: code
              source:
              - "var http = require(\"https\");\n\nvar options = {\n  \"method\": \"POST\",\n  \"hostname\": \"{HOSTNAME}\",\n  \"port\": null,\n  \"path\": \"/dbapi/v4/manage/dr\",\n  \"headers\": {\n    \"accept\": \"application/json\",\n    \"content-type\": \"application/json\",\n    \"authorization\": \"Bearer {AUTH_TOKEN}\",\n    \"x-deployment-id\": \"{DEPLOYMENT_ID}\"\n  }\n};\n\nvar req = http.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: '<ADD STRING VALUE>', region: '<ADD STRING VALUE>'}));\nreq.end();"
          python:
          - name: Example request
            example:
            - type: code
              source:
              - "import http.client\n\nconn = http.client.HTTPSConnection(\"{HOSTNAME}\")\n\npayload = \"{\\\"name\\\":\\\"<ADD STRING VALUE>\\\",\\\"region\\\":\\\"<ADD STRING VALUE>\\\"}\"\n\nheaders = {\n    'accept': \"application/json\",\n    'content-type': \"application/json\",\n    'authorization': \"Bearer {AUTH_TOKEN}\",\n    'x-deployment-id': \"{DEPLOYMENT_ID}\"\n    }\n\nconn.request(\"POST\", \"/dbapi/v4/manage/dr\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          curl:
          - name: Example request
            example:
            - type: code
              source:
              - "curl -X POST \\\n  https://{HOSTNAME}/dbapi/v4/manage/dr \\\n  -H 'accept: application/json' \\\n  -H 'authorization: Bearer {AUTH_TOKEN}' \\\n  -H 'content-type: application/json' \\\n  -H 'x-deployment-id: {DEPLOYMENT_ID}' \\\n  -d '{\"name\":\"<ADD STRING VALUE>\",\"region\":\"<ADD STRING VALUE>\"}'"
    servers:
    - url: https://_HOSTNAME_VARIABLE_/dbapi/v4
  /manage/dr/remotes/status:
    get:
      tags:
      - Disaster recovery
      summary: List disaster recovery remotes pair information
      operationId: getDRRemotesStatus
      responses:
        '200':
          description: Disaster recovery remotes status was returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessDRRemotesDetailResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-sdk-operations:
        request-examples:
          go:
          - name: Example request
            example:
            - type: code
              source:
              - "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://{HOSTNAME}/dbapi/v4/manage/dr/remotes/status\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n\treq.Header.Add(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          java:
          - name: Example request
            example:
            - type: code
              source:
              - "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://{HOSTNAME}/dbapi/v4/manage/dr/remotes/status\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n  .addHeader(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
          node:
          - name: Example request
            example:
            - type: code
              source:
              - "var http = require(\"https\");\n\nvar options = {\n  \"method\": \"GET\",\n  \"hostname\": \"{HOSTNAME}\",\n  \"port\": null,\n  \"path\": \"/dbapi/v4/manage/dr/remotes/status\",\n  \"headers\": {\n    \"authorization\": \"Bearer {AUTH_TOKEN}\",\n    \"x-deployment-id\": \"{DEPLOYMENT_ID}\"\n  }\n};\n\nvar req = http.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"
          python:
          - name: Example request
            example:
            - type: code
              source:
              - "import http.client\n\nconn = http.client.HTTPSConnection(\"{HOSTNAME}\")\n\nheaders = {\n    'authorization': \"Bearer {AUTH_TOKEN}\",\n    'x-deployment-id': \"{DEPLOYMENT_ID}\"\n    }\n\nconn.request(\"GET\", \"/dbapi/v4/manage/dr/remotes/status\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          curl:
          - name: Example request
            example:
            - type: code
              source:
              - "curl -X GET \\\n  https://{HOSTNAME}/dbapi/v4/manage/dr/remotes/status \\\n  -H 'authorization: Bearer {AUTH_TOKEN}' \\\n  -H 'x-deployment-id: {DEPLOYMENT_ID}'"
    servers:
    - url: https://_HOSTNAME_VARIABLE_/dbapi/v4
  /manage/dr/takeover:
    post:
      tags:
      - Disaster recovery
      summary: Perform disaster recovery takeover
      description: Perform take over on current instance to switch from standby node to primary node. This API requires current instance is standby.
      operationId: takeoverDR
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TakeOverDRRequest'
      x-codegen-request-body-name: body
      responses:
        '200':
          description: Takeover has ran successfully on current instance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessTakeoverDRResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-sdk-operations:
        request-examples:
          go:
          - name: Example request
            example:
            - type: code
              source:
              - "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://{HOSTNAME}/dbapi/v4/manage/dr/takeover\"\n\n\tpayload := strings.NewReader(\"{\\\"force\\\":false}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n\treq.Header.Add(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          java:
          - name: Example request
            example:
            - type: code
              source:
              - "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"force\\\":false}\");\nRequest request = new Request.Builder()\n  .url(\"https://{HOSTNAME}/dbapi/v4/manage/dr/takeover\")\n  .post(body)\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n  .addHeader(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
          node:
          - name: Example request
            example:
            - type: code
              source:
              - "var http = require(\"https\");\n\nvar options = {\n  \"method\": \"POST\",\n  \"hostname\": \"{HOSTNAME}\",\n  \"port\": null,\n  \"path\": \"/dbapi/v4/manage/dr/takeover\",\n  \"headers\": {\n    \"accept\": \"application/json\",\n    \"content-type\": \"application/json\",\n    \"authorization\": \"Bearer {AUTH_TOKEN}\",\n    \"x-deployment-id\": \"{DEPLOYMENT_ID}\"\n  }\n};\n\nvar req = http.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({force: false}));\nreq.end();"
          python:
          - name: Example request
            example:
            - type: code
              source:
              - "import http.client\n\nconn = http.client.HTTPSConnection(\"{HOSTNAME}\")\n\npayload = \"{\\\"force\\\":false}\"\n\nheaders = {\n    'accept': \"application/json\",\n    'content-type': \"application/json\",\n    'authorization': \"Bearer {AUTH_TOKEN}\",\n    'x-deployment-id': \"{DEPLOYMENT_ID}\"\n    }\n\nconn.request(\"POST\", \"/dbapi/v4/manage/dr/takeover\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          curl:
          - name: Example request
            example:
            - type: code
              source:
              - "curl -X POST \\\n  https://{HOSTNAME}/dbapi/v4/manage/dr/takeover \\\n  -H 'accept: application/json' \\\n  -H 'authorization: Bearer {AUTH_TOKEN}' \\\n  -H 'content-type: application/json' \\\n  -H 'x-deployment-id: {DEPLOYMENT_ID}' \\\n  -d '{\"force\":false}'"
    servers:
    - url: https://_HOSTNAME_VARIABLE_/dbapi/v4
  /manage/dr/resync:
    post:
      tags:
      - Disaster recovery
      summary: Resync disaster recovery remote pair
      description: Reconnect a broken or disconnected standby node
      operationId: resyncDR
      responses:
        '200':
          description: Disaster recovery resync request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResyncDRResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-sdk-operations:
        request-examples:
          go:
          - name: Example request
            example:
            - type: code
              source:
              - "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://{HOSTNAME}/dbapi/v4/manage/dr/resync\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n\treq.Header.Add(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          java:
          - name: Example request
            example:
            - type: code
              source:
              - "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://{HOSTNAME}/dbapi/v4/manage/dr/resync\")\n  .post(null)\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n  .addHeader(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
          node:
          - name: Example request
            example:
            - type: code
              source:
              - "var http = require(\"https\");\n\nvar options = {\n  \"method\": \"POST\",\n  \"hostname\": \"{HOSTNAME}\",\n  \"port\": null,\n  \"path\": \"/dbapi/v4/manage/dr/resync\",\n  \"headers\": {\n    \"accept\": \"application/json\",\n    \"content-type\": \"application/json\",\n    \"authorization\": \"Bearer {AUTH_TOKEN}\",\n    \"x-deployment-id\": \"{DEPLOYMENT_ID}\"\n  }\n};\n\nvar req = http.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"
          python:
          - name: Example request
            example:
            - type: code
              source:
              - "import http.client\n\nconn = http.client.HTTPSConnection(\"{HOSTNAME}\")\n\nheaders = {\n    'accept': \"application/json\",\n    'content-type': \"application/json\",\n    'authorization': \"Bearer {AUTH_TOKEN}\",\n    'x-deployment-id': \"{DEPLOYMENT_ID}\"\n    }\n\nconn.request(\"POST\", \"/dbapi/v4/manage/dr/resync\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          curl:
          - name: Example request
            example:
            - type: code
              source:
              - "curl -X POST \\\n  https://{HOSTNAME}/dbapi/v4/manage/dr/resync \\\n  -H 'accept: application/json' \\\n  -H 'authorization: Bearer {AUTH_TOKEN}' \\\n  -H 'content-type: application/json' \\\n  -H 'x-deployment-id: {DEPLOYMENT_ID}'"
    servers:
    - url: https://_HOSTNAME_VARIABLE_/dbapi/v4
  /manage/dr/resync/status:
    get:
      tags:
      - Disaster recovery
      summary: Check current disaster recovery resync status
      description: Check if there is an ongoing resync request
      operationId: resyncStatusDR
      responses:
        '200':
          description: Check disaster recovery resync status successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResyncDRStatusResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-sdk-operations:
        request-examples:
          go:
          - name: Example request
            example:
            - type: code
              source:
              - "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://{HOSTNAME}/dbapi/v4/manage/dr/resync/status\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\treq.Header.Add(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n\treq.Header.Add(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
          java:
          - name: Example request
            example:
            - type: code
              source:
              - "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://{HOSTNAME}/dbapi/v4/manage/dr/resync/status\")\n  .get()\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer {AUTH_TOKEN}\")\n  .addHeader(\"x-deployment-id\", \"{DEPLOYMENT_ID}\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
          node:
          - name: Example request
            example:
            - type: code
              source:
              - "var http = require(\"https\");\n\nvar options = {\n  \"method\": \"GET\",\n  \"hostname\": \"{HOSTNAME}\",\n  \"port\": null,\n  \"path\": \"/dbapi/v4/manage/dr/resync/status\",\n  \"headers\": {\n    \"accept\": \"application/json\",\n    \"content-type\": \"application/json\",\n    \"authorization\": \"Bearer {AUTH_TOKEN}\",\n    \"x-deployment-id\": \"{DEPLOYMENT_ID}\"\n  }\n};\n\nvar req = http.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"
          python:
          - name: Example request
            example:
            - type: code
              source:
              - "import http.client\n\nconn = http.client.HTTPSConnection(\"{HOSTNAME}\")\n\nheaders = {\n    'accept': \"application/json\",\n    'content-type': \"application/json\",\n    'authorization': \"Bearer {AUTH_TOKEN}\",\n    'x-deployment-id': \"{DEPLOYMENT_ID}\"\n    }\n\nconn.request(\"GET\", \"/dbapi/v4/manage/dr/resync/status\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          curl:
          - name: Example request
            example:
            - type: code
              source:
              - "curl -X GET \\\n  https://{HOSTNAME}/dbapi/v4/manage/dr/resync/status \\\n  -H 'accept: application/json' \\\n  -H 'authorization: Bearer {AUTH_TOKEN}' \\\n  -H 'content-type: application/json' \\\n  -H 'x-deployment-id: {DEPLOYMENT_ID}'"
    servers:
    - url: https://_HOSTNAME_VARIABLE_/dbapi/v4
components:
  schemas:
    SuccessTakeoverDRResponse:
      type: object
      required:
      - id
      - deployment_id
      - state
      - created_at
      properties:
        id:
          type: string
        deployment_id:
          type: string
        state:
          type: string
        created_at:
          type: string
    EnableDRRequest:
      type: object
      required:
      - name
      - region
      properties:
        name:
          type: string
          description: The name of disaster recovery node
          x-isnullable: false
        region:
          type: string
          description: The region where this disaster recovery node will be deployed. The complete region list can be retrieved from `/manage/dr`.
          x-isnullable: false
    TakeOverDRRequest:
      type: object
      required:
      - force
      properties:
        force:
          type: boolean
          description: If set to 'true' specifies that the database is not to wait for confirmation that the primary database has been shut down and it will close the connection between primary and standby node.
    ErrorResponse:
      required:
      - message
      - code
      properties:
        message:
          type: string
          description: error message
          example: An error occurred invoking the backend api
        code:
          type: integer
          format: int32
          description: error status code
          example: 500
    SuccessResyncDRStatusResponse:
      type: object
      required:
      - id
      - status
      - created_at
      properties:
        id:
          type: string
          x-isnullable: false
        status:
          type: string
          x-isnullable: false
        created_at:
          type: string
          x-isnullable: false
    SuccessEnableDRResponse:
      type: object
      required:
      - id
      - crn
      - state
      - created_at
      - service_name
      - target_region
      properties:
        id:
          type: string
        crn:
          type: string
        state:
          type: string
        created_at:
          type: string
        service_name:
          type: string
        target_region:
          type: string
    SuccessDREnablementDetailsResponse:
      type: object
      required:
      - regions
      - plan
      properties:
        regions:
          type: object
        plan:
          type: object
    SuccessResyncDRResponse:
      type: object
      required:
      - id
      - status
      - created_at
      properties:
        id:
          type: string
          x-isnullable: false
        status:
          type: string
          x-isnullable: false
        created_at:
          type: string
          x-isnullable: false
    SuccessDRRemotesDetailResponse:
      type: object
      properties:
        current:
          type: object
          properties:
            crn:
              type: string
              x-omitempty: false
            status:
              type: string
              x-omitempty: false
            is_ha:
              type: boolean
              x-omitempty: false
        primary:
          type: object
          properties:
            crn:
              type: string
              x-omitempty: false
            region:
              type: string
              x-omitempty: false
            name:
              type: string
              x-omitempty: false
            status:
              type: string
              x-omitempty: false
            db_version:
              type: string
              x-omitempty: true
        dr:
          type: object
          properties:
            crn:
              type: string
              x-omitempty: false
            region:
              type: string
              x-omitempty: false
            name:
              type: string
              x-omitempty: false
            status:
              type: string
              x-omitempty: false
            db_version:
              type: string
              x-omitempty: true
  securitySchemes:
    authToken:
      type: apiKey
      in: header
      name: Authorization
      description: Authorize using **Bearer [access_token]**. The access token can be obtained by authenticating with the **/auth/tokens** endpoint or [use the API key to generate an IAM Bearer Token](https://cloud.ibm.com/docs/account?topic=account-iamtoken_from_apikey).
    deploymentId:
      type: apiKey
      in: header
      name: X-Deployment-Id
      description: The deployment id of the service, which can be obtained after provision. When providing the deployment id in the header, use URL encoding. For example, ":" should be escaped as "%3A", and "/" should be escaped as "%2F".
x-refined-from:
- ibm-db2-db2-on-cloud-v4-openapi.json
- ibm-db2-openapi.yml