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

Database Schema

This contains APIs for performing CRUD operations on Database Schema Entity

List database schemas

get

List database Schemas

Path parameters
orgstringRequired

Organization identifier

projectstringRequired

Project identifier

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: 100Optional

Pagination: Number of items to return.

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:
migrationTypestring · enumOptional

DB Migration tool type

Possible 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.

Responses
200

Response body for List Database Schema

application/json
get/v1/orgs/{org}/projects/{project}/dbschema
GET /v1/orgs/{org}/projects/{project}/dbschema HTTP/1.1
Accept: */*
[
  {
    "changeLogScript": {
      "command": "curl -X -o changeLog.yaml https://www.filestore.com/changeLog.yaml",
      "image": "plugins/image:latest",
      "location": "folder/changelog.yaml",
      "shell": "Sh, Bash, <+pipeline.variables.shell>",
      "toml": "text"
    },
    "changelog": {
      "archivePath": "text",
      "connector": "harness_git",
      "includeAllPath": "text",
      "location": "folder/changelog.yaml",
      "repo": "folder/changelog.yaml",
      "toml": "text"
    },
    "cloneResources": {
      "limits": {
        "cpu": "400m",
        "memory": "500Mi"
      }
    },
    "created": 1,
    "identifier": "text",
    "instanceCount": 1,
    "migrationType": "Liquibase",
    "name": "text",
    "parentId": "text",
    "primaryDbInstanceId": "text",
    "schemaSourceType": "Git",
    "service": "text",
    "tags": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "type": "Repository",
    "updated": 1,
    "usePercona": false
  }
]

Create a database schema

post

Create a database schema

Path parameters
orgstringRequired

Organization identifier

projectstringRequired

Project identifier

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 Schema Request

identifierstringRequired

identifier of the database schema

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

DB Migration tool type

Default: LiquibasePossible values:
namestringRequired

name of the database schema

servicestring · min: 1Optional

harness service corresponding to database schema

Example: harness_service
typestring · enumOptional

db schema type

Possible values:
usePerconabooleanOptional

if percona-toolkit to be enabled

Default: false
Responses
201

Response body for Database Schema

application/json

Database Schema Response

createdinteger · int64Required

epoch seconds when the database schema was created

identifierstringRequired

identifier of the database schema

instanceCountinteger · int64Required

number of database instances corresponding to database schema

migrationTypestring · enumRequired

DB Migration tool type

Default: LiquibasePossible values:
namestringRequired

name of the database schema

parentIdstringRequired

parentUniqueId for scope schema belongs to

primaryDbInstanceIdstringOptional

Identifier for the primary dbInstance used for advanced feature like LLM Authoring etc.

schemaSourceTypestring · enumRead-onlyOptionalPossible values:
servicestringOptional

harness service corresponding to database schema

typestring · enumRequired

db schema type

Possible values:
updatedinteger · int64Optional

epoch seconds when the database schema was last updated

usePerconabooleanRequired

if percona-toolkit is enabled

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

{
  "changeLogScript": {
    "command": "curl -X -o changeLog.yaml https://www.filestore.com/changeLog.yaml",
    "image": "plugins/image:latest",
    "location": "folder/changelog.yaml",
    "shell": "Sh, Bash, <+pipeline.variables.shell>",
    "toml": "text"
  },
  "changelog": {
    "archivePath": "text",
    "connector": "harness_git",
    "includeAllPath": "text",
    "location": "folder/changelog.yaml",
    "repo": "folder/changelog.yaml",
    "toml": "text"
  },
  "cloneResources": {
    "limits": {
      "cpu": "400m",
      "memory": "500Mi"
    }
  },
  "identifier": "text",
  "migrationType": "Liquibase",
  "name": "text",
  "service": "harness_service",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "type": "Repository",
  "usePercona": false
}
{
  "changeLogScript": {
    "command": "curl -X -o changeLog.yaml https://www.filestore.com/changeLog.yaml",
    "image": "plugins/image:latest",
    "location": "folder/changelog.yaml",
    "shell": "Sh, Bash, <+pipeline.variables.shell>",
    "toml": "text"
  },
  "changelog": {
    "archivePath": "text",
    "connector": "harness_git",
    "includeAllPath": "text",
    "location": "folder/changelog.yaml",
    "repo": "folder/changelog.yaml",
    "toml": "text"
  },
  "cloneResources": {
    "limits": {
      "cpu": "400m",
      "memory": "500Mi"
    }
  },
  "created": 1,
  "identifier": "text",
  "instanceCount": 1,
  "migrationType": "Liquibase",
  "name": "text",
  "parentId": "text",
  "primaryDbInstanceId": "text",
  "schemaSourceType": "Git",
  "service": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "type": "Repository",
  "updated": 1,
  "usePercona": false
}

Get a database schema

get

Retrieves the specified database schema

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.

Responses
200

Response body for Database Schema

application/json

Database Schema Response

createdinteger · int64Required

epoch seconds when the database schema was created

identifierstringRequired

identifier of the database schema

instanceCountinteger · int64Required

number of database instances corresponding to database schema

migrationTypestring · enumRequired

DB Migration tool type

Default: LiquibasePossible values:
namestringRequired

name of the database schema

parentIdstringRequired

parentUniqueId for scope schema belongs to

primaryDbInstanceIdstringOptional

Identifier for the primary dbInstance used for advanced feature like LLM Authoring etc.

schemaSourceTypestring · enumRead-onlyOptionalPossible values:
servicestringOptional

harness service corresponding to database schema

typestring · enumRequired

db schema type

Possible values:
updatedinteger · int64Optional

epoch seconds when the database schema was last updated

usePerconabooleanRequired

if percona-toolkit is enabled

Default: false
get/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}
GET /v1/orgs/{org}/projects/{project}/dbschema/{dbschema} HTTP/1.1
Accept: */*
{
  "changeLogScript": {
    "command": "curl -X -o changeLog.yaml https://www.filestore.com/changeLog.yaml",
    "image": "plugins/image:latest",
    "location": "folder/changelog.yaml",
    "shell": "Sh, Bash, <+pipeline.variables.shell>",
    "toml": "text"
  },
  "changelog": {
    "archivePath": "text",
    "connector": "harness_git",
    "includeAllPath": "text",
    "location": "folder/changelog.yaml",
    "repo": "folder/changelog.yaml",
    "toml": "text"
  },
  "cloneResources": {
    "limits": {
      "cpu": "400m",
      "memory": "500Mi"
    }
  },
  "created": 1,
  "identifier": "text",
  "instanceCount": 1,
  "migrationType": "Liquibase",
  "name": "text",
  "parentId": "text",
  "primaryDbInstanceId": "text",
  "schemaSourceType": "Git",
  "service": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "type": "Repository",
  "updated": 1,
  "usePercona": false
}

