Database DevOps
Manage database schemas, database instances, and migration state with the Harness Database DevOps API.
The Database DevOps API manages the database schemas and database instances in Harness Database DevOps, and reports which changes have been applied where.
Request basics
API key token: Send it in the
x-api-keyheader on every request. Go to Manage API keys to create a key and token.Organization and project IDs: Most endpoints take them as the
organdprojectpath parameters. Go to Organizations and projects to find these identifiers.Account ID: Send it in the
Harness-Accountheader only when you authenticate with something other than anx-api-keytoken.Base URL: Send requests to
https://app.harness.io/gateway/dbops, followed by the endpoint path.
Example request
List the database schemas in a project:
curl "https://app.harness.io/gateway/dbops/v1/orgs/ORG_ID/projects/PROJECT_ID/dbschema" \
-H "x-api-key: $HARNESS_API_KEY"Replace ORG_ID and PROJECT_ID with your own values, and set HARNESS_API_KEY to your API key token.
Find an endpoint
Endpoint paths are relative to the base URL.
Database schemas: The changelog repository and path that define a schema's changes. List schemas with
GET /v1/orgs/{org}/projects/{project}/dbschemaand create one withPOST /v1/orgs/{org}/projects/{project}/dbschema. Go to Changelogs & Schema changes to set up changelogs.Database instances: A specific database that a schema is deployed to, reached through a connector. List instances with
POST /v1/orgs/{org}/projects/{project}/dbinstancelist. Go to Set Up JDBC Connectors to connect a database.Migration and deployed state: Which changesets have been applied to each instance. Read what has been applied to an instance with
GET /v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/dbinstance/{dbinstance}/migrationstate. Go to Access Applied ChangeSets in Database DevOps Pipelines to read applied changesets.Pipeline steps: Settings for the Database DevOps steps that apply and roll back changes in a pipeline. List the commands the steps support with
GET /v1/dbops/command-parameters/supported-commands. Go to Deployment Pipeline Configuration to configure a deployment pipeline.
Last updated
Was this helpful?