Workspace Api Operation - Get
取得其識別碼所指定的 API 作業詳細數據。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}?api-version=2024-05-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
api
|
path | True |
string minLength: 1maxLength: 256 pattern: ^[^*#&+:<>?]+$ |
API 修訂標識碼。 目前 API 管理服務實例中必須是唯一的。 非目前的修訂具有 ;rev=n 作為後綴,其中 n 是修訂編號。 |
operation
|
path | True |
string minLength: 1maxLength: 80 |
API 內的作業標識碼。 目前 API 管理服務實例中必須是唯一的。 |
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
service
|
path | True |
string minLength: 1maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$ |
API 管理服務的名稱。 |
subscription
|
path | True |
string (uuid) |
目標訂用帳戶的標識碼。 此值必須是 UUID。 |
workspace
|
path | True |
string minLength: 1maxLength: 80 pattern: ^[^*#&+:<>?]+$ |
工作區標識碼。 目前 API 管理服務實例中必須是唯一的。 |
api-version
|
query | True |
string minLength: 1 |
要用於這項作業的 API 版本。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
響應主體包含指定的 Operation 實體。 標題 ETag: string |
|
Other Status Codes |
描述作業失敗原因的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
ApiManagementGetWorkspaceApiOperation
範例要求
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc?api-version=2024-05-01
範例回覆
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc",
"type": "Microsoft.ApiManagement/service/workspaces/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": []
}
]
}
}
定義
名稱 | Description |
---|---|
Error |
資源管理錯誤其他資訊。 |
Error |
錯誤詳細數據。 |
Error |
錯誤回應 |
Operation |
API 作業詳細數據。 |
Parameter |
作業參數詳細數據。 |
Parameter |
參數範例。 |
Representation |
作業要求/回應表示詳細數據。 |
Request |
作業要求詳細數據。 |
Response |
作業回應詳細數據。 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
名稱 | 類型 | Description |
---|---|---|
info |
object |
其他資訊。 |
type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
additionalInfo |
錯誤其他資訊。 |
|
code |
string |
錯誤碼。 |
details |
錯誤詳細數據。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
名稱 | 類型 | Description |
---|---|---|
error |
error 物件。 |
OperationContract
API 作業詳細數據。
名稱 | 類型 | Description |
---|---|---|
id |
string |
資源的完整資源標識碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
資源的名稱 |
properties.description |
string maxLength: 1000 |
作業的描述。 可能包含 HTML 格式標記。 |
properties.displayName |
string minLength: 1maxLength: 300 |
作業名稱。 |
properties.method |
string |
有效的 HTTP 作業方法。 一般 Http 方法,例如 GET、PUT、POST,但不受限制。 |
properties.policies |
string |
作業原則 |
properties.request |
包含要求詳細數據的實體。 |
|
properties.responses |
作業回應的陣列。 |
|
properties.templateParameters |
URL 樣本參數的集合。 |
|
properties.urlTemplate |
string minLength: 1maxLength: 1000 |
識別此作業之目標資源的相對URL範本。 可能包含參數。 範例:/customers/{cid}/orders/{oid}/?date={date} |
type |
string |
資源的型別。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts” |
ParameterContract
作業參數詳細數據。
名稱 | 類型 | Description |
---|---|---|
defaultValue |
string |
預設參數值。 |
description |
string |
參數描述。 |
examples |
<string,
Parameter |
針對參數定義的範例。 |
name |
string |
參數名稱。 |
required |
boolean |
指定參數是否為必要。 |
schemaId |
string |
架構標識碼。 |
type |
string |
參數類型。 |
typeName |
string |
架構所定義的類型名稱。 |
values |
string[] |
參數值。 |
ParameterExampleContract
參數範例。
名稱 | 類型 | Description |
---|---|---|
description |
string |
範例的長描述 |
externalValue |
string |
指向常值範例的 URL |
summary |
string |
範例的簡短描述 |
value |
範例值。 可以是基本值或物件。 |
RepresentationContract
作業要求/回應表示詳細數據。
名稱 | 類型 | Description |
---|---|---|
contentType |
string |
指定這個表示法的已註冊或自定義內容類型,例如 application/xml。 |
examples |
<string,
Parameter |
針對表示法定義的範例。 |
formParameters |
表單參數的集合。 如果 '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 |
---|---|---|
description |
string |
作業要求描述。 |
headers |
作業要求標頭的集合。 |
|
queryParameters |
作業要求查詢參數的集合。 |
|
representations |
作業要求表示法的集合。 |
ResponseContract
作業回應詳細數據。
名稱 | 類型 | Description |
---|---|---|
description |
string |
作業回應描述。 |
headers |
作業回應標頭的集合。 |
|
representations |
作業回應表示的集合。 |
|
statusCode |
integer (int32) |
作業回應 HTTP 狀態代碼。 |