Update a database schema

put

Update a database schema

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
namestring · max: 128Optional

name of the database schema

primaryDbInstanceIdstringOptional

This is the primary db instance identifier for advanced feature like LLM Authoring etc.

servicestringOptional

harness service corresponding to database schema

Example: harness_service
typestring · enumOptional

db schema type

Possible values:
usePerconabooleanOptional

if percona-tookit is enabled

Responses
200

Response body for Database Schema

application/json

Database Schema Response

createdinteger · int64Required

epoch seconds when the database schema was created

identifierstringRequired

identifier of the database schema

instanceCountinteger · int64Required

number of database instances corresponding to database schema

migrationTypestring · enumRequired

DB Migration tool type

Default: LiquibasePossible values:
namestringRequired

name of the database schema

parentIdstringRequired

parentUniqueId for scope schema belongs to

primaryDbInstanceIdstringOptional

Identifier for the primary dbInstance used for advanced feature like LLM Authoring etc.

schemaSourceTypestring · enumRead-onlyOptionalPossible values:
servicestringOptional

harness service corresponding to database schema

typestring · enumRequired

db schema type

Possible values:
updatedinteger · int64Optional

epoch seconds when the database schema was last updated

usePerconabooleanRequired

if percona-toolkit is enabled

Default: false
put/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}
PUT /v1/orgs/{org}/projects/{project}/dbschema/{dbschema} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 587

{
  "changeLogScript": {
    "command": "curl -X -o changeLog.yaml https://www.filestore.com/changeLog.yaml",
    "image": "plugins/image:latest",
    "location": "folder/changelog.yaml",
    "shell": "Sh, Bash, <+pipeline.variables.shell>",
    "toml": "text"
  },
  "changelog": {
    "archivePath": "text",
    "connector": "harness_git",
    "includeAllPath": "text",
    "location": "folder/changelog.yaml",
    "repo": "text",
    "toml": "text"
  },
  "cloneResources": {
    "limits": {
      "cpu": "400m",
      "memory": "500Mi"
    }
  },
  "name": "text",
  "primaryDbInstanceId": "text",
  "service": "harness_service",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "type": "Repository",
  "usePercona": true
}
{
  "changeLogScript": {
    "command": "curl -X -o changeLog.yaml https://www.filestore.com/changeLog.yaml",
    "image": "plugins/image:latest",
    "location": "folder/changelog.yaml",
    "shell": "Sh, Bash, <+pipeline.variables.shell>",
    "toml": "text"
  },
  "changelog": {
    "archivePath": "text",
    "connector": "harness_git",
    "includeAllPath": "text",
    "location": "folder/changelog.yaml",
    "repo": "folder/changelog.yaml",
    "toml": "text"
  },
  "cloneResources": {
    "limits": {
      "cpu": "400m",
      "memory": "500Mi"
    }
  },
  "created": 1,
  "identifier": "text",
  "instanceCount": 1,
  "migrationType": "Liquibase",
  "name": "text",
  "parentId": "text",
  "primaryDbInstanceId": "text",
  "schemaSourceType": "Git",
  "service": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "type": "Repository",
  "updated": 1,
  "usePercona": false
}

Delete a database schema

delete

Delete a database schema

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.

Responses
204

The database schema was deleted successfully

No content

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

No content

Update a database instance

put

Update 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.

Body
branchstringOptional

branch where the instance is stored

commitShastringOptional

Commit SHA to pin the changelog to a specific revision. Mutually exclusive with branch and gitTag.

connectorstringOptional

DB Connector

contextstringOptional

Liquibase context

gitTagstringOptional

Git tag to pin the changelog to a specific tagged revision. Mutually exclusive with branch and commitSha.

namestring · max: 128Optional

name of the database instance

versionstringOptional

version of the changelog applied to the database

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

put/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance/{dbinstance}
PUT /v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance/{dbinstance} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "branch": "string",
  "connector": "string",
  "context": "string",
  "name": "string",
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}
{
  "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?