Skip to main content

api_versions

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

Overview

Nameapi_versions
TypeResource
Idazure.api_center.api_versions

Fields

The following fields are returned by SELECT queries:

Azure operation completed successfully.

NameDatatypeDescription
propertiesobjectThe resource-specific properties for this resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, serviceName, workspaceName, apiName, versionNameReturns details of the API version.
listselectsubscriptionId, resourceGroupName, serviceName, workspaceName, apiName$filterReturns a collection of API versions.
create_or_updateinsertsubscriptionId, resourceGroupName, serviceName, workspaceName, apiName, versionNameCreates new or updates existing API version.
deletedeletesubscriptionId, resourceGroupName, serviceName, workspaceName, apiName, versionNameDeletes specified API version

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
apiNamestringThe name of the API.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of Azure API Center service.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
versionNamestringThe name of the API version.
workspaceNamestringThe name of the workspace.
$filterstringOData filter parameter.

SELECT examples

Returns details of the API version.

SELECT
properties
FROM azure.api_center.api_versions
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND workspaceName = '{{ workspaceName }}' -- required
AND apiName = '{{ apiName }}' -- required
AND versionName = '{{ versionName }}' -- required
;

INSERT examples

Creates new or updates existing API version.

INSERT INTO azure.api_center.api_versions (
data__properties,
subscriptionId,
resourceGroupName,
serviceName,
workspaceName,
apiName,
versionName
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ workspaceName }}',
'{{ apiName }}',
'{{ versionName }}'
RETURNING
properties
;

DELETE examples

Deletes specified API version

DELETE FROM azure.api_center.api_versions
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND apiName = '{{ apiName }}' --required
AND versionName = '{{ versionName }}' --required
;