Skip to main content

workspace_apis

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

Overview

Nameworkspace_apis
TypeResource
Idazure.api_management.workspace_apis

Fields

The following fields are returned by SELECT queries:

The response body contains the specified API entity.

NameDatatypeDescription
propertiesobjectAPI entity contract properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serviceName, workspaceId, apiId, subscriptionIdGets the details of the API specified by its identifier.
list_by_serviceselectresourceGroupName, serviceName, workspaceId, subscriptionId$filter, $top, $skip, tags, expandApiVersionSetLists all APIs of the workspace in an API Management service instance.
create_or_updateinsertresourceGroupName, serviceName, workspaceId, apiId, subscriptionIdIf-MatchCreates new or updates existing specified API of the workspace in an API Management service instance.
updateupdateresourceGroupName, serviceName, workspaceId, apiId, If-Match, subscriptionIdUpdates the specified API of the workspace in an API Management service instance.
deletedeleteresourceGroupName, serviceName, workspaceId, apiId, If-Match, subscriptionIddeleteRevisionsDeletes the specified API of the workspace in an API Management service instance.

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.
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>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</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.
deleteRevisionsbooleanDelete all revisions of the Api.
expandApiVersionSetbooleanInclude full ApiVersionSet resource in response
tagsstringInclude tags in the response.

SELECT examples

Gets the details of the API specified by its identifier.

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

INSERT examples

Creates new or updates existing specified API of the workspace in an API Management service instance.

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

UPDATE examples

Updates the specified API of the workspace in an API Management service instance.

UPDATE azure.api_management.workspace_apis
SET
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND workspaceId = '{{ workspaceId }}' --required
AND apiId = '{{ apiId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
properties;

DELETE examples

Deletes the specified API of the workspace in an API Management service instance.

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