Skip to main content

api_definitions

Creates, updates, deletes, gets or lists a api_definitions resource.

Overview

Nameapi_definitions
TypeResource
Idazure.api_center.api_definitions

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
apiNametextfield from the properties object
definitionNametextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
specificationtextfield from the properties object
subscriptionIdtextfield from the properties object
titletextfield from the properties object
versionNametextfield from the properties object
workspaceNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTapiName, definitionName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceNameReturns details of the API definition.
listSELECTapiName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceNameReturns a collection of API definitions.
create_or_updateINSERTapiName, definitionName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceNameCreates new or updates existing API definition.
deleteDELETEapiName, definitionName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceNameDeletes specified API definition.
export_specificationEXECapiName, definitionName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceNameExports the API specification.
import_specificationEXECapiName, definitionName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceNameImports the API specification.

SELECT examples

Returns a collection of API definitions.

SELECT
description,
apiName,
definitionName,
resourceGroupName,
serviceName,
specification,
subscriptionId,
title,
versionName,
workspaceName
FROM azure.api_center.vw_api_definitions
WHERE apiName = '{{ apiName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND versionName = '{{ versionName }}'
AND workspaceName = '{{ workspaceName }}';

INSERT example

Use the following StackQL query and manifest file to create a new api_definitions resource.

/*+ create */
INSERT INTO azure.api_center.api_definitions (
apiName,
definitionName,
resourceGroupName,
serviceName,
subscriptionId,
versionName,
workspaceName,
properties
)
SELECT
'{{ apiName }}',
'{{ definitionName }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ versionName }}',
'{{ workspaceName }}',
'{{ properties }}'
;

DELETE example

Deletes the specified api_definitions resource.

/*+ delete */
DELETE FROM azure.api_center.api_definitions
WHERE apiName = '{{ apiName }}'
AND definitionName = '{{ definitionName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND versionName = '{{ versionName }}'
AND workspaceName = '{{ workspaceName }}';