次の方法で共有


Global Schema - List By Service

サービス インスタンスに登録されているスキーマのコレクションを一覧表示します。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas?api-version=2021-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas?$filter={$filter}&$top={$top}&$skip={$skip}&api-version=2021-08-01

URI パラメーター

名前 / 必須 説明
resourceGroupName
path True

string

リソース グループの名前。

serviceName
path True

string

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

API Management サービスの名前。

subscriptionId
path True

string

Microsoft Azure サブスクリプションを一意に識別するサブスクリプション資格情報。 サブスクリプション ID は、すべてのサービス呼び出しの URI の一部を形成します。

api-version
query True

string

クライアント要求で使用する API のバージョン。

$filter
query

string

|フィールド |使用法 |サポートされる演算子 |サポートされている関数 |
|-------------|-------------|-------------|-------------|
|name |filter |ge、le、eq、ne、gt、lt |substringof、contains、startswith、endswith |

$skip
query

integer (int32)

minimum: 0

スキップするレコードの数。

$top
query

integer (int32)

minimum: 1

返されるレコードの数。

応答

名前 説明
200 OK

GlobalSchemaCollection

スキーマ エンティティのコレクションを一覧表示します。

Other Status Codes

ErrorResponse

操作が失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー。

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

名前 説明
user_impersonation ユーザー アカウントを偽装する

ApiManagementListSchemas

要求のサンプル

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas?api-version=2021-08-01

応答のサンプル

{
  "value": [
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1",
      "type": "Microsoft.ApiManagement/service/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>"
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema2",
      "type": "Microsoft.ApiManagement/service/schemas",
      "name": "schema2",
      "properties": {
        "description": "sample schema description",
        "schemaType": "json",
        "document": {
          "$id": "https://example.com/person.schema.json",
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "title": "Person",
          "type": "object",
          "properties": {
            "firstName": {
              "type": "string",
              "description": "The person's first name."
            },
            "lastName": {
              "type": "string",
              "description": "The person's last name."
            },
            "age": {
              "description": "Age in years which must be equal to or greater than zero.",
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  ],
  "count": 2,
  "nextLink": ""
}

定義

名前 説明
ErrorFieldContract

エラー フィールド コントラクト。

ErrorResponse

エラー応答。

GlobalSchemaCollection

リスト スキーマ操作の応答。

GlobalSchemaContract

グローバル スキーマ コントラクトの詳細。

SchemaType

スキーマの種類。 不変。

ErrorFieldContract

エラー フィールド コントラクト。

名前 説明
code

string

プロパティ レベルのエラー コード。

message

string

プロパティ レベルエラーの人間が判読できる表現。

target

string

プロパティ名。

ErrorResponse

エラー応答。

名前 説明
error.code

string

サービス定義エラー コード。 このコードは、応答で指定された HTTP エラー コードのサブステータスとして機能します。

error.details

ErrorFieldContract[]

検証エラーが発生した場合に要求で送信される無効なフィールドの一覧。

error.message

string

エラーの人間が判読できる表現。

GlobalSchemaCollection

リスト スキーマ操作の応答。

名前 説明
count

integer (int64)

合計レコード数。

nextLink

string

次のページ リンク (ある場合)。

value

GlobalSchemaContract[]

グローバル スキーマ コントラクトの値。

GlobalSchemaContract

グローバル スキーマ コントラクトの詳細。

名前 説明
id

string

リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

リソースの名前

properties.description

string

自由形式のスキーマ エンティティの説明。

properties.schemaType

SchemaType

スキーマの種類。 不変。

properties.value

JSON ベース以外のスキーマの Json エンコード文字列。

type

string

リソースの種類。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"

SchemaType

スキーマの種類。 不変。

説明
json

Json スキーマの種類。

xml

XML スキーマの種類。