Skip to main content

apis

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

Overview

Nameapis
TypeResource
Idazure.api_center.apis

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
apiNametextfield from the properties object
contactstextfield from the properties object
custom_propertiestextfield from the properties object
external_documentationtextfield from the properties object
kindtextfield from the properties object
licensetextfield from the properties object
lifecycle_stagetextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object
summarytextfield from the properties object
terms_of_servicetextfield from the properties object
titletextfield from the properties object
workspaceNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTapiName, resourceGroupName, serviceName, subscriptionId, workspaceNameReturns details of the API.
listSELECTresourceGroupName, serviceName, subscriptionId, workspaceNameReturns a collection of APIs.
create_or_updateINSERTapiName, resourceGroupName, serviceName, subscriptionId, workspaceNameCreates new or updates existing API.
deleteDELETEapiName, resourceGroupName, serviceName, subscriptionId, workspaceNameDeletes specified API.

SELECT examples

Returns a collection of APIs.

SELECT
description,
apiName,
contacts,
custom_properties,
external_documentation,
kind,
license,
lifecycle_stage,
resourceGroupName,
serviceName,
subscriptionId,
summary,
terms_of_service,
title,
workspaceName
FROM azure.api_center.vw_apis
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';

INSERT example

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

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

DELETE example

Deletes the specified apis resource.

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