IBM Db2 Copy API

### Authorization The token must be [IAM-issued](https://cloud.ibm.com/docs/account?topic=account-manapikey). You can [use the API key to generate an IAM Bearer Token](https://cloud.ibm.com/docs/account?topic=account-iamtoken_from_apikey). To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to [Users](https://cloud.ibm.com/iam/users) > name > Access policies.

GitHub OpenAPI

Operations 1

POST /manage/copy_db Copy database to a new provision database #

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-copy-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-copy-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ibm Db2 Copy 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 Copy 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: Copy
  description: '### Authorization


    The token must be IAM-issued.

    You can use the API key to generate an IAM Bearer Token.

    To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > name > Access policies.'
paths:
  /manage/copy_db:
    post:
      description: Provision new database by copy from current database
      tags:
      - Copy
      summary: Copy database to a new provision database
      operationId: copyDatabase
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CopyDatabaseRequest'
      x-codegen-request-body-name: body
      responses:
        '201':
          description: Copy db successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessCopyDBResponse'
        '400':
          description: Bad request
        '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/copy_db\"\n\n\tpayload := strings.NewReader(\"{\\\"name\\\":\\\"clone-instance-namw\\\",\\\"target\\\":\\\"us-south\\\",\\\"resource_plan_id\\\":\\\"dashDBStandard\\\",\\\"high_availability\\\":true,\\\"resource_group\\\":\\\"ea345q3-ddfe34q-sdfdaasd\\\",\\\"backup_id\\\":\\\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\\\",\\\"key_protect_key\\\":\\\"default\\\",\\\"members_disk_allocation_mb\\\":\\\"20480\\\",\\\"tags\\\":[\\\"<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\\\":\\\"clone-instance-namw\\\",\\\"target\\\":\\\"us-south\\\",\\\"resource_plan_id\\\":\\\"dashDBStandard\\\",\\\"high_availability\\\":true,\\\"resource_group\\\":\\\"ea345q3-ddfe34q-sdfdaasd\\\",\\\"backup_id\\\":\\\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\\\",\\\"key_protect_key\\\":\\\"default\\\",\\\"members_disk_allocation_mb\\\":\\\"20480\\\",\\\"tags\\\":[\\\"<ADD STRING VALUE>\\\"]}\");\nRequest request = new Request.Builder()\n  .url(\"https://{HOSTNAME}/dbapi/v4/manage/copy_db\")\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/copy_db\",\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  name: 'clone-instance-namw',\n  target: 'us-south',\n  resource_plan_id: 'dashDBStandard',\n  high_availability: true,\n  resource_group: 'ea345q3-ddfe34q-sdfdaasd',\n  backup_id: 'crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712',\n  key_protect_key: 'default',\n  members_disk_allocation_mb: '20480',\n  tags: ['<ADD STRING VALUE>']\n}));\nreq.end();"
          python:
          - name: Example request
            example:
            - type: code
              source:
              - "import http.client\n\nconn = http.client.HTTPSConnection(\"{HOSTNAME}\")\n\npayload = \"{\\\"name\\\":\\\"clone-instance-namw\\\",\\\"target\\\":\\\"us-south\\\",\\\"resource_plan_id\\\":\\\"dashDBStandard\\\",\\\"high_availability\\\":true,\\\"resource_group\\\":\\\"ea345q3-ddfe34q-sdfdaasd\\\",\\\"backup_id\\\":\\\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\\\",\\\"key_protect_key\\\":\\\"default\\\",\\\"members_disk_allocation_mb\\\":\\\"20480\\\",\\\"tags\\\":[\\\"<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/copy_db\", 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/copy_db \\\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\":\"clone-instance-namw\",\"target\":\"us-south\",\"resource_plan_id\":\"dashDBStandard\",\"high_availability\":true,\"resource_group\":\"ea345q3-ddfe34q-sdfdaasd\",\"backup_id\":\"crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712\",\"key_protect_key\":\"default\",\"members_disk_allocation_mb\":\"20480\",\"tags\":[\"<ADD STRING VALUE>\"]}'"
    servers:
    - url: https://_HOSTNAME_VARIABLE_/dbapi/v4
components:
  schemas:
    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
    SuccessCopyDBResponse:
      type: object
      required:
      - id
      - crn
      - state
      - created_at
      - service_name
      - target_region
      properties:
        id:
          type: string
          description: task ID of the copy request
          example: crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:task:3562g234fgsdggd
        crn:
          type: string
          description: CRN of the new cloned system
          example: 'crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01::'
        state:
          type: string
          description: status of the copy request
          example: running
        created_at:
          type: string
          description: creation time of the copy request
          example: '2020-03-26T02:45:35.000Z'
        service_name:
          type: string
          description: name of the new cloned instance
          example: running
        target_region:
          type: string
          description: region of the new cloned instance
          example: us-south
    CopyDatabaseRequest:
      type: object
      required:
      - name
      - target
      - resource_plan_id
      - resource_group
      - key_protect_key
      - high_availability
      properties:
        name:
          type: string
          x-isnullable: false
          description: name of the new cloned system
          example: clone-instance-namw
        target:
          type: string
          x-isnullable: false
          description: region of the new cloned system
          example: us-south
        resource_plan_id:
          type: string
          x-isnullable: false
          description: resource plan id
          example: dashDBStandard
        high_availability:
          type: boolean
          x-isnullable: true
          description: whether it's HA
          example: true
        resource_group:
          type: string
          x-isnullable: false
          description: resource group
          example: ea345q3-ddfe34q-sdfdaasd
        backup_id:
          type: string
          x-isnullable: false
          description: backup id
          example: crn:v1:ibm:local:database:us-south:a/c5555555580015ebfde430a819fa4bb3:console-dev01:backup:ac9555b1-df50-4ecb-88ef-34b650eff712
        key_protect_key:
          type: string
          x-isnullable: false
          description: key protect key
          example: default
        members_disk_allocation_mb:
          type: integer
          x-isnullable: true
          description: storage allocated to the new cloned system
          example: '20480'
        tags:
          type: array
          description: tags for the new cloned system
          example:
          - tag
          items:
            type: string
  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