Api Operation - Update
Updates the details of the operation in the API specified by its identifier.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}?api-version=2021-08-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
api
|
path | True |
string |
API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Regex pattern: |
operation
|
path | True |
string |
Operation identifier within an API. Must be unique in the current API Management service instance. |
resource
|
path | True |
string |
The name of the resource group. |
service
|
path | True |
string |
The name of the API Management service. Regex pattern: |
subscription
|
path | True |
string |
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Version of the API to be used with the client request. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
If-Match | True |
string |
ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. |
Request Body
Name | Type | Description |
---|---|---|
properties.description |
string |
Description of the operation. May include HTML formatting tags. |
properties.displayName |
string |
Operation Name. |
properties.method |
string |
A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. |
properties.policies |
string |
Operation Policies |
properties.request |
An entity containing request details. |
|
properties.responses |
Array of Operation responses. |
|
properties.templateParameters |
Collection of URL template parameters. |
|
properties.urlTemplate |
string |
Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Operation was successfully updated. Headers ETag: string |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
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 | impersonate your user account |
Examples
ApiManagementUpdateApiOperation
Sample request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/operations/operationId?api-version=2021-08-01
{
"properties": {
"displayName": "Retrieve resource",
"method": "GET",
"urlTemplate": "/resource",
"templateParameters": [],
"request": {
"queryParameters": [
{
"name": "param1",
"description": "A sample parameter that is required and has a default value of \"sample\".",
"type": "string",
"defaultValue": "sample",
"required": true,
"values": [
"sample"
]
}
]
},
"responses": [
{
"statusCode": 200,
"description": "Returned in all cases.",
"representations": [],
"headers": []
},
{
"statusCode": 500,
"description": "Server Error.",
"representations": [],
"headers": []
}
]
}
}
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": []
}
]
}
}
Definitions
Name | Description |
---|---|
Error |
Error Field contract. |
Error |
Error Response. |
Operation |
API Operation details. |
Operation |
API Operation Update Contract details. |
Parameter |
Operation parameters details. |
Parameter |
Parameter example. |
Representation |
Operation request/response representation details. |
Request |
Operation request details. |
Response |
Operation response details. |
ErrorFieldContract
Error Field contract.
Name | Type | Description |
---|---|---|
code |
string |
Property level error code. |
message |
string |
Human-readable representation of property-level error. |
target |
string |
Property name. |
ErrorResponse
Error Response.
Name | Type | Description |
---|---|---|
error.code |
string |
Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. |
error.details |
The list of invalid fields send in request, in case of validation error. |
|
error.message |
string |
Human-readable representation of the error. |
OperationContract
API Operation details.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
The name of the resource |
properties.description |
string |
Description of the operation. May include HTML formatting tags. |
properties.displayName |
string |
Operation Name. |
properties.method |
string |
A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. |
properties.policies |
string |
Operation Policies |
properties.request |
An entity containing request details. |
|
properties.responses |
Array of Operation responses. |
|
properties.templateParameters |
Collection of URL template parameters. |
|
properties.urlTemplate |
string |
Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} |
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
OperationUpdateContract
API Operation Update Contract details.
Name | Type | Description |
---|---|---|
properties.description |
string |
Description of the operation. May include HTML formatting tags. |
properties.displayName |
string |
Operation Name. |
properties.method |
string |
A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. |
properties.policies |
string |
Operation Policies |
properties.request |
An entity containing request details. |
|
properties.responses |
Array of Operation responses. |
|
properties.templateParameters |
Collection of URL template parameters. |
|
properties.urlTemplate |
string |
Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} |
ParameterContract
Operation parameters details.
Name | Type | Description |
---|---|---|
defaultValue |
string |
Default parameter value. |
description |
string |
Parameter description. |
examples |
<string,
Parameter |
Exampled defined for the parameter. |
name |
string |
Parameter name. |
required |
boolean |
Specifies whether parameter is required or not. |
schemaId |
string |
Schema identifier. |
type |
string |
Parameter type. |
typeName |
string |
Type name defined by the schema. |
values |
string[] |
Parameter values. |
ParameterExampleContract
Parameter example.
Name | Type | Description |
---|---|---|
description |
string |
Long description for the example |
externalValue |
string |
A URL that points to the literal example |
summary |
string |
Short description for the example |
value |
|
Example value. May be a primitive value, or an object. |
RepresentationContract
Operation request/response representation details.
Name | Type | Description |
---|---|---|
contentType |
string |
Specifies a registered or custom content type for this representation, e.g. application/xml. |
examples |
<string,
Parameter |
Exampled defined for the representation. |
formParameters |
Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. |
|
schemaId |
string |
Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. |
typeName |
string |
Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. |
RequestContract
Operation request details.
Name | Type | Description |
---|---|---|
description |
string |
Operation request description. |
headers |
Collection of operation request headers. |
|
queryParameters |
Collection of operation request query parameters. |
|
representations |
Collection of operation request representations. |
ResponseContract
Operation response details.
Name | Type | Description |
---|---|---|
description |
string |
Operation response description. |
headers |
Collection of operation response headers. |
|
representations |
Collection of operation response representations. |
|
statusCode |
integer |
Operation response HTTP status code. |