apis
Creates, updates, deletes, gets or lists an apis
resource.
Overview
Name | apis |
Type | Resource |
Id | azure.api_management.apis |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_tags
- list_by_service
The response body contains the specified API entity.
Name | Datatype | Description |
---|---|---|
properties | object | API entity contract properties. |
Lists a collection of TagResource entities.
Name | Datatype | Description |
---|---|---|
api | object | API associated with the tag. |
operation | object | Operation associated with the tag. |
product | object | Product associated with the tag. |
tag | object | Tag associated with the resource. |
Paged Result response of Apis.
Name | Datatype | Description |
---|---|---|
properties | object | API entity contract properties. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , serviceName , apiId , subscriptionId | Gets the details of the API specified by its identifier. | |
list_by_tags | select | resourceGroupName , serviceName , subscriptionId | $filter , $top , $skip , includeNotTaggedApis | Lists a collection of apis associated with tags. |
list_by_service | select | resourceGroupName , serviceName , subscriptionId | $filter , $top , $skip , tags , expandApiVersionSet | Lists all APIs of the API Management service instance. |
create_or_update | insert | resourceGroupName , serviceName , apiId , subscriptionId | If-Match | Creates new or updates existing specified API of the API Management service instance. |
update | update | resourceGroupName , serviceName , apiId , If-Match , subscriptionId | Updates the specified API of the API Management service instance. | |
delete | delete | resourceGroupName , serviceName , apiId , If-Match , subscriptionId | deleteRevisions | Deletes the specified API of the 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.
Name | Datatype | Description |
---|---|---|
If-Match | string | ETag 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. |
apiId | string | API 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. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
serviceName | string | The name of the API Management service. |
subscriptionId | string | The ID of the target subscription. |
$filter | string | | 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> |
$skip | integer (int32) | Number of records to skip. |
$top | integer (int32) | Number of records to return. |
If-Match | string | ETag of the Entity. Not required when creating an entity, but required when updating an entity. |
deleteRevisions | boolean | Delete all revisions of the Api. |
expandApiVersionSet | boolean | Include full ApiVersionSet resource in response |
includeNotTaggedApis | boolean | Include not tagged APIs. |
tags | string | Include tags in the response. |
SELECT
examples
- get
- list_by_tags
- list_by_service
Gets the details of the API specified by its identifier.
SELECT
properties
FROM azure.api_management.apis
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND apiId = '{{ apiId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Lists a collection of apis associated with tags.
SELECT
api,
operation,
product,
tag
FROM azure.api_management.apis
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
AND includeNotTaggedApis = '{{ includeNotTaggedApis }}'
;
Lists all APIs of the API Management service instance.
SELECT
properties
FROM azure.api_management.apis
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
AND tags = '{{ tags }}'
AND expandApiVersionSet = '{{ expandApiVersionSet }}'
;
INSERT
examples
- create_or_update
- Manifest
Creates new or updates existing specified API of the API Management service instance.
INSERT INTO azure.api_management.apis (
data__properties,
resourceGroupName,
serviceName,
apiId,
subscriptionId,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ apiId }}',
'{{ subscriptionId }}',
'{{ If-Match }}'
RETURNING
properties
;
# Description fields are for documentation purposes
- name: apis
props:
- name: resourceGroupName
value: string
description: Required parameter for the apis resource.
- name: serviceName
value: string
description: Required parameter for the apis resource.
- name: apiId
value: string
description: Required parameter for the apis resource.
- name: subscriptionId
value: string
description: Required parameter for the apis resource.
- name: properties
value: object
description: |
API entity create of update properties.
- name: If-Match
value: string
description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
UPDATE
examples
- update
Updates the specified API of the API Management service instance.
UPDATE azure.api_management.apis
SET
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND apiId = '{{ apiId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
properties;
DELETE
examples
- delete
Deletes the specified API of the API Management service instance.
DELETE FROM azure.api_management.apis
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND apiId = '{{ apiId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND deleteRevisions = '{{ deleteRevisions }}'
;