Tanımlayıcısı tarafından belirtilen API İşleminin ayrıntılarını alır.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}?api-version=2022-08-01
URI Parametreleri
Name |
İçinde |
Gerekli |
Tür |
Description |
apiId
|
path |
True
|
string
|
API düzeltme tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır. Geçerli olmayan düzeltmede ; rev=n sonek olarak, burada n düzeltme numarasıdır.
Regex pattern: ^[^*#&+:<>?]+$
|
operationId
|
path |
True
|
string
|
API içindeki işlem tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır.
|
resourceGroupName
|
path |
True
|
string
|
Kaynak grubunun adı. Ad büyük/küçük harfe duyarlı değildir.
|
serviceName
|
path |
True
|
string
|
API Management hizmetinin adı.
Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
|
subscriptionId
|
path |
True
|
string
|
Hedef aboneliğin kimliği.
|
api-version
|
query |
True
|
string
|
Bu işlem için kullanılacak API sürümü.
|
Yanıtlar
Name |
Tür |
Description |
200 OK
|
OperationContract
|
Yanıt gövdesi belirtilen İşlem varlığını içerir.
Headers
ETag: string
|
Other Status Codes
|
ErrorResponse
|
İşlemin neden başarısız olduğunu açıklayan hata yanıtı.
|
Güvenlik
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
|
kullanıcı hesabınızın kimliğine bürünme
|
Örnekler
ApiManagementGetApiOperation
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc?api-version=2022-08-01
/** Samples for ApiOperation Get. */
public final class Main {
/*
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json
*/
/**
* Sample code: ApiManagementGetApiOperation.
*
* @param manager Entry point to ApiManagementManager.
*/
public static void apiManagementGetApiOperation(
com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
manager
.apiOperations()
.getWithResponse(
"rg1",
"apimService1",
"57d2ef278aa04f0888cba3f3",
"57d2ef278aa04f0ad01d6cdc",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.apimanagement import ApiManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-apimanagement
# USAGE
python api_management_get_api_operation.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ApiManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.api_operation.get(
resource_group_name="rg1",
service_name="apimService1",
api_id="57d2ef278aa04f0888cba3f3",
operation_id="57d2ef278aa04f0ad01d6cdc",
)
print(response)
# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armapimanagement_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json
func ExampleAPIOperationClient_Get_apiManagementGetApiOperation() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIOperationClient().Get(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.OperationContract = armapimanagement.OperationContract{
// Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
// Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc"),
// Properties: &armapimanagement.OperationContractProperties{
// TemplateParameters: []*armapimanagement.ParameterContract{
// },
// Request: &armapimanagement.RequestContract{
// Description: to.Ptr("IFazioService_CancelOrder_InputMessage"),
// Headers: []*armapimanagement.ParameterContract{
// },
// QueryParameters: []*armapimanagement.ParameterContract{
// },
// Representations: []*armapimanagement.RepresentationContract{
// {
// ContentType: to.Ptr("text/xml"),
// SchemaID: to.Ptr("6980a395-f08b-4a59-8295-1440cbd909b8"),
// TypeName: to.Ptr("CancelOrder"),
// }},
// },
// Responses: []*armapimanagement.ResponseContract{
// {
// Description: to.Ptr("IFazioService_CancelOrder_OutputMessage"),
// Headers: []*armapimanagement.ParameterContract{
// },
// Representations: []*armapimanagement.RepresentationContract{
// {
// ContentType: to.Ptr("text/xml"),
// SchemaID: to.Ptr("6980a395-f08b-4a59-8295-1440cbd909b8"),
// TypeName: to.Ptr("CancelOrderResponse"),
// }},
// StatusCode: to.Ptr[int32](200),
// }},
// Method: to.Ptr("POST"),
// DisplayName: to.Ptr("CancelOrder"),
// URLTemplate: to.Ptr("/?soapAction=http://tempuri.org/IFazioService/CancelOrder"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ApiManagementClient } = require("@azure/arm-apimanagement");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the details of the API Operation specified by its identifier.
*
* @summary Gets the details of the API Operation specified by its identifier.
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json
*/
async function apiManagementGetApiOperation() {
const subscriptionId = process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1";
const serviceName = "apimService1";
const apiId = "57d2ef278aa04f0888cba3f3";
const operationId = "57d2ef278aa04f0ad01d6cdc";
const credential = new DefaultAzureCredential();
const client = new ApiManagementClient(credential, subscriptionId);
const result = await client.apiOperation.get(resourceGroupName, serviceName, apiId, operationId);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/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
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/swagger-petstore/operations/loginUser?api-version=2022-08-01
/** Samples for ApiOperation Get. */
public final class Main {
/*
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json
*/
/**
* Sample code: ApiManagementGetApiOperationPetStore.
*
* @param manager Entry point to ApiManagementManager.
*/
public static void apiManagementGetApiOperationPetStore(
com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
manager
.apiOperations()
.getWithResponse("rg1", "apimService1", "swagger-petstore", "loginUser", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.apimanagement import ApiManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-apimanagement
# USAGE
python api_management_get_api_operation_pet_store.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ApiManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.api_operation.get(
resource_group_name="rg1",
service_name="apimService1",
api_id="swagger-petstore",
operation_id="loginUser",
)
print(response)
# x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armapimanagement_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json
func ExampleAPIOperationClient_Get_apiManagementGetApiOperationPetStore() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIOperationClient().Get(ctx, "rg1", "apimService1", "swagger-petstore", "loginUser", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.OperationContract = armapimanagement.OperationContract{
// Name: to.Ptr("loginUser"),
// Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
// ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/swagger-petstore/operations/loginUser"),
// Properties: &armapimanagement.OperationContractProperties{
// Description: to.Ptr(""),
// TemplateParameters: []*armapimanagement.ParameterContract{
// {
// Name: to.Ptr("username"),
// Type: to.Ptr("string"),
// Description: to.Ptr("The user name for login"),
// Required: to.Ptr(true),
// Values: []*string{
// },
// },
// {
// Name: to.Ptr("password"),
// Type: to.Ptr("string"),
// Description: to.Ptr("The password for login in clear text"),
// Required: to.Ptr(true),
// Values: []*string{
// },
// }},
// Request: &armapimanagement.RequestContract{
// Headers: []*armapimanagement.ParameterContract{
// },
// QueryParameters: []*armapimanagement.ParameterContract{
// },
// Representations: []*armapimanagement.RepresentationContract{
// },
// },
// Responses: []*armapimanagement.ResponseContract{
// {
// Description: to.Ptr("successful operation"),
// Headers: []*armapimanagement.ParameterContract{
// {
// Name: to.Ptr("X-Rate-Limit"),
// Type: to.Ptr("integer"),
// Description: to.Ptr("calls per hour allowed by the user"),
// Values: []*string{
// },
// },
// {
// Name: to.Ptr("X-Expires-After"),
// Type: to.Ptr("string"),
// Description: to.Ptr("date in UTC when token expires"),
// Values: []*string{
// },
// }},
// Representations: []*armapimanagement.RepresentationContract{
// {
// ContentType: to.Ptr("application/xml"),
// SchemaID: to.Ptr("5ba91a35f373b513a0bf31c6"),
// TypeName: to.Ptr("UserLoginGet200ApplicationXmlResponse"),
// },
// {
// ContentType: to.Ptr("application/json"),
// SchemaID: to.Ptr("5ba91a35f373b513a0bf31c6"),
// TypeName: to.Ptr("UserLoginGet200ApplicationJsonResponse"),
// }},
// StatusCode: to.Ptr[int32](200),
// },
// {
// Description: to.Ptr("Invalid username/password supplied"),
// Headers: []*armapimanagement.ParameterContract{
// },
// Representations: []*armapimanagement.RepresentationContract{
// {
// ContentType: to.Ptr("application/xml"),
// },
// {
// ContentType: to.Ptr("application/json"),
// }},
// StatusCode: to.Ptr[int32](400),
// }},
// Method: to.Ptr("GET"),
// DisplayName: to.Ptr("Logs user into the system"),
// URLTemplate: to.Ptr("/user/login?username={username}&password={password}"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ApiManagementClient } = require("@azure/arm-apimanagement");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets the details of the API Operation specified by its identifier.
*
* @summary Gets the details of the API Operation specified by its identifier.
* x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json
*/
async function apiManagementGetApiOperationPetStore() {
const subscriptionId = process.env["APIMANAGEMENT_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["APIMANAGEMENT_RESOURCE_GROUP"] || "rg1";
const serviceName = "apimService1";
const apiId = "swagger-petstore";
const operationId = "loginUser";
const credential = new DefaultAzureCredential();
const client = new ApiManagementClient(credential, subscriptionId);
const result = await client.apiOperation.get(resourceGroupName, serviceName, apiId, operationId);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/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": []
}
]
}
}
Tanımlar
ErrorFieldContract
Hata Alanı sözleşmesi.
Name |
Tür |
Description |
code
|
string
|
Özellik düzeyi hata kodu.
|
message
|
string
|
Özellik düzeyi hatanın insan tarafından okunabilir gösterimi.
|
target
|
string
|
Özellik adı.
|
ErrorResponse
Hata Yanıtı.
Name |
Tür |
Description |
error.code
|
string
|
Hizmet tanımlı hata kodu. Bu kod, yanıtta belirtilen HTTP hata kodu için bir alt durum görevi görür.
|
error.details
|
ErrorFieldContract[]
|
Doğrulama hatası durumunda istekte gönderilen geçersiz alanların listesi.
|
error.message
|
string
|
Hatanın insan tarafından okunabilen gösterimi.
|
OperationContract
API İşlem ayrıntıları.
Name |
Tür |
Description |
id
|
string
|
Kaynağın tam kaynak kimliği. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
name
|
string
|
Kaynağın adı
|
properties.description
|
string
|
İşlemin açıklaması. HTML biçimlendirme etiketlerini içerebilir.
|
properties.displayName
|
string
|
İşlem Adı.
|
properties.method
|
string
|
Geçerli bir HTTP İşlem Yöntemi. GET, PUT, POST gibi tipik Http Yöntemleri ancak yalnızca bunlarla sınırlı değildir.
|
properties.policies
|
string
|
İşlem İlkeleri
|
properties.request
|
RequestContract
|
İstek ayrıntılarını içeren varlık.
|
properties.responses
|
ResponseContract[]
|
İşlem yanıtları dizisi.
|
properties.templateParameters
|
ParameterContract[]
|
URL şablonu parametreleri koleksiyonu.
|
properties.urlTemplate
|
string
|
Bu işlem için hedef kaynağı tanımlayan göreli URL şablonu. Parametreler içerebilir. Örnek: /customers/{cid}/orders/{oid}/?date={date}
|
type
|
string
|
Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"
|
ParameterContract
İşlem parametreleri ayrıntıları.
Name |
Tür |
Description |
defaultValue
|
string
|
Varsayılan parametre değeri.
|
description
|
string
|
Parametre açıklaması.
|
examples
|
<string,
ParameterExampleContract>
|
parametresi için tanımlanan örnek.
|
name
|
string
|
Parametre adı.
|
required
|
boolean
|
Parametrenin gerekli olup olmadığını belirtir.
|
schemaId
|
string
|
Şema tanımlayıcısı.
|
type
|
string
|
Parametre türü.
|
typeName
|
string
|
Şema tarafından tanımlanan tür adı.
|
values
|
string[]
|
Parametre değerleri.
|
ParameterExampleContract
Parametre örneği.
Name |
Tür |
Description |
description
|
string
|
Örnek için uzun açıklama
|
externalValue
|
string
|
Değişmez değer örneğine işaret eden BIR URL
|
summary
|
string
|
Örnek için kısa açıklama
|
value
|
|
Örnek değer. İlkel bir değer veya nesne olabilir.
|
RepresentationContract
İşlem isteği/yanıt gösterimi ayrıntıları.
Name |
Tür |
Description |
contentType
|
string
|
Bu gösterim için kayıtlı veya özel içerik türünü belirtir; örneğin, uygulama/xml.
|
examples
|
<string,
ParameterExampleContract>
|
Gösterim için tanımlanan örnek.
|
formParameters
|
ParameterContract[]
|
Form parametreleri koleksiyonu. 'contentType' değeri 'application/x-www-form-urlencoded' veya 'multipart/form-data' ise gereklidir...
|
schemaId
|
string
|
Şema tanımlayıcısı. Yalnızca 'contentType' değeri 'application/x-www-form-urlencoded' veya 'multipart/form-data' değilse geçerlidir.
|
typeName
|
string
|
Şema tarafından tanımlanan tür adı. Yalnızca 'contentType' değeri 'application/x-www-form-urlencoded' veya 'multipart/form-data' değilse geçerlidir.
|
RequestContract
İşlem isteği ayrıntıları.
Name |
Tür |
Description |
description
|
string
|
İşlem isteği açıklaması.
|
headers
|
ParameterContract[]
|
İşlem isteği üst bilgilerinin koleksiyonu.
|
queryParameters
|
ParameterContract[]
|
İşlem isteği sorgu parametrelerinin koleksiyonu.
|
representations
|
RepresentationContract[]
|
İşlem isteği gösterimleri koleksiyonu.
|
ResponseContract
İşlem yanıtı ayrıntıları.
Name |
Tür |
Description |
description
|
string
|
İşlem yanıtı açıklaması.
|
headers
|
ParameterContract[]
|
İşlem yanıtı üst bilgileri koleksiyonu.
|
representations
|
RepresentationContract[]
|
İşlem yanıtı gösterimlerinin koleksiyonu.
|
statusCode
|
integer
|
İşlem yanıtı HTTP durum kodu.
|