次の方法で共有


Api Operation - Get

識別子で指定された API 操作の詳細を取得します。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}?api-version=2024-05-01

URI パラメーター

名前 / 必須 説明
apiId
path True

string

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

API リビジョン識別子。 現在の API Management サービス インスタンスで一意である必要があります。 現在のリビジョン以外のリビジョンには、rev=n はサフィックスであり、n はリビジョン番号です。

operationId
path True

string

minLength: 1
maxLength: 80

API 内の操作識別子。 現在の API Management サービス インスタンスで一意である必要があります。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

リソース グループの名前。 名前では大文字と小文字が区別されません。

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 (uuid)

ターゲット サブスクリプションの ID。 値は UUID である必要があります。

api-version
query True

string

minLength: 1

この操作に使用する API バージョン。

応答

名前 説明
200 OK

OperationContract

応答本文には、指定された Operation エンティティが含まれています。

ヘッダー

ETag: string

Other Status Codes

ErrorResponse

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

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー。

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

スコープ

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

ApiManagementGetApiOperation
ApiManagementGetApiOperationPetStore

ApiManagementGetApiOperation

要求のサンプル

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc?api-version=2024-05-01

応答のサンプル

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc",
  "type": "Microsoft.ApiManagement/service/apis/operations",
  "name": "57d2ef278aa04f0ad01d6cdc",
  "properties": {
    "displayName": "CancelOrder",
    "method": "POST",
    "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/CancelOrder",
    "templateParameters": [],
    "request": {
      "description": "IFazioService_CancelOrder_InputMessage",
      "queryParameters": [],
      "headers": [],
      "representations": [
        {
          "contentType": "text/xml",
          "schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8",
          "typeName": "CancelOrder"
        }
      ]
    },
    "responses": [
      {
        "statusCode": 200,
        "description": "IFazioService_CancelOrder_OutputMessage",
        "representations": [
          {
            "contentType": "text/xml",
            "schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8",
            "typeName": "CancelOrderResponse"
          }
        ],
        "headers": []
      }
    ]
  }
}

ApiManagementGetApiOperationPetStore

要求のサンプル

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/swagger-petstore/operations/loginUser?api-version=2024-05-01

応答のサンプル

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/swagger-petstore/operations/loginUser",
  "type": "Microsoft.ApiManagement/service/apis/operations",
  "name": "loginUser",
  "properties": {
    "displayName": "Logs user into the system",
    "method": "GET",
    "urlTemplate": "/user/login?username={username}&password={password}",
    "templateParameters": [
      {
        "name": "username",
        "description": "The user name for login",
        "type": "string",
        "required": true,
        "values": []
      },
      {
        "name": "password",
        "description": "The password for login in clear text",
        "type": "string",
        "required": true,
        "values": []
      }
    ],
    "description": "",
    "request": {
      "queryParameters": [],
      "headers": [],
      "representations": []
    },
    "responses": [
      {
        "statusCode": 200,
        "description": "successful operation",
        "representations": [
          {
            "contentType": "application/xml",
            "schemaId": "5ba91a35f373b513a0bf31c6",
            "typeName": "UserLoginGet200ApplicationXmlResponse"
          },
          {
            "contentType": "application/json",
            "schemaId": "5ba91a35f373b513a0bf31c6",
            "typeName": "UserLoginGet200ApplicationJsonResponse"
          }
        ],
        "headers": [
          {
            "name": "X-Rate-Limit",
            "description": "calls per hour allowed by the user",
            "type": "integer",
            "values": []
          },
          {
            "name": "X-Expires-After",
            "description": "date in UTC when token expires",
            "type": "string",
            "values": []
          }
        ]
      },
      {
        "statusCode": 400,
        "description": "Invalid username/password supplied",
        "representations": [
          {
            "contentType": "application/xml"
          },
          {
            "contentType": "application/json"
          }
        ],
        "headers": []
      }
    ]
  }
}

定義

名前 説明
ErrorAdditionalInfo

リソース管理エラーの追加情報。

