IBM Db2 Utilities API
The Utilities API from IBM Db2 — 1 operation(s) for utilities.
The Utilities API from IBM Db2 — 1 operation(s) for utilities.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/ibm-db2:ibm-db2-utilities-api"
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.
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: 3.2.0
info:
title: Ibm Db2 Utilities 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 Utilities 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: Utilities
paths:
/schema_discovery:
post:
operationId: SchemaDiscoveryFromCSV
summary: Analyzes CSV data to return a list of value data types
description: Schema discovery analyzes data in CSV format and returns a list of suggested data types that can be used when creating a table to store the CSV data.
tags:
- Utilities
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SchemaDiscoveryCSVRequest'
description: Data to analyze
required: true
x-codegen-request-body-name: Request body
responses:
'200':
description: Suggested table schema
content:
application/json:
schema:
$ref: '#/components/schemas/SchemaDiscoveryResponse'
default:
description: Error payload
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorContainer'
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/schema_discovery\"\n\n\tpayload := strings.NewReader(\"{\\\"column_separator\\\":\\\"<ADD STRING VALUE>\\\",\\\"includes_header\\\":\\\"<ADD STRING VALUE>\\\",\\\"data\\\":\\\"<ADD STRING VALUE>\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\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\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"column_separator\\\":\\\"<ADD STRING VALUE>\\\",\\\"includes_header\\\":\\\"<ADD STRING VALUE>\\\",\\\"data\\\":\\\"<ADD STRING VALUE>\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://{HOSTNAME}/dbapi/v4/schema_discovery\")\n .post(body)\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/schema_discovery\",\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.write(JSON.stringify({\n column_separator: '<ADD STRING VALUE>',\n includes_header: '<ADD STRING VALUE>',\n data: '<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 = \"{\\\"column_separator\\\":\\\"<ADD STRING VALUE>\\\",\\\"includes_header\\\":\\\"<ADD STRING VALUE>\\\",\\\"data\\\":\\\"<ADD STRING VALUE>\\\"}\"\n\nheaders = {\n 'content-type': \"application/json\",\n 'authorization': \"Bearer {AUTH_TOKEN}\",\n 'x-deployment-id': \"{DEPLOYMENT_ID}\"\n }\n\nconn.request(\"POST\", \"/dbapi/v4/schema_discovery\", 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/schema_discovery \\\n -H 'authorization: Bearer {AUTH_TOKEN}' \\\n -H 'content-type: application/json' \\\n -H 'x-deployment-id: {DEPLOYMENT_ID}' \\\n -d '{\"column_separator\":\"<ADD STRING VALUE>\",\"includes_header\":\"<ADD STRING VALUE>\",\"data\":\"<ADD STRING VALUE>\"}'"
servers:
- url: https://_HOSTNAME_VARIABLE_/dbapi/v4
components:
schemas:
ErrorContainer:
type: object
description: Error response containing one or more error messages
required:
- trace
- errors
properties:
trace:
type: string
description: Unique ID assigned by the server that identifies the request that generated the error
errors:
type: array
description: List of errors
items:
$ref: '#/components/schemas/ErrorModel'
SchemaDiscoveryColumn:
type: object
description: Column description from schema discovery.
required:
- name
- type
- length
- scale
- format
properties:
name:
type: string
description: Column name.
type:
type: string
description: Data type name.
length:
type: integer
format: int64
description: Suggested length for the data type.
scale:
type: string
description: Suggested scale for the data type.
format:
type: string
description: A pattern that describes the values of a column.
SchemaDiscoveryCSVRequest:
type: object
description: Request to run schema discovery on CSV data.
required:
- column_separator
- includes_header
- data
properties:
column_separator:
type: string
description: Single character can be used as column delimiter. The character can also be specified using the format 0xJJ, where JJ is the hexadecimal representation of the character. Valid delimiters can be hexadecimal values from 0x00 to 0x7F, except for binary zero (0x00), line-feed (0x0A), carriage return (0x0D), space (0x20), and decimal point (0x2E).
includes_header:
type: string
description: Accepts values 'yes' and 'no'. The value 'yes' indicates the first row is a header with the column names and should be ignored whe analyzing the data. The value 'no' indicates all rows will be considered for analysis.
data:
type: string
description: 'The CSV data to analyze. It should be in json array string format, such as [''Title, Year, Producer'',''City of God,2002, Katia Lund'',''Rain,1292,Christine Jeffs'',''2001: A Space Odyssey,1969, Stanley Kubrick''].'
ErrorModel:
type: object
description: Error information
required:
- code
- message
properties:
code:
type: string
description: Error code succinctly identifying the problem
enum:
- authentication_failure
- database_error
- forbidden
- internal_server_error
- invalid_authentication_token
- invalid_content_type
- invalid_api_endpoint
- invalid_parameters
- invalid_request_payload
- not_found
- resource_already_exists
- session_expired
- unavailable
message:
type: string
description: Explanation of the problem and possible solutions
target:
$ref: '#/components/schemas/ErrorTargetModel'
more_info:
type: string
description: URL where more information about the error can be found (if available)
ErrorTargetModel:
type: object
description: Field or parameter related to an error
required:
- type
- name
properties:
type:
type: string
description: Field type
enum:
- field
- parameter
- header
name:
type: string
description: Name of the problematic field (with dot-syntax if necessary), query parameter, or header
SchemaDiscoveryResponse:
type: object
description: Result of running schema discovery.
required:
- columns
- dateStyle
- dateDelimiter
- timeStyle
- timeDelimiter
properties:
columns:
type: array
items:
$ref: '#/components/schemas/SchemaDiscoveryColumn'
dateStyle:
type: string
description: External table option.
dateDelimiter:
type: string
description: External table option.
timeStyle:
type: string
description: External table option.
timeDelimiter:
type: string
description: External table option.
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