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

Harness NextGen Software Delivery Platform API Reference

DB Metadata Snapshot File Upload

post

Sending DB snapshot file from plugin to harness for capturing current state

Path parameters
snapshotIdstringRequired

Unique id for the snapshot of the DB

Query parameters
harnessCommandstring · enumRequired

Harness command Example : Update, Rollback

Example: UpdatePossible values:
pipelineExecutionIdstringRequired

plan execution Id of the pipeline execution

stageExecutionIdstringRequired

stage execution id of the pipeline execution

pipelineIdentifierstringRequired

Identifier for the Pipeline

dbInstancestringRequired

Identifier for the DBInstance

dbSchemastringRequired

DB Schema identifier

parentIdstringRequired

Harness parentUnique Id for 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.

X-Checksum-Sha256stringOptional

Sha256 of the content to validate on server if provided (hex-encoded)

Body
string · binaryOptional
Responses
201

Created

No content

post/v1/dbops/metadata-snapshot/{snapshotId}
POST /v1/dbops/metadata-snapshot/{snapshotId}?harnessCommand=Update&pipelineExecutionId=text&stageExecutionId=text&pipelineIdentifier=text&dbInstance=text&dbSchema=text&parentId=text HTTP/1.1
Content-Type: application/octet-stream
Accept: */*
Content-Length: 8

"binary"

No content

List database instances

post

List database instances

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.

orderstring · enumOptional

Order on the basis of which sorting is done.

Default: DESCPossible values:
sortstring · enumOptional

Parameter on the basis of which sorting is done.

Default: createdPossible 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

Input for filtering instances in list API

instanceFQNsstring[]Optional

list of '-' separated values of schema identifier and instance identifiers

schemaIdentifiersstring[]Optional

list of schema identifiers to filter instances

Responses
201

Response body for List Database Schema

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

{
  "instanceFQNs": [
    "text"
  ],
  "schemaIdentifiers": [
    "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
  }
]

List database schemas

post

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.

orderstring · enumOptional

Order on the basis of which sorting is done.

Default: DESCPossible values:
sortstring · enumOptional

Parameter on the basis of which sorting is done.

Default: createdPossible 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

List schema body input

identifiersstring[]Optional

list of schema identifiers

Responses
201

Response body for List Database Schema

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

{
  "identifiers": [
    "text"
  ]
}
[
  {
    "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
  }
]

Last updated

Was this helpful?