Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions apimartifacts/apis/echo-api/apiInformation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"properties": {
"path": "echo",
"apiRevision": "1",
"authenticationSettings": {},
"isCurrent": true,
"displayName": "Echo API",
"protocols": [
"https"
],
"serviceUrl": "https://echo.playground.azure-api.net/api",
"subscriptionKeyParameterNames": {
"header": "Ocp-Apim-Subscription-Key",
"query": "subscription-key"
},
"subscriptionRequired": true
}
}
12 changes: 12 additions & 0 deletions apimartifacts/apis/echo-api/operations/create-resource/policy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<policies>
<inbound>
<base />
<json-to-xml apply="always" consider-accept-header="false" />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
</policies>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<policies>
<inbound>
<base />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
<set-header name="X-My-Sample" exists-action="override">
<value>This is a sample</value>
<!-- for multiple headers with the same name add additional value elements -->
</set-header>
<jsonp callback-parameter-name="ProcessResponse" />
</outbound>
</policies>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<policies>
<inbound>
<base />
<cache-lookup vary-by-developer="false" vary-by-developer-groups="false">
<vary-by-header>Accept</vary-by-header>
<vary-by-header>Accept-Charset</vary-by-header>
</cache-lookup>
<rewrite-uri template="/resource" />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
<cache-store duration="3600" />
</outbound>
</policies>
102 changes: 102 additions & 0 deletions apimartifacts/apis/echo-api/specification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
openapi: 3.0.1
info:
title: Echo API
version: '1.0'
servers:
- url: https://p-weu-apim-old.azure-api.net/echo
paths:
/resource:
get:
summary: Retrieve resource
description: A demonstration of a GET call on a sample resource. It is handled by an "echo" backend which returns a response equal to the request (the supplied headers and body are being returned as received).
operationId: retrieve-resource
parameters:
- name: param1
in: query
description: A sample parameter that is required and has a default value of "sample".
required: true
schema:
enum:
- sample
type: string
default: sample
- name: param2
in: query
description: 'Another sample parameter, set to not required.'
schema:
type: number
responses:
'200':
description: Returned in all cases.
put:
summary: Modify Resource
description: A demonstration of a PUT call handled by the same "echo" backend as above. You can now specify a request body in addition to headers and it will be returned as well.
operationId: modify-resource
responses:
'200':
description: ''
post:
summary: Create resource
description: A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend.
operationId: create-resource
requestBody:
content:
application/json:
example:
vehicleType: train
maxSpeed: 125
avgSpeed: 90
speedUnit: mph
responses:
'200':
description: ''
delete:
summary: Remove resource
description: A demonstration of a DELETE call which traditionally deletes the resource. It is based on the same "echo" backend as in all other operations so nothing is actually deleted.
operationId: remove-resource
responses:
'200':
description: ''
head:
summary: Retrieve header only
description: The HEAD operation returns only headers. In this demonstration a policy is used to set additional headers when the response is returned and to enable JSONP.
operationId: retrieve-header-only
responses:
'200':
description: ''
/resource-cached:
get:
summary: Retrieve resource (cached)
description: A demonstration of a GET call with caching enabled on the same "echo" backend as above. Cache TTL is set to 1 hour. When you make the first request the headers you supplied will be cached. Subsequent calls will return the same headers as the first time even if you change them in your request.
operationId: retrieve-resource-cached
parameters:
- name: param1
in: query
description: A sample parameter that is required and has a default value of "sample".
required: true
schema:
enum:
- sample
type: string
default: sample
- name: param2
in: query
description: 'Another sample parameter, set to not required.'
schema:
type: string
responses:
'200':
description: ''
components:
securitySchemes:
apiKeyHeader:
type: apiKey
name: Ocp-Apim-Subscription-Key
in: header
apiKeyQuery:
type: apiKey
name: subscription-key
in: query
security:
- apiKeyHeader: [ ]
- apiKeyQuery: [ ]
16 changes: 16 additions & 0 deletions apimartifacts/backends/apiops-demo/backendInformation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"properties": {
"credentials": {
"header": {},
"query": {}
},
"protocol": "http",
"resourceId": "https://management.azure.com/subscriptions/6a5e05c3-6e0d-453d-bed5-87d632cdc296/resourceGroups/p-weu-apim-backend/providers/Microsoft.Web/sites/p-weu-apim-apiopsdemo",
"tls": {
"validateCertificateChain": true,
"validateCertificateName": true
},
"type": "Single",
"url": "https://p-weu-apim-apiopsdemo.azurewebsites.net"
}
}
34 changes: 34 additions & 0 deletions apimartifacts/diagnostics/azuremonitor/diagnosticInformation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"properties": {
"loggerId": "/subscriptions/6a5e05c3-6e0d-453d-bed5-87d632cdc296/resourceGroups/p-weu-apim-old/providers/Microsoft.ApiManagement/service/p-weu-apim-old/loggers/azuremonitor",
"backend": {
"request": {
"dataMasking": {
"queryParams": [
{
"mode": "Hide",
"value": "*"
}
]
}
}
},
"frontend": {
"request": {
"dataMasking": {
"queryParams": [
{
"mode": "Hide",
"value": "*"
}
]
}
}
},
"logClientIp": true,
"sampling": {
"percentage": 100,
"samplingType": "fixed"
}
}
}
7 changes: 7 additions & 0 deletions apimartifacts/groups/administrators/groupInformation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"properties": {
"displayName": "Administrators",
"description": "Administrators is a built-in group containing the admin email account provided at the time of service creation. Its membership is managed by the system.",
"type": "system"
}
}
7 changes: 7 additions & 0 deletions apimartifacts/groups/developers/groupInformation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"properties": {
"displayName": "Developers",
"description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.",
"type": "system"
}
}
7 changes: 7 additions & 0 deletions apimartifacts/groups/guests/groupInformation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"properties": {
"displayName": "Guests",
"description": "Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.",
"type": "system"
}
}
6 changes: 6 additions & 0 deletions apimartifacts/loggers/azuremonitor/loggerInformation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"properties": {
"loggerType": "azureMonitor",
"isBuffered": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"properties": {
"displayName": "erlenndIP",
"secret": false,
"tags": [],
"value": "91.184.138.88"
}
}
17 changes: 17 additions & 0 deletions apimartifacts/policy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
IMPORTANT:
- Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.
- Only the <forward-request> policy element can appear within the <backend> section element.
- To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.
- To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.
- To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.
- To remove a policy, delete the corresponding policy statement from the policy document.
- Policies are applied in the order of their appearance, from the top down.
-->
<policies>
<inbound />
<backend>
<forward-request />
</backend>
<outbound />
</policies>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
29 changes: 29 additions & 0 deletions apimartifacts/products/starter/policy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
IMPORTANT:
- Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.
- Only the <forward-request> policy element can appear within the <backend> section element.
- To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.
- To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.
- To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.
- To remove a policy, delete the corresponding policy statement from the policy document.
- Position the <base> element within a section element to inherit all policies from the corresponding section element in the enclosing scope.
- Remove the <base> element to prevent inheriting policies from the corresponding section element in the enclosing scope.
- Policies are applied in the order of their appearance, from the top down.
-->
<policies>
<inbound>
<rate-limit calls="5" renewal-period="60" />
<quota calls="100" renewal-period="604800" />
<set-backend-service backend-id="apiops-demo" />
<base />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>
11 changes: 11 additions & 0 deletions apimartifacts/products/starter/productInformation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"properties": {
"displayName": "Starter",
"description": "Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.",
"approvalRequired": false,
"state": "published",
"subscriptionRequired": true,
"subscriptionsLimit": 1,
"terms": ""
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
10 changes: 10 additions & 0 deletions apimartifacts/products/unlimited/productInformation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"properties": {
"displayName": "Unlimited",
"description": "Subscribers have completely unlimited access to the API. Administrator approval is required.",
"approvalRequired": true,
"state": "published",
"subscriptionRequired": true,
"subscriptionsLimit": 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"properties": {
"scope": "/subscriptions/6a5e05c3-6e0d-453d-bed5-87d632cdc296/resourceGroups/p-weu-apim-old/providers/Microsoft.ApiManagement/service/p-weu-apim-old/products/starter",
"allowTracing": false,
"ownerId": "/subscriptions/6a5e05c3-6e0d-453d-bed5-87d632cdc296/resourceGroups/p-weu-apim-old/providers/Microsoft.ApiManagement/service/p-weu-apim-old/users/1",
"state": "active"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"properties": {
"scope": "/subscriptions/6a5e05c3-6e0d-453d-bed5-87d632cdc296/resourceGroups/p-weu-apim-old/providers/Microsoft.ApiManagement/service/p-weu-apim-old/products/unlimited",
"allowTracing": false,
"ownerId": "/subscriptions/6a5e05c3-6e0d-453d-bed5-87d632cdc296/resourceGroups/p-weu-apim-old/providers/Microsoft.ApiManagement/service/p-weu-apim-old/users/1",
"state": "active"
}
}