IBM Db2 Backup and Restore API

The Backup and Restore API from IBM Db2 — 4 operation(s) for backup and restore.

GitHub OpenAPI

Operations 5

GET /backups Get a list of backups #
POST /backups/restore Restore #
POST /backups/backup Create a backup #
GET /backups/setting Get backup setting #
POST /backups/setting Update backup setting #

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-backup-and-restore-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-backup-and-restore-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ibm Db2 Backup and Restore 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 Backup and Restore 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: Backup And Restore
paths:
  /backups:
    get:
      tags:
      - Backup And Restore
      summary: Get a list of backups
      description: Get a list of backups from current instance.
      operationId: getBackups
      responses:
        '200':
          description: The list of backups
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessBackupsListResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server 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/backups\"\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/backups\")\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/backups\",\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/backups\", 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/backups \\\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
  /backups/restore:
    post:
      tags:
      - Backup And Restore
      summary: Restore
      description: Restore to a particular backup or perform a point-in-time restore.
      operationId: Restore
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ts:
                  type: string
                  description: Timestamp, used when doing point-in-time restore
                  example: ''
                backup_id:
                  type: string
                  description: backup ID, used when restoring to a particular backup
                  example: crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712
        required: true
      x-codegen-request-body-name: body
      responses:
        '200':
          description: Task detail of the restore job
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessBackupRestoreResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Unauthorized
          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/backups/restore\"\n\n\tpayload := strings.NewReader(\"{\\\"ts\\\":\\\"<ADD STRING VALUE>\\\",\\\"backup_id\\\":\\\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\\\"}\")\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, \"{\\\"ts\\\":\\\"<ADD STRING VALUE>\\\",\\\"backup_id\\\":\\\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\\\"}\");\nRequest request = new Request.Builder()\n  .url(\"https://{HOSTNAME}/dbapi/v4/backups/restore\")\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/backups/restore\",\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({\n  ts: '<ADD STRING VALUE>',\n  backup_id: 'crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712'\n}));\nreq.end();"
          python:
          - name: Example request
            example:
            - type: code
              source:
              - "import http.client\n\nconn = http.client.HTTPSConnection(\"{HOSTNAME}\")\n\npayload = \"{\\\"ts\\\":\\\"<ADD STRING VALUE>\\\",\\\"backup_id\\\":\\\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\\\"}\"\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/backups/restore\", 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/backups/restore \\\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 '{\"ts\":\"<ADD STRING VALUE>\",\"backup_id\":\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\"}'"
    servers:
    - url: https://_HOSTNAME_VARIABLE_/dbapi/v4
  /backups/backup:
    post:
      tags:
      - Backup And Restore
      summary: Create a backup
      operationId: createBackup
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessBackupResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Unexpected 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/backups/backup\"\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/backups/backup\")\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/backups/backup\",\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/backups/backup\", 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/backups/backup \\\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
  /backups/setting:
    get:
      tags:
      - Backup And Restore
      summary: Get backup setting
      description: Get backup setting for scheduled time and retention policy
      operationId: getBackupSetting
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessBackupSettingResponse'
        '500':
          description: Unexpected 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/backups/setting\"\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/backups/setting\")\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/backups/setting\",\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/backups/setting\", 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/backups/setting \\\n  -H 'accept: application/json' \\\n  -H 'authorization: Bearer {AUTH_TOKEN}' \\\n  -H 'content-type: application/json' \\\n  -H 'x-deployment-id: {DEPLOYMENT_ID}'"
    post:
      tags:
      - Backup And Restore
      summary: Update backup setting
      description: update backup setting for scheduled backup time
      operationId: updateBackupSetting
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                backup_time:
                  type: string
                  example: 08:05
      x-codegen-request-body-name: body
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessBackupSettingResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Unexpected 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/backups/setting\"\n\n\tpayload := strings.NewReader(\"{\\\"backup_time\\\":\\\"08:05\\\"}\")\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, \"{\\\"backup_time\\\":\\\"08:05\\\"}\");\nRequest request = new Request.Builder()\n  .url(\"https://{HOSTNAME}/dbapi/v4/backups/setting\")\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/backups/setting\",\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({backup_time: '08:05'}));\nreq.end();"
          python:
          - name: Example request
            example:
            - type: code
              source:
              - "import http.client\n\nconn = http.client.HTTPSConnection(\"{HOSTNAME}\")\n\npayload = \"{\\\"backup_time\\\":\\\"08:05\\\"}\"\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/backups/setting\", 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/backups/setting \\\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 '{\"backup_time\":\"08:05\"}'"
    servers:
    - url: https://_HOSTNAME_VARIABLE_/dbapi/v4
components:
  schemas:
    SuccessBackupSettingResponse:
      required:
      - setting
      properties:
        setting:
          type: object
          properties:
            backup_time:
              type: string
              example: '10:05'
            retention:
              type: integer
              example: 14
    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
    SuccessBackupResponse:
      required:
      - task
      properties:
        task:
          type: object
          properties:
            id:
              type: string
              example: crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712
            deployment_id:
              type: string
              example: 'crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01::'
            description:
              type: string
              example: scheduled
            status:
              type: string
              example: completed
            created_at:
              type: string
              example: '2020-03-26T02:45:35.000Z'
            progress_percent:
              type: integer
              example: 15
    SuccessBackupsListResponse:
      required:
      - backups
      properties:
        backups:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712
              deployment_id:
                type: string
                example: 'crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01::'
              type:
                type: string
                example: scheduled
              status:
                type: string
                example: completed
              created_at:
                type: string
                example: '2020-03-26T02:45:35.000Z'
              size:
                type: integer
                example: 13958643712
              tables:
                type: integer
                example: 40
              duration:
                type: integer
                example: 30
    SuccessBackupRestoreResponse:
      required:
      - task
      properties:
        task:
          type: object
          properties:
            id:
              type: string
              example: crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712
            deployment_id:
              type: string
              example: 'crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01::'
            description:
              type: string
              example: scheduled
            status:
              type: string
              example: completed
            created_at:
              type: string
              example: '2020-03-26T02:45:35.000Z'
            progress_percent:
              type: integer
              example: 15
  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