Database Instance

This contains APIs for performing CRUD operations on Database Instance Entity

Create a database instance

Create a database instance

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

dbschema
required
string <= 128 characters

Identifier of the database schema

header Parameters
Harness-Account
string

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.

Request Body schema: application/json
required
branch
string

branch where the instance is stored

connector
required
string non-empty

DB Connector

context
string

Liquibase context

identifier
required
string^[a-zA-Z_][0-9a-zA-Z_$]{0,127}$

identifier of the database instance

object

properties to substitute in liquibase changelog

name
string

name of the database instance

object <= 128 properties

tags attached to the database instance

Responses
201

Response body for Database Instance

400

Error Response body

403

Error Response body

404

Error Response body

500

Error Response body

post/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance
Request samples
application/json
{
  • "branch": "main",
  • "connector": "postgres-connector",
  • "context": "string",
  • "identifier": "string",
  • "liquibaseSubstituteProperties": {
    },
  • "name": "string",
  • "tags": {
    }
}
Response samples
application/json
{
  • "branch": "string",
  • "connector": "string",
  • "context": "string",
  • "created": 0,
  • "identifier": "string",
  • "lastAppliedTag": "string",
  • "lastDeployedChangeSetTag": "string",
  • "liquibaseSubstituteProperties": {
    },
  • "name": "string",
  • "schemaId": "string",
  • "schemaIdentifier": "string",
  • "tags": {
    },
  • "toOnboard": true,
  • "updated": 0
}

Delete a database instance

Delete a database instance

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

dbschema
required
string <= 128 characters

Identifier of the database schema

dbinstance
required
string

database instance unique id

header Parameters
Harness-Account
string

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

400

Error Response body

403

Error Response body

404

Error Response body

500

Error Response body

delete/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance/{dbinstance}
Request samples
Response samples
application/json
{
  • "message": "string"
}

Get a database instance

Retrieves the specified database instance

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

dbschema
required
string <= 128 characters

Identifier of the database schema

dbinstance
required
string

database instance unique id

header Parameters
Harness-Account
string

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

400

Error Response body

403

Error Response body

404

Error Response body

500

Error Response body

get/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instance/{dbinstance}
Request samples
Response samples
application/json
{
  • "branch": "string",
  • "connector": "string",
  • "context": "string",
  • "created": 0,
  • "identifier": "string",
  • "lastAppliedTag": "string",
  • "lastDeployedChangeSetTag": "string",
  • "liquibaseSubstituteProperties": {
    },
  • "name": "string",
  • "schemaId": "string",
  • "schemaIdentifier": "string",
  • "tags": {
    },
  • "toOnboard": true,
  • "updated": 0
}

List database instances

Retrieves the specified database instances of the database schema

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

project
required
string

Project identifier

dbschema
required
string <= 128 characters

Identifier of the database schema

query Parameters
page
integer <int64>
Default: 0

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

limit
integer <= 100
Default: 10

Pagination: Number of items to return.

search_term
string

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

sort
string
Default: "created"

Parameter on the basis of which sorting is done.

Enum: "name" "updated" "created"
order
string
Default: "DESC"

Order on the basis of which sorting is done.

Enum: "ASC" "DESC"
header Parameters
Harness-Account
string

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.

Request Body schema: application/json
filterType
string
Default: "Equals"

filter criteria type. Example: Equals, NotEquals

Enum: "Equals" "NotEquals"
Array of objects (NGTag)

an array on db instance key value pairs used against the filter

Responses
200

Response body for List Database Schema

400

Error Response body

403

Error Response body

404

Error Response body

500

Error Response body

post/v1/orgs/{org}/projects/{project}/dbschema/{dbschema}/instancelist
Request samples
application/json
{
  • "filterType": "Equals",
  • "instanceTags": [
    ]
}
Response samples
application/json
[
  • {
    }
]