Udostępnij za pośrednictwem


Workspace Global Schema - Get

Pobiera szczegóły schematu określonego przez jego identyfikator.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}?api-version=2024-05-01

Parametry identyfikatora URI

Nazwa W Wymagane Typ Opis
resourceGroupName
path True

string

minLength: 1
maxLength: 90

Nazwa grupy zasobów. Nazwa jest niewrażliwa na wielkość liter.

schemaId
path True

string

minLength: 1
maxLength: 80

Identyfikator schematu. Musi być unikatowa w bieżącym wystąpieniu usługi API Management.

serviceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

Nazwa usługi API Management.

subscriptionId
path True

string (uuid)

Identyfikator subskrypcji docelowej. Wartość musi być identyfikatorem UUID.

workspaceId
path True

string

minLength: 1
maxLength: 80
pattern: ^[^*#&+:<>?]+$

Identyfikator obszaru roboczego. Musi być unikatowa w bieżącym wystąpieniu usługi API Management.

api-version
query True

string

minLength: 1

Wersja interfejsu API do użycia dla tej operacji.

Odpowiedzi

Nazwa Typ Opis
200 OK

GlobalSchemaContract

Treść odpowiedzi zawiera określoną jednostkę Schemat.

Nagłówki

ETag: string

Other Status Codes

ErrorResponse

Odpowiedź na błąd opisująca, dlaczego operacja nie powiodła się.

Zabezpieczenia

azure_auth

Przepływ protokołu OAuth2 usługi Azure Active Directory.

Typ: oauth2
Flow: implicit
Adres URL autoryzacji: https://login.microsoftonline.com/common/oauth2/authorize

Zakresy

Nazwa Opis
user_impersonation personifikacja konta użytkownika

Przykłady

ApiManagementGetWorkspaceSchema

Przykładowe żądanie

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/schemas/schema1?api-version=2024-05-01

Przykładowa odpowiedź

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/schemas/schema1",
  "type": "Microsoft.ApiManagement/service/workspaces/schemas",
  "name": "schema1",
  "properties": {
    "description": "sample schema description",
    "schemaType": "xml",
    "value": "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\r\n           xmlns:tns=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\r\n           targetNamespace=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\r\n           elementFormDefault=\"qualified\">\r\n <xsd:element name=\"PurchaseOrder\" type=\"tns:PurchaseOrderType\"/>\r\n <xsd:complexType name=\"PurchaseOrderType\">\r\n  <xsd:sequence>\r\n   <xsd:element name=\"ShipTo\" type=\"tns:USAddress\" maxOccurs=\"2\"/>\r\n   <xsd:element name=\"BillTo\" type=\"tns:USAddress\"/>\r\n  </xsd:sequence>\r\n  <xsd:attribute name=\"OrderDate\" type=\"xsd:date\"/>\r\n </xsd:complexType>\r\n\r\n <xsd:complexType name=\"USAddress\">\r\n  <xsd:sequence>\r\n   <xsd:element name=\"name\"   type=\"xsd:string\"/>\r\n   <xsd:element name=\"street\" type=\"xsd:string\"/>\r\n   <xsd:element name=\"city\"   type=\"xsd:string\"/>\r\n   <xsd:element name=\"state\"  type=\"xsd:string\"/>\r\n   <xsd:element name=\"zip\"    type=\"xsd:integer\"/>\r\n  </xsd:sequence>\r\n  <xsd:attribute name=\"country\" type=\"xsd:NMTOKEN\" fixed=\"US\"/>\r\n </xsd:complexType>\r\n</xsd:schema>"
  }
}

Definicje

Nazwa Opis
ErrorAdditionalInfo

Dodatkowe informacje o błędzie zarządzania zasobami.

ErrorDetail

Szczegóły błędu.

ErrorResponse

Odpowiedź na błąd

GlobalSchemaContract

Szczegóły kontraktu schematu globalnego.

SchemaType

Typ schematu. Niezmienialny.

ErrorAdditionalInfo

Dodatkowe informacje o błędzie zarządzania zasobami.

Nazwa Typ Opis
info

object

Dodatkowe informacje.

type

string

Dodatkowy typ informacji.

ErrorDetail

Szczegóły błędu.

Nazwa Typ Opis
additionalInfo

ErrorAdditionalInfo[]

Dodatkowe informacje o błędzie.

code

string

Kod błędu.

details

ErrorDetail[]

Szczegóły błędu.

message

string

Komunikat o błędzie.

target

string

Element docelowy błędu.

ErrorResponse

Odpowiedź na błąd

Nazwa Typ Opis
error

ErrorDetail

Obiekt błędu.

GlobalSchemaContract

Szczegóły kontraktu schematu globalnego.

Nazwa Typ Opis
id

string

W pełni kwalifikowany identyfikator zasobu dla zasobu. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

Nazwa zasobu

properties.description

string

Opis jednostki schematu w dowolnej formie.

properties.provisioningState

string

Stan aprowizacji

properties.schemaType

SchemaType

Typ schematu. Niezmienialny.

properties.value

Ciąg zakodowany w formacie Json dla schematu opartego na formacie JSON.

type

string

Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"

SchemaType

Typ schematu. Niezmienialny.

Wartość Opis
json

Typ schematu JSON.

xml

Typ schematu XML.