Skip to main content

products

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

Overview

Nameproducts
TypeResource
Idazure.api_management.products

Fields

The following fields are returned by SELECT queries:

The response body contains the specified Product entity.

NameDatatypeDescription
propertiesobjectProduct entity contract properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serviceName, productId, subscriptionIdGets the details of the product specified by its identifier.
list_by_serviceselectresourceGroupName, serviceName, subscriptionId$filter, $top, $skip, expandGroups, tagsLists a collection of products in the specified service instance.
list_by_tagsselectresourceGroupName, serviceName, subscriptionId$filter, $top, $skip, includeNotTaggedProductsLists a collection of products associated with tags.
create_or_updateinsertresourceGroupName, serviceName, productId, subscriptionIdIf-MatchCreates or Updates a product.
updateupdateresourceGroupName, serviceName, productId, If-Match, subscriptionIdUpdate existing product details.
deletedeleteresourceGroupName, serviceName, productId, If-Match, subscriptionIddeleteSubscriptionsDelete product.

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.
productIdstringProduct identifier. Must be unique in the current API Management service instance.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
$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>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | 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.
deleteSubscriptionsbooleanDelete existing subscriptions associated with the product or not.
expandGroupsbooleanWhen set to true, the response contains an array of groups that have visibility to the product. The default is false.
includeNotTaggedProductsbooleanInclude not tagged Products.
tagsstringProducts which are part of a specific tag.

SELECT examples

Gets the details of the product specified by its identifier.

SELECT
properties
FROM azure.api_management.products
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND productId = '{{ productId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or Updates a product.

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

UPDATE examples

Update existing product details.

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

DELETE examples

Delete product.

DELETE FROM azure.api_management.products
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND productId = '{{ productId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND deleteSubscriptions = '{{ deleteSubscriptions }}'
;