Azure Synapse Analytics Databases API

The Databases API from Azure Synapse Analytics — 13 operation(s) for databases.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 19

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /databases/ExecuteChange Run a batch of DDL changes in a database · Batch execution of DDL Payload #
Ask an LLM
“How do I run several DDL statements against a Synapse database in one call?”
“Can I execute a batch of table or view changes against a database?”
Tell an agent
Run these DDL statements against the database: {ddls}.
Execute the batch DDL {ddls} on the database.
POST /databases/ExecuteChangeWithValidation Run DDL changes with a validation step · Batch execution of DDL Payload #
Ask an LLM
“Can I validate DDL changes before running them against a database?”
“What validation types does the batch DDL execution support?”
Tell an agent
Validate and run DDL {ddls} with validation type {validationType}.
Execute {ddls} against the database, validating with {validationType}.
GET /databases List databases in a Synapse workspace · Get all databases in a workspace #
Ask an LLM
“Which databases exist in my Synapse workspace?”
“Can I page through all databases in a workspace?”
Tell an agent
List all databases in the workspace.
Show {maxPageSize} databases per page.
GET /databases/{databaseName}/{artifactType}s List artifacts of a type in a database · List all Artifacts of a type in a database #
Ask an LLM
“What tables or views exist in a Synapse database?”
“Can I list only the tables in a database?”
Tell an agent
List {artifactType}s in database {databaseName}.
Show {maxPageSize} {artifactType}s per page from {databaseName}.
GET /databases/{databaseName}/schemas/{schemaName}/{artifactType}s List artifacts of a type in a schema · List all artifacts in schema by type #
Ask an LLM
“What tables exist in a particular schema of a database?”
“Can I list only views in one schema?”
Tell an agent
List {artifactType}s in schema {schemaName} of database {databaseName}.
Show {maxPageSize} {artifactType}s per page from {schemaName} in {databaseName}.
GET /databases/{databaseName}/tables/{tableName}/partitionInfos List partition info for a table · List all partition information for a table #
Ask an LLM
“Which partitions exist for a Synapse table?”
“Can I see the partition details of one table?”
Tell an agent
List partition info for table {tableName} in database {databaseName}.
Show {maxPageSize} partitions per page for {tableName} in {databaseName}.
GET /databases/{databaseName}/views/{viewName}/partitionInfos List partition info for a database view · List all partition information for a view #
Ask an LLM
“Which partitions make up a partitioned view in my database?”
“Can I page through a large query view's partition information?”
Tell an agent
List partition info for view {view} in database {db}.
Get the first {page_size} partitions of query view {view} in {db}.
GET /databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitionInfos List partition info for a table in a schema · List all partition information for table in schema #
Ask an LLM
“What partition details are available for a table in a schema?”
“Can I see the partitioned columns of a single table?”
Tell an agent
List partition info for table {table} in schema {schema} of {db}.
Show the first {page_size} partitions of table {table} in schema {schema} ({db}).
GET /databases/{databaseName}/schemas/{schemaName}/views/{viewName}/partitionInfos List partition info for a schema view · List all partition information for a view in schema #
Ask an LLM
“Which partitions belong to a view inside a schema?”
“Can I list partition details for a schema view by name?”
Tell an agent
List partition info for view {view} in schema {schema} of {db}.
Show the first {page_size} partitions of schema view {view} in {schema} ({db}).
GET /databases/{databaseName} Get a database's details · Get details about a database #
Ask an LLM
“What are the details of a Synapse database?”
“Can I look up a database by name?”
Tell an agent
Get database {databaseName}.
Show the details of database {databaseName}.
PUT /databases/{databaseName} Create or replace a database · Put a database #
Ask an LLM
“How do I create a new database in Synapse?”
“Can I replace a database's definition?”
Tell an agent
Create database {databaseName} with properties {properties}.
Replace database {databaseName} with {properties}.
DELETE /databases/{databaseName} Delete a database · Delete a database #
Ask an LLM
“How do I delete a database?”
“Can I remove a database from a workspace?”
Tell an agent destructive · confirm first
Delete database {databaseName}.
Remove the {databaseName} database.
GET /databases/{databaseName}/{artifactType}s/{artifactName} Get an artifact from a database · Get an artifact from database #
Ask an LLM
“What does a table or view definition look like in a database?”
“Can I fetch an artifact directly from a database?”
Tell an agent
Get {artifactType} {artifactName} from database {databaseName}.
Show the definition of {artifactType} {artifactName} in {databaseName}.
PUT /databases/{databaseName}/{artifactType}s/{artifactName} Create or replace an artifact in a database · Put an artifact in a Database #
Ask an LLM
“How do I create a table or view in a database?”
“Can I replace an artifact's definition in a database?”
Tell an agent
Create {artifactType} {artifactName} in database {databaseName} with {properties}.
Replace {artifactType} {artifactName} in {databaseName} with {properties}.
DELETE /databases/{databaseName}/{artifactType}s/{artifactName} Delete an artifact from a database · Delete an artifact in a Database #
Ask an LLM
“How do I drop a table or view from a database?”
“Can I remove an artifact from a database?”
Tell an agent destructive · confirm first
Delete {artifactType} {artifactName} from database {databaseName}.
Drop {artifactType} {artifactName} in {databaseName}.
GET /databases/{databaseName}/schemas/{schemaName}/{artifactType}s/{artifactName} Get an artifact from a schema · Get an artifact from schema #
Ask an LLM
“How do I fetch a stored procedure from a schema?”
“Can I read one table or view from a schema by name?”
Tell an agent
Get {artifact_type} {artifact} from schema {schema} in {db}.
Show the definition of schema artifact {artifact} ({artifact_type}) in {db}.
PUT /databases/{databaseName}/schemas/{schemaName}/{artifactType}s/{artifactName} Create or update an artifact in a schema · Create or Update an artifact in a schema #
Ask an LLM
“How do I create a table in a schema?”
“Can I update an artifact's definition inside a schema?”
Tell an agent
Create {artifactType} {artifactName} in schema {schemaName} of {databaseName} with {properties}.
Update {artifactType} {artifactName} in {schemaName}, {databaseName} to {properties}.
DELETE /databases/{databaseName}/schemas/{schemaName}/{artifactType}s/{artifactName} Delete an artifact from a schema · Delete an artifact from Schema #
Ask an LLM
“How do I drop a stored procedure from a schema?”
“Can I delete a table or view from a schema?”
Tell an agent destructive · confirm first
Delete {artifact_type} {artifact} from schema {schema} in {db}.
Drop schema artifact {artifact} ({artifact_type}) in {db}.
GET /databases/operations/{operationId} Check the status of a database operation · Get the status of validation by operation Id #
Ask an LLM
“Did my batch DDL validation or execution succeed?”
“How do I check the status of a database operation by its ID?”
Tell an agent
Get the status of database operation {operationId}.
Check whether operation {operationId} has finished.

