Skip to main content

workspace_api_schemata

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

Overview

Nameworkspace_api_schemata
TypeResource
Idazure.api_management.workspace_api_schemata

Fields

The following fields are returned by SELECT queries:

Api Schema information.

NameDatatypeDescription
propertiesobjectProperties of the API Schema.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serviceName, workspaceId, apiId, schemaId, subscriptionIdGet the schema configuration at the API level.
list_by_apiselectresourceGroupName, serviceName, workspaceId, apiId, subscriptionId$filter, $top, $skipGet the schema configuration at the API level.
create_or_updateinsertresourceGroupName, serviceName, workspaceId, apiId, schemaId, subscriptionIdIf-MatchCreates or updates schema configuration for the API.
deletedeleteresourceGroupName, serviceName, workspaceId, apiId, schemaId, If-Match, subscriptionIdforceDeletes the schema configuration at 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.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
schemaIdstringSchema id identifier. Must be unique in the current API Management service instance.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
workspaceIdstringWorkspace identifier. Must be unique in the current API Management service instance.
$filterstring| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | 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.
forcebooleanIf true removes all references to the schema before deleting it.

SELECT examples

Get the schema configuration at the API level.

SELECT
properties
FROM azure.api_management.workspace_api_schemata
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND workspaceId = '{{ workspaceId }}' -- required
AND apiId = '{{ apiId }}' -- required
AND schemaId = '{{ schemaId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or updates schema configuration for the API.

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

DELETE examples

Deletes the schema configuration at the Api.

DELETE FROM azure.api_management.workspace_api_schemata
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND workspaceId = '{{ workspaceId }}' --required
AND apiId = '{{ apiId }}' --required
AND schemaId = '{{ schemaId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND force = '{{ force }}'
;