Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Database Instance

This contains APIs for performing CRUD operations on Database Instance Entity

Create a database instance

post

Create a database instance

Path parameters
orgstringRequired

Organization identifier

projectstringRequired

Project identifier

dbschemastring · max: 128Required

Identifier of the database schema

Header parameters
Harness-AccountstringOptional

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Body

Database Instance Request

branchstringOptional

branch where the instance is stored

Example: main
commitShastringOptional

Commit SHA to pin the changelog to a specific revision. Mutually exclusive with branch and gitTag. Supports Harness expressions (e.g. <+trigger.commitSha>).

Example: abc123def456
connectorstring · min: 1Required

DB Connector

Example: postgres-connector
contextstringOptional

Liquibase context

gitTagstringOptional

Git tag to pin the changelog to a specific tagged revision. Mutually exclusive with branch and commitSha. Supports Harness expressions (e.g. <+trigger.tag>).

Example: v1.2.0
identifierstringRequired

identifier of the database instance

Pattern: ^[a-zA-Z_][0-9a-zA-Z_$]{0,127}$
namestringOptional

name of the database instance

Responses
201

Response body for Database Instance

application/json

Database Instance Response

branchstringOptional

branch where the instance is stored

commitShastringOptional

commit SHA to pin the changelog to a specific revision

connectorstringRequired

DB Connector

contextstringOptional

Liquibase context

createdinteger · int64Required

epoch seconds when the database instance was created

gitTagstringOptional

Git tag to pin the changelog to a specific tagged revision

identifierstringRequired

identifier of the database instance

lastAppliedTagstringOptional

Most recent tag applied to the database

lastDeployedChangeSetTagstringRequired

Tag on last deployed changeSet

namestringRequired

name of the database instance

schemaIdstringOptional
schemaIdentifierstringOptional
toOnboardbooleanOptional
updatedinteger · int64Optional

epoch seconds when the database instance was last updated

post/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance
POST /v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 246

{
  "branch": "main",
  "commitSha": "abc123def456",
  "connector": "postgres-connector",
  "context": "text",
  "gitTag": "v1.2.0",
  "identifier": "text",
  "name": "text",
  "substituteProperties": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "branch": "text",
  "commitSha": "text",
  "connector": "text",
  "context": "text",
  "created": 1,
  "gitTag": "text",
  "identifier": "text",
  "lastAppliedTag": "text",
  "lastDeployedChangeSetTag": "text",
  "name": "text",
  "schemaId": "text",
  "schemaIdentifier": "text",
  "substituteProperties": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "toOnboard": true,
  "updated": 1
}

Get a database instance

get

Retrieves the specified database instance

Path parameters
orgstringRequired

Organization identifier

projectstringRequired

Project identifier

dbschemastring · max: 128Required

Identifier of the database schema

dbinstancestringRequired

database instance unique id

Header parameters
Harness-AccountstringOptional

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Response body for Database Instance

application/json

Database Instance Response

branchstringOptional

branch where the instance is stored

commitShastringOptional

commit SHA to pin the changelog to a specific revision

connectorstringRequired

DB Connector

contextstringOptional

Liquibase context

createdinteger · int64Required

epoch seconds when the database instance was created

gitTagstringOptional

Git tag to pin the changelog to a specific tagged revision

identifierstringRequired

identifier of the database instance

lastAppliedTagstringOptional

Most recent tag applied to the database

lastDeployedChangeSetTagstringRequired

Tag on last deployed changeSet

namestringRequired

name of the database instance

schemaIdstringOptional
schemaIdentifierstringOptional
toOnboardbooleanOptional
updatedinteger · int64Optional

epoch seconds when the database instance was last updated

get/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance/{dbinstance}
GET /v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance/{dbinstance} HTTP/1.1
Accept: */*
{
  "branch": "text",
  "commitSha": "text",
  "connector": "text",
  "context": "text",
  "created": 1,
  "gitTag": "text",
  "identifier": "text",
  "lastAppliedTag": "text",
  "lastDeployedChangeSetTag": "text",
  "name": "text",
  "schemaId": "text",
  "schemaIdentifier": "text",
  "substituteProperties": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "toOnboard": true,
  "updated": 1
}

Delete a database instance

delete

Delete a database instance

Path parameters
orgstringRequired

Organization identifier

projectstringRequired

Project identifier

dbschemastring · max: 128Required

Identifier of the database schema

dbinstancestringRequired

database instance unique id

Header parameters
Harness-AccountstringOptional

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
204

The database instance was deleted successfully

No content

delete/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance/{dbinstance}
DELETE /v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance/{dbinstance} HTTP/1.1
Accept: */*

No content

Resolve the value of a tag (by key) on an instance

get

Resolves a single tag on the instance by key. Returns whether the tag is present and its raw stored value (empty string for a bare, valueless key).

Path parameters
orgstringRequired

Organization identifier

projectstringRequired

Project identifier

dbschemastring · max: 128Required

Identifier of the database schema

dbinstancestringRequired

database instance unique id

Query parameters
keystringRequired

Tag key to resolve.

Header parameters
Harness-AccountstringOptional

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Resolved tag presence and raw value for an instance

application/json

Resolved presence and raw value of a tag on an instance

presentbooleanRequired

Whether a tag with the requested key exists on the instance

valuestringRequired

Raw stored value of the tag; empty string for a bare, valueless key

get/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance/{dbinstance}/tag-value
GET /v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance/{dbinstance}/tag-value?key=text HTTP/1.1
Accept: */*
{
  "present": true,
  "value": "text"
}

List database instances

post

Retrieves the specified database instances of the database schema

Path parameters
orgstringRequired

Organization identifier

projectstringRequired

Project identifier

dbschemastring · max: 128Required

Identifier of the database schema

Query parameters
pageinteger · int64Optional

Pagination page number strategy: Specify the page number within the paginated collection related to the number of items on each page.

Default: 0
limitinteger · max: 1000Optional

Pagination: Number of items to return. Allows a larger page size than the standard limit for bulk instance listing.

Default: 10
search_termstringOptional

This would be used to filter resources having attributes matching the search term.

sortstring · enumOptional

Parameter on the basis of which sorting is done.

Default: createdPossible values:
orderstring · enumOptional

Order on the basis of which sorting is done.

Default: DESCPossible values:
Header parameters
Harness-AccountstringOptional

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Body

DB Instance Filter Request

filterTypestring · enumOptional

filter criteria type. Example: Equals, NotEquals

Default: EqualsPossible values:
Responses
200

Response body for List Database Schema

application/json
post/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instancelist
POST /v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instancelist HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "filterType": "Equals",
  "instanceTags": [
    {
      "key": "text",
      "value": "text"
    }
  ]
}
[
  {
    "branch": "text",
    "commitSha": "text",
    "connector": "text",
    "context": "text",
    "created": 1,
    "gitTag": "text",
    "identifier": "text",
    "lastAppliedTag": "text",
    "lastDeployedChangeSetTag": "text",
    "name": "text",
    "schemaId": "text",
    "schemaIdentifier": "text",
    "substituteProperties": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "tags": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "toOnboard": true,
    "updated": 1
  }
]

Last updated

Was this helpful?