ErrorDetail

エラーの詳細。

ErrorResponse

エラー応答

OperationContract

API 操作の詳細。

ParameterContract

操作パラメーターの詳細。

ParameterExampleContract

パラメーターの例。

RepresentationContract

操作要求/応答表現の詳細。

RequestContract

操作要求の詳細。

ResponseContract

操作の応答の詳細。

ErrorAdditionalInfo

リソース管理エラーの追加情報。

名前 説明
info

object

追加情報。

type

string

追加情報の種類。

ErrorDetail

エラーの詳細。

名前 説明
additionalInfo

ErrorAdditionalInfo[]

エラーの追加情報。

code

string

エラー コード。

details

ErrorDetail[]

エラーの詳細。

message

string

エラー メッセージ。

target

string

エラーターゲット。

ErrorResponse

エラー応答

名前 説明
error

ErrorDetail

エラー オブジェクト。

OperationContract

API 操作の詳細。

名前 説明
id

string

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

name

string

リソースの名前

properties.description

string

maxLength: 1000

操作の説明。 HTML 書式設定タグを含めることができます。

properties.displayName

string

minLength: 1
maxLength: 300

操作名。

properties.method

string

有効な HTTP 操作メソッド。 GET、PUT、POST などの一般的な Http メソッドですが、これらに限定されません。

properties.policies

string

操作ポリシー

properties.request

RequestContract

要求の詳細を含むエンティティ。

properties.responses

ResponseContract[]

操作応答の配列。

properties.templateParameters

ParameterContract[]

URL テンプレート パラメーターのコレクション。

properties.urlTemplate

string

minLength: 1
maxLength: 1000

この操作のターゲット リソースを識別する相対 URL テンプレート。 パラメーターを含めることができます。 例: /customers/{cid}/orders/{oid}/?date={date}

type

string

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

ParameterContract

操作パラメーターの詳細。

名前 説明
defaultValue

string

既定のパラメーター値。

description

string

パラメーターの説明。

examples

<string,  ParameterExampleContract>

パラメーターに対して定義された例。

name

string

パラメーター名。

required

boolean

パラメーターが必要かどうかを指定します。

schemaId

string

スキーマ識別子。

type

string

パラメーターの型。

typeName

string

スキーマによって定義される型名。

values

string[]

パラメーター値。

ParameterExampleContract

パラメーターの例。

名前 説明
description

string

この例の長い説明

externalValue

string

リテラルの例を指す URL

summary

string

例の簡単な説明

value

値の例。 プリミティブ値またはオブジェクトを指定できます。

RepresentationContract

操作要求/応答表現の詳細。

名前 説明
contentType

string

この表現の登録済みコンテンツ タイプまたはカスタム コンテンツ タイプ (application/xml など) を指定します。

examples

<string,  ParameterExampleContract>

表現に対して定義された例。

formParameters

ParameterContract[]

フォーム パラメーターのコレクション。 'contentType' 値が 'application/x-www-form-urlencoded' または 'multipart/form-data' の場合は必須です。

schemaId

string

スキーマ識別子。 'contentType' 値が 'application/x-www-form-urlencoded' でも 'multipart/form-data' でもない場合にのみ適用されます。

typeName

string

スキーマによって定義される型名。 'contentType' 値が 'application/x-www-form-urlencoded' でも 'multipart/form-data' でもない場合にのみ適用されます。

RequestContract

操作要求の詳細。

名前 説明
description

string

操作要求の説明。

headers

ParameterContract[]

操作要求ヘッダーのコレクション。

queryParameters

ParameterContract[]

操作要求クエリ パラメーターのコレクション。

representations

RepresentationContract[]

操作要求表現のコレクション。

ResponseContract

操作の応答の詳細。

名前 説明
description

string

操作応答の説明。

headers

ParameterContract[]

操作応答ヘッダーのコレクション。

representations

RepresentationContract[]

操作応答表現のコレクション。

statusCode

integer (int32)

操作応答 HTTP 状態コード。