Skip to main content

gateway_api

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

Overview

Namegateway_api
TypeResource
Idazure.api_management.gateway_api

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
apiRevisionstringDescribes the revision of the API. If no value is provided, default revision 1 is created.
apiRevisionDescriptionstringDescription of the API Revision.
apiVersionstringIndicates the version identifier of the API if the API is versioned.
apiVersionDescriptionstringDescription of the API Version.
apiVersionSetobjectVersion set details.
apiVersionSetIdstringA resource identifier for the related ApiVersionSet.
authenticationSettingsobjectCollection of authentication settings included into this API.
contactobjectContact information for the API.
descriptionstringDescription of the API. May include HTML formatting tags.
displayNamestringAPI name. Must be 1 to 300 characters long.
isCurrentbooleanIndicates if API revision is current api revision.
isOnlinebooleanIndicates if API revision is accessible via the gateway.
licenseobjectLicense information for the API.
pathstringRelative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. Required.
protocolsarrayDescribes on which protocols the operations in this API can be invoked.
provisioningStatestringThe provisioning state.
serviceUrlstringAbsolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
sourceApiIdstringAPI identifier of the source API.
subscriptionKeyParameterNamesobjectProtocols over which API is made available.
subscriptionRequiredbooleanSpecifies whether an API or Product subscription is required for accessing the API.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
termsOfServiceUrlstringA URL to the Terms of Service for the API. MUST be in the format of a URL.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_serviceselectresource_group_name, service_name, gateway_id, subscription_id$filter, $top, $skipLists a collection of the APIs associated with a gateway.
create_or_updateinsertresource_group_name, service_name, gateway_id, api_id, subscription_idAdds an API to the specified Gateway.
create_or_updatereplaceresource_group_name, service_name, gateway_id, api_id, subscription_idAdds an API to the specified Gateway.
deletedeleteresource_group_name, service_name, gateway_id, api_id, subscription_idDeletes the specified API from the specified Gateway.
get_entity_tagexecresource_group_name, service_name, gateway_id, api_id, subscription_idChecks that API entity specified by identifier is associated with the Gateway entity.

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
api_idstringAPI identifier. Must be unique in the current API Management service instance. Required.
gateway_idstringGateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
service_namestringThe name of the API Management service. Required.
subscription_idstring
$filterstring| Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |. Default value is None.
$skipintegerNumber of records to skip. Default value is None.
$topintegerNumber of records to return. Default value is None.

SELECT examples

Lists a collection of the APIs associated with a gateway.

SELECT
id,
name,
apiRevision,
apiRevisionDescription,
apiVersion,
apiVersionDescription,
apiVersionSet,
apiVersionSetId,
authenticationSettings,
contact,
description,
displayName,
isCurrent,
isOnline,
license,
path,
protocols,
provisioningState,
serviceUrl,
sourceApiId,
subscriptionKeyParameterNames,
subscriptionRequired,
systemData,
termsOfServiceUrl,
type
FROM azure.api_management.gateway_api
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND gateway_id = '{{ gateway_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;

INSERT examples

Adds an API to the specified Gateway.

INSERT INTO azure.api_management.gateway_api (
properties,
resource_group_name,
service_name,
gateway_id,
api_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ gateway_id }}',
'{{ api_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Adds an API to the specified Gateway.

REPLACE azure.api_management.gateway_api
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND gateway_id = '{{ gateway_id }}' --required
AND api_id = '{{ api_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes the specified API from the specified Gateway.

DELETE FROM azure.api_management.gateway_api
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND gateway_id = '{{ gateway_id }}' --required
AND api_id = '{{ api_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Checks that API entity specified by identifier is associated with the Gateway entity.

EXEC azure.api_management.gateway_api.get_entity_tag 
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@gateway_id='{{ gateway_id }}' --required,
@api_id='{{ api_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;