Share via


Sync Groups - List Hub Schemas

Gets a collection of hub database schemas.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas?api-version=2025-01-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

serverName
path True

string

The name of the server.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

syncGroupName
path True

string

The name of the sync group.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

SyncFullSchemaPropertiesListResult

Azure operation completed successfully.

Other Status Codes

ErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get a hub database schema.

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/hubSchemas?api-version=2025-01-01

Sample response

{
  "value": [
    {
      "lastUpdateTime": "2017-05-30T07:16:08.21Z",
      "tables": [
        {
          "name": "dbo.myTable",
          "columns": [
            {
              "name": "intField",
              "dataSize": "4",
              "dataType": "int",
              "hasError": false,
              "isPrimaryKey": false,
              "quotedName": "[intField]"
            },
            {
              "name": "charField",
              "dataSize": "100",
              "dataType": "nvarchar",
              "hasError": false,
              "isPrimaryKey": false,
              "quotedName": "[charField]"
            }
          ],
          "errorId": "Schema_TableHasNoPrimaryKey",
          "hasError": true,
          "quotedName": "[dbo].[myTable]"
        }
      ]
    }
  ]
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

SyncFullSchemaProperties

Properties of the database full schema.

SyncFullSchemaPropertiesListResult

A list of sync schema properties.

SyncFullSchemaTable

Properties of the table in the database full schema.

SyncFullSchemaTableColumn

Properties of the column in the table of database full schema.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

SyncFullSchemaProperties

Properties of the database full schema.

Name Type Description
lastUpdateTime

string (date-time)

Last update time of the database schema.

tables

SyncFullSchemaTable[]

List of tables in the database full schema.

SyncFullSchemaPropertiesListResult

A list of sync schema properties.

Name Type Description
nextLink

string (uri)

The link to the next page of items

value

SyncFullSchemaProperties[]

The SyncFullSchemaProperties items on this page

SyncFullSchemaTable

Properties of the table in the database full schema.

Name Type Description
columns

SyncFullSchemaTableColumn[]

List of columns in the table of database full schema.

errorId

string

Error id of the table.

hasError

boolean

If there is error in the table.

name

string

Name of the table.

quotedName

string

Quoted name of the table.

SyncFullSchemaTableColumn

Properties of the column in the table of database full schema.

Name Type Description
dataSize

string

Data size of the column.

dataType

string

Data type of the column.

errorId

string

Error id of the column.

hasError

boolean

If there is error in the table.

isPrimaryKey

boolean

If it is the primary key of the table.

name

string

Name of the column.

quotedName

string

Quoted name of the column.