Skip to main content

api_operations

Creates, updates, deletes, gets or lists an api_operations resource.

Overview

Nameapi_operations
TypeResource
Idazure.api_management.api_operations

Fields

The following fields are returned by SELECT queries:

The response body contains the specified Operation entity.

NameDatatypeDescription
propertiesobjectProperties of the Operation Contract.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serviceName, apiId, operationId, subscriptionIdGets the details of the API Operation specified by its identifier.
list_by_apiselectresourceGroupName, serviceName, apiId, subscriptionId$filter, $top, $skip, tagsLists a collection of the operations for the specified API.
create_or_updateinsertresourceGroupName, serviceName, apiId, operationId, subscriptionIdIf-MatchCreates a new operation in the API or updates an existing one.
updateupdateresourceGroupName, serviceName, apiId, operationId, If-Match, subscriptionIdUpdates the details of the operation in the API specified by its identifier.
deletedeleteresourceGroupName, serviceName, apiId, operationId, If-Match, subscriptionIdDeletes the specified operation in the API.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
If-MatchstringETag 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.
apiIdstringAPI 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.
operationIdstringThe ID of an ongoing async operation.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
$filterstring| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>
$skipinteger (int32)Number of records to skip.
$topinteger (int32)Number of records to return.
If-MatchstringETag of the Entity. Not required when creating an entity, but required when updating an entity.
tagsstringInclude tags in the response.

SELECT examples

Gets the details of the API Operation specified by its identifier.

SELECT
properties
FROM azure.api_management.api_operations
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND apiId = '{{ apiId }}' -- required
AND operationId = '{{ operationId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates a new operation in the API or updates an existing one.

INSERT INTO azure.api_management.api_operations (
data__properties,
resourceGroupName,
serviceName,
apiId,
operationId,
subscriptionId,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ apiId }}',
'{{ operationId }}',
'{{ subscriptionId }}',
'{{ If-Match }}'
RETURNING
properties
;

UPDATE examples

Updates the details of the operation in the API specified by its identifier.

UPDATE azure.api_management.api_operations
SET
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND apiId = '{{ apiId }}' --required
AND operationId = '{{ operationId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
properties;

DELETE examples

Deletes the specified operation in the API.

DELETE FROM azure.api_management.api_operations
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND apiId = '{{ apiId }}' --required
AND operationId = '{{ operationId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;