api_definitions
Creates, updates, deletes, gets or lists a api_definitions
resource.
Overview
Name | api_definitions |
Type | Resource |
Id | azure.api_center.api_definitions |
Fields
- vw_api_definitions
- api_definitions
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
apiName | text | field from the properties object |
definitionName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serviceName | text | field from the properties object |
specification | text | field from the properties object |
subscriptionId | text | field from the properties object |
title | text | field from the properties object |
versionName | text | field from the properties object |
workspaceName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | API definition properties entity. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | apiName, definitionName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceName | Returns details of the API definition. |
list | SELECT | apiName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceName | Returns a collection of API definitions. |
create_or_update | INSERT | apiName, definitionName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceName | Creates new or updates existing API definition. |
delete | DELETE | apiName, definitionName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceName | Deletes specified API definition. |
export_specification | EXEC | apiName, definitionName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceName | Exports the API specification. |
import_specification | EXEC | apiName, definitionName, resourceGroupName, serviceName, subscriptionId, versionName, workspaceName | Imports the API specification. |
SELECT
examples
Returns a collection of API definitions.
- vw_api_definitions
- 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 }}';
SELECT
properties
FROM azure.api_center.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: title
value: string
- name: description
value: string
- name: specification
value:
- name: name
value: string
- name: version
value: string
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 }}';