Documentation

📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/sqlpools
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/pipeline
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/monitoring
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/role-assignments
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/notebook
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/dataset
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/linked-service
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/data-flow
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/sql-script
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/trigger
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/spark-job-definition
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/managed-private-endpoints
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/integration-runtimes
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/library
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/ip-firewall-rules
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/keys
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/private-endpoint-connections
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/private-link-hubs
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/azure-ad-only-authentications
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/spark-configuration
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/data-flow-debug-session
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/credential
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/kql-script
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/link-connection

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-synapse-analytics:microsoft-azure-synapse-analytics-databases-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-synapse-analytics-databases-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ArtifactsClient Databases API
  description: SyMS API Service Client.
  version: '2021-04-01'
tags:
- name: Databases
paths:
  /databases/ExecuteChange:
    post:
      summary: Batch execution of DDL Payload
      operationId: ExecuteChange
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully completed the management operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyMSAPIDDLResponses'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DDLBatch'
        description: DDLBatch payload containing artifact drafts to be created or deleted or modified
        required: true
      tags:
      - Databases
  /databases/ExecuteChangeWithValidation:
    post:
      summary: Batch execution of DDL Payload
      operationId: ExecuteChangeWithValidation
      x-ms-long-running-operation: true
      parameters:
      - in: query
        name: validationType
        description: Validation Type - Currently only IDWValidation is supported
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '202':
          description: Returns location header with operation Id
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DDLBatch'
        description: DDLBatch containing artifacts to be Created or Deleted or Modified.
        required: true
      tags:
      - Databases
  /databases:
    get:
      summary: Get all databases in a workspace
      operationId: ListDatabases
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - name: continuationToken
        in: query
        description: Continuation token to get next page.
        required: false
        schema:
          type: string
      - name: maxPageSize
        in: query
        description: Max page size.
        required: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully returned details of all the databases in a workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryArtifactsResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
  /databases/{databaseName}/{artifactType}s:
    get:
      summary: List all Artifacts of a type in a database
      operationId: ListArtifacts
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: artifactType
        in: path
        description: Artifact type.
        required: true
        x-ms-enum:
          name: SASEntityType
          modelAsString: false
        schema:
          type: string
          enum:
          - DATABASE
          - TABLE
          - SCHEMA
          - VIEW
          - FUNCTION
          - PARTITIONINFO
          - RELATIONSHIP
      - $ref: '#/components/parameters/ApiVersionParameter'
      - name: continuationToken
        in: query
        description: Continuation token to get next page.
        required: false
        schema:
          type: string
      - name: maxPageSize
        in: query
        description: Max page size.
        required: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully returned details of all artifact types in a database.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryArtifactsResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
  /databases/{databaseName}/schemas/{schemaName}/{artifactType}s:
    get:
      summary: List all artifacts in schema by type
      operationId: ListArtifactsInSchemaByType
      description: List all Artifacts in schema by type
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: schemaName
        in: path
        description: Schema name.
        required: true
        schema:
          type: string
      - name: artifactType
        in: path
        description: Artifact type.
        required: true
        x-ms-enum:
          name: SASEntityType
          modelAsString: false
        schema:
          type: string
          enum:
          - DATABASE
          - TABLE
          - SCHEMA
          - VIEW
          - FUNCTION
          - PARTITIONINFO
          - RELATIONSHIP
      - $ref: '#/components/parameters/ApiVersionParameter'
      - name: continuationToken
        in: query
        description: Continuation token to get next page.
        required: false
        schema:
          type: string
      - name: maxPageSize
        in: query
        description: Max page size.
        required: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully returned details of all artifacts by type from schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryArtifactsResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
  /databases/{databaseName}/tables/{tableName}/partitionInfos:
    get:
      summary: List all partition information for a table
      operationId: ListPartitionInfosForTable
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: tableName
        in: path
        description: Table name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      - name: continuationToken
        in: query
        description: Continuation token to get next page.
        required: false
        schema:
          type: string
      - name: maxPageSize
        in: query
        description: Max page size.
        required: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully returned partition infos in a table.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryArtifactsResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
  /databases/{databaseName}/views/{viewName}/partitionInfos:
    get:
      summary: List all partition information for a view
      operationId: ListPartitionInfosForView
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: viewName
        in: path
        description: View name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      - name: continuationToken
        in: query
        description: Continuation token to get next page.
        required: false
        schema:
          type: string
      - name: maxPageSize
        in: query
        description: Max page size.
        required: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully returned partition infos for a view.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryArtifactsResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
  /databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitionInfos:
    get:
      summary: List all partition information for table in schema
      operationId: ListPartitionInfosForSchemaAndTable
      description: List all partition information for a table in schema
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: schemaName
        in: path
        description: Schema name.
        required: true
        schema:
          type: string
      - name: tableName
        in: path
        description: Table name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      - name: continuationToken
        in: query
        description: Continuation token to get next page.
        required: false
        schema:
          type: string
      - name: maxPageSize
        in: query
        description: Max page size.
        required: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully returned partition infos for a table in schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryArtifactsResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
  /databases/{databaseName}/schemas/{schemaName}/views/{viewName}/partitionInfos:
    get:
      summary: List all partition information for a view in schema
      operationId: ListPartitionInfosForSchemaAndView
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: schemaName
        in: path
        description: Schema name.
        required: true
        schema:
          type: string
      - name: viewName
        in: path
        description: View name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      - name: continuationToken
        in: query
        description: Continuation token to get next page.
        required: false
        schema:
          type: string
      - name: maxPageSize
        in: query
        description: Max page size.
        required: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully returned details of partition infos for the view
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryArtifactsResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
  /databases/{databaseName}:
    get:
      summary: Get details about a database
      operationId: GetDatabase
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully returned database information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatabaseEntity'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
    put:
      summary: Put a database
      operationId: PutDatabase
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully completed creating/updating database
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyMSAPIDDLResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatabaseEntity'
        description: Database entity payload to create or update a Database
        required: true
      tags:
      - Databases
    delete:
      summary: Delete a database
      operationId: DeleteDatabase
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully deleted the database.
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
  /databases/{databaseName}/{artifactType}s/{artifactName}:
    get:
      summary: Get an artifact from database
      operationId: GetArtifactFromDB
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: artifactType
        in: path
        description: Artifact type.
        required: true
        x-ms-enum:
          name: SASEntityType
          modelAsString: false
        schema:
          type: string
          enum:
          - DATABASE
          - TABLE
          - SCHEMA
          - VIEW
          - FUNCTION
          - PARTITIONINFO
          - RELATIONSHIP
      - name: artifactName
        in: path
        description: Artifact name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully returned artifact details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MDEntity'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
    put:
      summary: Put an artifact in a Database
      operationId: PutArtifactInDB
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: artifactType
        in: path
        description: Artifact type.
        required: true
        x-ms-enum:
          name: SASEntityType
          modelAsString: false
        schema:
          type: string
          enum:
          - DATABASE
          - TABLE
          - SCHEMA
          - VIEW
          - FUNCTION
          - PARTITIONINFO
          - RELATIONSHIP
      - name: artifactName
        in: path
        description: Artifact name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      - name: continuationToken
        in: query
        description: Continuation token to get next page.
        required: false
        schema:
          type: string
      - name: maxPageSize
        in: query
        description: Max page size.
        required: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Successfully created/updated artifact in Database
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyMSAPIDDLResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MDEntity'
        description: Payload containing artifact entity to be created/modified
        required: true
      tags:
      - Databases
    delete:
      summary: Delete an artifact in a Database
      operationId: DeleteArtifactForDB
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: artifactType
        in: path
        description: Artifact type
        required: true
        x-ms-enum:
          name: SASEntityType
          modelAsString: false
        schema:
          type: string
          enum:
          - DATABASE
          - TABLE
          - SCHEMA
          - VIEW
          - FUNCTION
          - PARTITIONINFO
          - RELATIONSHIP
      - name: artifactName
        in: path
        description: Artifact name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully deleted artifact from database
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
  /databases/{databaseName}/schemas/{schemaName}/{artifactType}s/{artifactName}:
    get:
      summary: Get an artifact from schema
      operationId: GetArtifactFromSchema
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: schemaName
        in: path
        description: Schema name.
        required: true
        schema:
          type: string
      - name: artifactType
        in: path
        description: Artifact type.
        required: true
        x-ms-enum:
          name: SASEntityType
          modelAsString: false
        schema:
          type: string
          enum:
          - DATABASE
          - TABLE
          - SCHEMA
          - VIEW
          - FUNCTION
          - PARTITIONINFO
          - RELATIONSHIP
      - name: artifactName
        in: path
        description: Artifact name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully returned schema artifact info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MDEntity'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
    put:
      summary: Create or Update an artifact in a schema
      operationId: PutArtifactInSchema
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: schemaName
        in: path
        description: Schema name.
        required: true
        schema:
          type: string
      - name: artifactType
        in: path
        description: Artifact type.
        required: true
        x-ms-enum:
          name: SASEntityType
          modelAsString: false
        schema:
          type: string
          enum:
          - DATABASE
          - TABLE
          - SCHEMA
          - VIEW
          - FUNCTION
          - PARTITIONINFO
          - RELATIONSHIP
      - name: artifactName
        in: path
        description: Artifact name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully completed creating/updating artifact in schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyMSAPIDDLResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MDEntity'
        description: Payload containing artifact object to be create/updated
        required: true
      tags:
      - Databases
    delete:
      summary: Delete an artifact from Schema
      operationId: DeleteArtifactFromSchema
      parameters:
      - name: databaseName
        in: path
        description: Database name.
        required: true
        schema:
          type: string
      - name: schemaName
        in: path
        description: Schema name.
        required: true
        schema:
          type: string
      - name: artifactType
        in: path
        description: Artifact type.
        required: true
        x-ms-enum:
          name: SASEntityType
          modelAsString: false
        schema:
          type: string
          enum:
          - DATABASE
          - TABLE
          - SCHEMA
          - VIEW
          - FUNCTION
          - PARTITIONINFO
          - RELATIONSHIP
      - name: artifactName
        in: path
        description: Artifact name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully deleted artifact from Schema
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
  /databases/operations/{operationId}:
    get:
      summary: Get the status of validation by operation Id
      operationId: GetSyMSOperationStatus
      parameters:
      - name: operationId
        in: path
        description: Operation Id.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully returned the status of given operation Id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryArtifactsResponse'
        default:
          description: SyMS error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      tags:
      - Databases
