Delen via


Api Operation - Get

Hiermee haalt u de details op van de API-bewerking die is opgegeven met de id.

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

URI-parameters

Name In Vereist Type Description
apiId
path True

string

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

API-revisie-id. Moet uniek zijn in het huidige EXEMPLAAR van de API Management-service. Niet-huidige herziening heeft ; rev=n als achtervoegsel waarbij n het revisienummer is.

operationId
path True

string

minLength: 1
maxLength: 80

Bewerkings-id binnen een API. Moet uniek zijn in het huidige EXEMPLAAR van de API Management-service.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

De naam van de resourcegroep. De naam is niet hoofdlettergevoelig.

serviceName
path True

string

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

De naam van de API Management-service.

subscriptionId
path True

string (uuid)

De id van het doelabonnement. De waarde moet een UUID zijn.

api-version
query True

string

minLength: 1

De API-versie die voor deze bewerking moet worden gebruikt.

Antwoorden

Name Type Description
200 OK

OperationContract

De hoofdtekst van het antwoord bevat de opgegeven bewerkingsentiteit.

Kopteksten

ETag: string

Other Status Codes

ErrorResponse

Foutreactie waarin wordt beschreven waarom de bewerking is mislukt.

Beveiliging

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Stroom: implicit
Autorisatie-URL: https://login.microsoftonline.com/common/oauth2/authorize

Bereiken

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

ApiManagementGetApiOperation
ApiManagementGetApiOperationPetStore

ApiManagementGetApiOperation

Voorbeeldaanvraag

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

Voorbeeldrespons

{
  "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

Voorbeeldaanvraag

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

Voorbeeldrespons

{
  "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": []
      }
    ]
  }
}

Definities

Name Description
ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorDetail

De foutdetails.

ErrorResponse

Foutreactie

OperationContract

Api-bewerkingsgegevens.

ParameterContract

Details van bewerkingsparameters.

ParameterExampleContract

Parametervoorbeeld.

RepresentationContract

Details van weergave van bewerkingsaanvraag/antwoord.

RequestContract

Details van bewerkingsaanvraag.

ResponseContract

Details van bewerkingsreactie.

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

Name Type Description
info

object

De aanvullende informatie.

type

string

Het extra informatietype.

ErrorDetail

De foutdetails.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

De fout bevat aanvullende informatie.

code

string

De foutcode.

details

ErrorDetail[]

De foutdetails.

message

string

Het foutbericht.

target

string

Het foutdoel.

ErrorResponse

Foutreactie

Name Type Description
error

ErrorDetail

Het foutobject.

OperationContract

Api-bewerkingsgegevens.

Name Type Description
id

string

Volledig gekwalificeerde resource-id voor de resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

De naam van de resource

properties.description

string

maxLength: 1000

Beschrijving van de bewerking. Kan HTML-opmaaktags bevatten.

properties.displayName

string

minLength: 1
maxLength: 300

Bewerkingsnaam.

properties.method

string

Een geldige HTTP-bewerkingsmethode. Typische HTTP-methoden zoals GET, PUT, POST, maar niet beperkt door alleen deze methoden.

properties.policies

string

Bewerkingsbeleid

properties.request

RequestContract

Een entiteit met aanvraaggegevens.

properties.responses

ResponseContract[]

Matrix van bewerkingsreacties.

properties.templateParameters

ParameterContract[]

Verzameling url-sjabloonparameters.

properties.urlTemplate

string

minLength: 1
maxLength: 1000

Relatieve URL-sjabloon waarmee de doelresource voor deze bewerking wordt geïdentificeerd. Kan parameters bevatten. Voorbeeld: /customers/{cid}/orders/{oid}/?date={date}

type

string

Het type resource. Bijvoorbeeld 'Microsoft.Compute/virtualMachines' of 'Microsoft.Storage/storageAccounts'

ParameterContract

Details van bewerkingsparameters.

Name Type Description
defaultValue

string

Standaardparameterwaarde.

description

string

Parameterbeschrijving.

examples

<string,  ParameterExampleContract>

Voorbeeld gedefinieerd voor de parameter.

name

string

Parameternaam.

required

boolean

Hiermee geeft u op of parameter is vereist of niet.

schemaId

string

Schema-id.

type

string

Parametertype.

typeName

string

Typ de naam die is gedefinieerd door het schema.

values

string[]

Parameterwaarden.

ParameterExampleContract

Parametervoorbeeld.

Name Type Description
description

string

Lange beschrijving voor het voorbeeld

externalValue

string

Een URL die verwijst naar het letterlijke voorbeeld

summary

string

Korte beschrijving voor het voorbeeld

value

Voorbeeldwaarde. Dit kan een primitieve waarde of een object zijn.

RepresentationContract

Details van weergave van bewerkingsaanvraag/antwoord.

Name Type Description
contentType

string

Hiermee geeft u een geregistreerd of aangepast inhoudstype voor deze weergave, bijvoorbeeld application/xml.

examples

<string,  ParameterExampleContract>

Voorbeeld gedefinieerd voor de weergave.

formParameters

ParameterContract[]

Verzameling formulierparameters. Vereist als de waarde 'contentType' 'application/x-www-form-urlencoded' of 'multipart/form-data' is.

schemaId

string

Schema-id. Alleen van toepassing als de waarde contentType niet 'application/x-www-form-urlencoded' of 'multipart/form-data' is.

typeName

string

Typ de naam die is gedefinieerd door het schema. Alleen van toepassing als de waarde contentType niet 'application/x-www-form-urlencoded' of 'multipart/form-data' is.

RequestContract

Details van bewerkingsaanvraag.

Name Type Description
description

string

Beschrijving van bewerkingsaanvraag.

headers

ParameterContract[]

Verzameling aanvraagheaders voor bewerkingen.

queryParameters

ParameterContract[]

Verzameling queryparameters voor bewerkingsaanvragen.

representations

RepresentationContract[]

Verzameling weergaven van bewerkingsaanvragen.

ResponseContract

Details van bewerkingsreactie.

Name Type Description
description

string

Beschrijving van het antwoord van de bewerking.

headers

ParameterContract[]

Verzameling antwoordheaders voor bewerkingen.

representations

RepresentationContract[]

Verzameling weergaven van bewerkingsreacties.

statusCode

integer (int32)

HTTP-statuscode van het bewerkingsantwoord.