# List database schemas

List database Schemas

Endpoint: GET /v1/orgs/{org}/projects/{project}/dbschema
Version: 1.0
Security: x-api-key

## Path parameters:

  - `org` (string, required)
    Organization identifier

  - `project` (string, required)
    Project identifier

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

## Query parameters:

  - `page` (integer)
    Pagination page number strategy: Specify the page number within the paginated collection related to the number of items on each page.

  - `limit` (integer)
    Pagination: Number of items to return.

  - `search_term` (string)
    This would be used to filter resources having attributes matching the search term.

  - `sort` (string)
    Parameter on the basis of which sorting is done.
    Enum: "name", "updated", "created"

  - `order` (string)
    Order on the basis of which sorting is done.
    Enum: "ASC", "DESC"

  - `migrationType` (string)
    DB Migration tool type
    Enum: "Liquibase", "Flyway"

## Response 200 fields (application/json):

  - `changeLogScript` (object)
    if schemaType is Script location of the changelog file after using a custom script to download

  - `changeLogScript.command` (string, required)
    command script used to download the changelog file
    Example: "curl -X -o changeLog.yaml https://www.filestore.com/changeLog.yaml"

  - `changeLogScript.image` (string, required)
    The fully-qualified name (FQN) of the image
    Example: "plugins/image:latest"

  - `changeLogScript.location` (string, required)
    location of the changelog file
    Example: "folder/changelog.yaml"

  - `changeLogScript.shell` (string, required)
    shell type
    Example: "Sh, Bash, <+pipeline.variables.shell>"

  - `changeLogScript.toml` (string)
    config file for Flyway migration type

  - `changelog` (object)
    if schemaType is Repository location of the changelog file containing schema changes in a git repository.
Provide connector for third-party git connectors, or repo without connector to use Harness Code Repository.

  - `changelog.archivePath` (string)
    path excluding the repo till the archive file

  - `changelog.connector` (string)
    identifier of the harness git connector. Optional when using Harness Code Repository. Omit or set to empty string to use Harness Code Repository (requires repo to be set).
    Example: "harness_git"

  - `changelog.location` (string, required)
    path to the change log file
    Example: "folder/changelog.yaml"

  - `changelog.repo` (string)
    repo name of the git based connector when ConnectionType is Account
    Example: "folder/changelog.yaml"

  - `changelog.toml` (string)
    config file for Flyway migration type

  - `created` (integer, required)
    epoch seconds when the database schema was created

  - `identifier` (string, required)
    identifier of the database schema

  - `instanceCount` (integer, required)
    number of database instances corresponding to database schema

  - `migrationType` (string, required)
    DB Migration tool type
    Enum: "Liquibase", "Flyway"

  - `name` (string, required)
    name of the database schema

  - `parentId` (string, required)
    parentUniqueId for scope schema belongs to

  - `primaryDbInstanceId` (string)
    Identifier for the primary dbInstance used for advanced feature like LLM Authoring etc.

  - `schemaSourceType` (string)
    Enum: "Git", "Artifactory", "Custom", "HarnessCode"

  - `service` (string)
    harness service corresponding to database schema

  - `tags` (object)
    tags attached to the database schema

  - `type` (string, required)
    db schema type
    Enum: "Repository", "Script"

  - `updated` (integer)
    epoch seconds when the database schema was last updated

  - `usePercona` (boolean, required)
    if percona-toolkit is enabled

## Response 400 fields (application/json):

  - `message` (string, required)
    error message detail