components:
  schemas:
    MDEntity:
      description: MD Entity
      type: object
      properties:
        name:
          description: Entity Name.
          type: string
        type:
          $ref: '#/components/schemas/ArtifactType'
        id:
          description: Entity Resource Id.
          type: string
          readOnly: true
        properties:
          type: object
      required:
      - name
      - type
    DDLType:
      description: DDL type.
      type: string
      enum:
      - CREATE
      - ALTER
      - DROP
      x-ms-enum:
        name: DDLType
        modelAsString: false
    CloudError:
      x-ms-external: true
      description: The object that defines the structure of an Azure Synapse error response.
      type: object
      properties:
        error:
          x-ms-client-flatten: true
          description: Error data
          $ref: '#/components/schemas/CloudErrorBody'
      required:
      - error
    QueryArtifactsResponse:
      description: Query artifacts response.
      type: object
      properties:
        items:
          type: array
          items:
            description: MDEntity (Database/Table/Schema/View/PartitionInfo/PermissionAssignment
            type: object
        continuationToken:
          description: Continuation token to get next page.
          type: string
    DatabaseProperties:
      description: Database properties.
      type: object
      allOf:
      - $ref: '#/components/schemas/MDEntityProperties'
      properties:
        source:
          $ref: '#/components/schemas/DataSource'
        description:
          description: Description of the database.
          type: string
      required:
      - source
    MDEntityProperties:
      description: Defines the artifact entity.
      type: object
      properties:
        originObjectId:
          description: Entity object id maintained by the caller.
          type: string
        objectId:
          description: Entity object id maintained by SyMS.
          type: string
          readOnly: true
        objectVersion:
          description: Entity object version maintained by SyMS.
          type: integer
          format: int64
          readOnly: true
        publishStatus:
          $ref: '#/components/schemas/PublishStatus'
        properties:
          description: Property bag
          type: object
          additionalProperties:
            type: object
    DDLBatch:
      description: DDL batch.
      type: object
      properties:
        ddls:
          type: array
          items:
            $ref: '#/components/schemas/DDLPayload'
      required:
      - ddls
    SyMSAPIDDLResponse:
      description: Defines the response for create/publish operation on DDL payload.
      type: object
      properties:
        ddlType:
          $ref: '#/components/schemas/DDLType'
        entityName:
          description: Entity name.
          type: string
        entityType:
          $ref: '#/components/schemas/ArtifactType'
        publishStatus:
          $ref: '#/components/schemas/PublishStatus'
        originObjectId:
          description: Object id maintained by Origin Catalog.
          type: string
        objectId:
          description: Object id maintained by SyMS.
          type: string
        objectVersion:
          description: Object version maintained by SyMS.
          type: integer
          format: int64
      required:
      - ddlType
      - entityName
      - entityType
      - publishStatus
      - originObjectId
      - objectId
      - objectVersion
    DataSource:
      description: Data source properties.
      type: object
      properties:
        provider:
          description: Data source provider information.
          type: string
        location:
          description: Data source location.
          type: string
        properties:
          description: Property bag.
          type: object
          additionalProperties:
            type: object
      required:
      - location
    SyMSAPIDDLResponses:
      description: Defines the publish response.
      type: object
      properties:
        syMsApiDdlResponse:
          description: List of DDL response.
          type: array
          items:
            $ref: '#/components/schemas/SyMSAPIDDLResponse'
      required:
      - syMsApiDdlResponse
    ArtifactType:
      description: Artifact type.
      type: string
      enum:
      - DATABASE
      - TABLE
      - SCHEMA
      - VIEW
      - FUNCTION
      - PARTITIONINFO
      - RELATIONSHIP
      x-ms-enum:
        name: SASEntityType
        modelAsString: false
    DDLPayload:
      description: DDL payload
      type: object
      properties:
        actionType:
          $ref: '#/components/schemas/DDLType'
        oldEntity:
          $ref: '#/components/schemas/MDEntity'
        newEntity:
          $ref: '#/components/schemas/MDEntity'
      required:
      - actionType
    DatabaseEntity:
      description: Database entity.
      type: object
      allOf:
      - $ref: '#/components/schemas/MDEntity'
      properties:
        properties:
          $ref: '#/components/schemas/DatabaseProperties'
      required:
      - properties
    PublishStatus:
      description: Publish status.
      type: string
      enum:
      - PUBLISHED
      x-ms-enum:
        name: PublishStatus
        modelAsString: false
  parameters:
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      x-ms-parameter-location: client
      description: The Synapse client API Version.
      schema:
        type: string
x-ms-parameterized-host:
  hostTemplate: '{endpoint}'
  useSchemePrefix: false
  parameters:
  - $ref: '#/components/parameters/Endpoint'