Pflickin/plat (#4)
* Backend deployment details. * Add distributed image and charts. * Add examples, API mgmt, and backend infra. * Modified. * Remove specifics.
This commit is contained in:
Родитель
0f26a478d0
Коммит
4af3ed0509
|
@ -0,0 +1,53 @@
|
|||
# Azure API Management Service
|
||||
Azure API Management is used to provide access to your API. It also can provide API documentation, monetary features, and additional security.
|
||||
|
||||
## Deployment
|
||||
Unfortunately, Azure API Management does not have an Azure CLI extension. While PowerShell and the Azure Portal can be used to deploy, Azure Resource Template deployment options are supplied here.
|
||||
|
||||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fazure%2Fazure-quickstart-templates%2Fmaster%2F101-azure-api-management-create%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://azuredeploy.net/deploybutton.png"/>
|
||||
</a>
|
||||
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-azure-api-management-create%2Fazuredeploy.json" target="_blank">
|
||||
<img src="http://armviz.io/visualizebutton.png"/>
|
||||
</a>
|
||||
|
||||
This template deploys an Azure API Management instance, based on the configuration values that you provide during setup.
|
||||
|
||||
## Update the API Management Service with API Platform Scripts
|
||||
There are no commands to easily import custom policies into Azure API Management. The easiest way to get started with the custom API Platform policies are to clone the default API Management repo, modify it, push the changes, and refresh the service. This is only needed if you will be responding to asynchonous (long-running) requests (eg. using the task management system). The sample API Management service demonstrates how to call a synchonous API, asynchonous API, and the task manager.
|
||||
|
||||
After your Azure API Management instance is created, click on the "Repository" menu item, then click "Save to repository." You're now ready to clone and modify the instance.
|
||||
1. Within the "Repository" page, copy the "Repository URL."
|
||||
2. In a git command prompt or a shell, run the following command:
|
||||
```bash
|
||||
git clone <replace_with_your_repositiory_url>
|
||||
```
|
||||
3. Within the "Repository" page, click on "Access credentials."
|
||||
4. Click on "Generate" to generate a password and copy it.
|
||||
5. In your shell, type "apim" for the username and paste the password when requested.
|
||||
|
||||
Once cloned, open the newly created folder in your editor.
|
||||
1. Replace the following placeholders with real values.
|
||||
- [POST__detect.xml](./api-management/policies/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/operations/POST__detect.xml)
|
||||
- [GET__task_{taskId}.xml](./management/policies/apis/Task_Management__1[Current]/operations/GET__task_{taskId}.xml)
|
||||
- [Camera_Trap_Animal_DetectiA36G2G.xml](./api-management/policies/apis/Camera_Trap_Animal_DetectiA36G2G.xml)
|
||||
- [Camera_Trap_Batch_Animal_D1RIJ6XN.xml](/api-management/policies/apis/Camera_Trap_Batch_Animal_D1RIJ6XN.xml)
|
||||
|
||||
Values to replace:
|
||||
- REPLACE_WITH_AKS_IP - replace with the result of the following:
|
||||
## Target AKS Backend
|
||||
```bash
|
||||
# Get the IP address of the ingress gateway.
|
||||
kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
|
||||
```
|
||||
- REPLACE_WITH_GET_URL
|
||||
- REPLACE_WITH_UPSERT_URL
|
||||
|
||||
Deploy the changes to your API Management instance.
|
||||
1. Replace all of the folders with the folders located at [api-management](./api-management).
|
||||
2. Commit and push the changes to your API Management Service repo.
|
||||
3. Within the "Repository" page, click on "Deploy to API Management."
|
||||
|
||||
You should now have the sync and async examples in your instance of API Management. Modify the examples to correspond to your APIs. For instance, change the
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
API for detecting animals in camera trap images, supporting up to 8 images in a single call.
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"components": {
|
||||
"schemas": {
|
||||
"body": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"image_id_1": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Model_versionGet200TextPlainResponse": {
|
||||
"type": "string",
|
||||
"example": "models/object_detection/faster_rcnn_inception_resnet_v2_atrous/megadetector"
|
||||
},
|
||||
"DetectPost200MultipartForm-dataResponse": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
{
|
||||
"id": "/apis/camera-trap-animal-detection-synchronous",
|
||||
"name": "Camera Trap Animal Detection (synchronous)",
|
||||
"apiRevision": "1",
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Animal_DetectiA36G2G/api.description.html",
|
||||
"subscriptionRequired": true,
|
||||
"serviceUrl": null,
|
||||
"path": "",
|
||||
"protocols": [
|
||||
"https"
|
||||
],
|
||||
"authenticationSettings": {
|
||||
"oAuth2": null,
|
||||
"openid": null
|
||||
},
|
||||
"subscriptionKeyParameterNames": {
|
||||
"header": "Ocp-Apim-Subscription-Key",
|
||||
"query": "subscription-key"
|
||||
},
|
||||
"isCurrent": true,
|
||||
"operations": [
|
||||
{
|
||||
"id": "/apis/camera-trap-animal-detection-synchronous/operations/post-detect",
|
||||
"name": "Processes the input image(s) using the detection model.",
|
||||
"method": "POST",
|
||||
"urlTemplate": "/detect",
|
||||
"templateParameters": [],
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Animal_DetectiA36G2G/operations/POST__detect.description.html",
|
||||
"request": {
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Animal_DetectiA36G2G/operations/POST__detect.request.html",
|
||||
"queryParameters": [
|
||||
{
|
||||
"name": "confidence",
|
||||
"description": "The threshold above which a proposed bounding box is considered a detection. Set it to a low value such as 0.05 if you would like to receive all condidate boxes and try different thresholds. If you would like to receive the annotated images (by setting `render` to true) in the result, use a higher threshold for clearer visualizations.",
|
||||
"type": "integer",
|
||||
"values": []
|
||||
},
|
||||
{
|
||||
"name": "render",
|
||||
"description": "If true, the endpoint will return all input images annotated with detection bounding boxes with confidence above the `confidence` threshold, in addition to the json result.",
|
||||
"type": "boolean",
|
||||
"defaultValue": "false",
|
||||
"values": []
|
||||
}
|
||||
],
|
||||
"headers": [],
|
||||
"representations": [
|
||||
{
|
||||
"contentType": "multipart/form-data"
|
||||
}
|
||||
]
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"statusCode": 200,
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Animal_DetectiA36G2G/operations/POST__detect.response.200.description.html",
|
||||
"representations": [
|
||||
{
|
||||
"contentType": "multipart/form-data"
|
||||
}
|
||||
],
|
||||
"headers": []
|
||||
},
|
||||
{
|
||||
"statusCode": 400,
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Animal_DetectiA36G2G/operations/POST__detect.response.400.description.html",
|
||||
"representations": [],
|
||||
"headers": []
|
||||
},
|
||||
{
|
||||
"statusCode": 413,
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Animal_DetectiA36G2G/operations/POST__detect.response.413.description.html",
|
||||
"representations": [],
|
||||
"headers": []
|
||||
},
|
||||
{
|
||||
"statusCode": 500,
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Animal_DetectiA36G2G/operations/POST__detect.response.500.description.html",
|
||||
"representations": [],
|
||||
"headers": []
|
||||
}
|
||||
],
|
||||
"policies": null
|
||||
},
|
||||
{
|
||||
"id": "/apis/camera-trap-animal-detection-synchronous/operations/get-model_version",
|
||||
"name": "Returns the detector model version.",
|
||||
"method": "GET",
|
||||
"urlTemplate": "/model_version",
|
||||
"templateParameters": [],
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Animal_DetectiA36G2G/operations/GET__model_version.description.html",
|
||||
"request": {
|
||||
"queryParameters": [],
|
||||
"headers": [],
|
||||
"representations": []
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"statusCode": 200,
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Animal_DetectiA36G2G/operations/GET__model_version.response.200.description.html",
|
||||
"representations": [
|
||||
{
|
||||
"contentType": "text/plain",
|
||||
"schemaId": "5d694999e546f10c0ca9ab4b",
|
||||
"typeName": "Model_versionGet200TextPlainResponse"
|
||||
}
|
||||
],
|
||||
"headers": []
|
||||
}
|
||||
],
|
||||
"policies": null
|
||||
}
|
||||
],
|
||||
"apiSchemas": [
|
||||
{
|
||||
"id": "/apis/camera-trap-animal-detection-synchronous/schemas/5d694999e546f10c0ca9ab4b",
|
||||
"contentType": "application/vnd.oai.openapi.components+json",
|
||||
"$ref-documentValue": "api-management/apis/Camera_Trap_Animal_DetectiA36G2G/apiSchemas/5d694999e546f10c0ca9ab4b.document"
|
||||
}
|
||||
],
|
||||
"$ref-policy": "api-management/policies/apis/Camera_Trap_Animal_DetectiA36G2G.xml",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
Returns a string indicating the version of the model currently used by
|
||||
this API.
|
|
@ -0,0 +1 @@
|
|||
A string indicating the version of the model used.
|
|
@ -0,0 +1 @@
|
|||
Processes up to 8 images supplied as data using the animal detection model. The resulting bounding boxes, confidences and (optionally) annotated images are returned.
|
|
@ -0,0 +1,35 @@
|
|||
- Please send up to 8 images to be processed as files in a multipart form.
|
||||
|
||||
- The keys (`image_name` in the following example) in the files dictionary should be unique identifiers of the images, as the returned result will also be keyed by these.
|
||||
|
||||
- Make sure to set the content media type correctly for each file, as only files of the accepted types will be processed.
|
||||
|
||||
- The accepted image types are `image/jpeg`, `image/png`, `application/octet-stream`. Please send jpeg images of usual camera trap images size (500KB - 4MB).
|
||||
|
||||
For example, in Python:
|
||||
```
|
||||
import requests
|
||||
import os
|
||||
|
||||
num_images_to_upload = 3
|
||||
params = {
|
||||
'confidence': 0.8,
|
||||
'render': True
|
||||
}
|
||||
|
||||
files = {}
|
||||
num_images = 0
|
||||
for i, image_name in enumerate(sorted(os.listdir(sample_input_dir))):
|
||||
if not image_name.lower().endswith('.jpg'):
|
||||
continue
|
||||
|
||||
if num_images >= num_images_to_upload:
|
||||
break
|
||||
else:
|
||||
num_images += 1
|
||||
|
||||
img_path = os.path.join(sample_input_dir, image_name)
|
||||
files[image_name] = (image_name, open(img_path, 'rb'), 'image/jpeg')
|
||||
|
||||
r = requests.post(base_url + 'detect', params=params, files=files)
|
||||
```
|
|
@ -0,0 +1,50 @@
|
|||
Images are successfully processed. The detection bounding boxes and their confidences will be returned in a json, in addition to annotated image files if `render` was true. Since multiple objects of different types may be returned, the response is encoded using `requests_toolbelt.multipart.encoder.MultipartEncoder`.
|
||||
|
||||
Here is an example of how you can parse the result in Python:
|
||||
```
|
||||
import os
|
||||
import json
|
||||
from requests_toolbelt.multipart import decoder
|
||||
from PIL import Image
|
||||
|
||||
results = decoder.MultipartDecoder.from_response(r)
|
||||
|
||||
text_results = {}
|
||||
images = {}
|
||||
for part in results.parts:
|
||||
# part is a BodyPart object with b'Content-Type', and b'Content-Disposition', the later includes 'name' and 'filename' info
|
||||
headers = {}
|
||||
for k, v in part.headers.items():
|
||||
headers[k.decode(part.encoding)] = v.decode(part.encoding)
|
||||
if headers.get('Content-Type', None) == 'image/jpeg':
|
||||
c = headers.get('Content-Disposition')
|
||||
image_name = c.split('name="')[1].split('"')[0] # this is an HTTP string; you can parse it more elegantly using a library
|
||||
image = Image.open(io.BytesIO(part.content))
|
||||
|
||||
images[image_name] = image
|
||||
|
||||
elif headers.get('Content-Type', None) == 'application/json':
|
||||
text_result = json.loads(part.content.decode())
|
||||
|
||||
for img_name, img in sorted(images.items()):
|
||||
img.save(img_name + '.jpg')
|
||||
```
|
||||
`text_result` looks like this:
|
||||
```
|
||||
{
|
||||
'S1_D04_R6_PICT0022.JPG': [[0.011515299789607525,
|
||||
0.11399328708648682,
|
||||
0.9100480079650879,
|
||||
1.0,
|
||||
0.9953194260597229,
|
||||
1]],
|
||||
'S1_D04_R6_PICT0128.JPG': [[0.5885017514228821,
|
||||
0.019416160881519318,
|
||||
0.6662894487380981,
|
||||
0.16861802339553833,
|
||||
0.8873217105865479,
|
||||
2]],
|
||||
'S1_D04_R6_PICT0129.JPG': []
|
||||
}
|
||||
```
|
||||
where the keys are the unique image identifier that you specified for each image in the request body. The value is an array containing the detections above `confidence` that were found. The array is empty if no animals/persons/vehicles are detected above the confidence threshold. Each detection is an array also, `[ymin, xmin, ymax, xmax, confidence, category]`, where the first four floats are the _relative_ coordinates of the bounding box.
|
|
@ -0,0 +1,3 @@
|
|||
No image(s) of accepted types (image/jpeg, image/png,
|
||||
application/octet-stream) received, or the `confidence` parameter is
|
||||
not a float between 0 and 1.
|
|
@ -0,0 +1,2 @@
|
|||
More than 8 images are sent, or the total size of uploaded content is too
|
||||
big.
|
|
@ -0,0 +1,3 @@
|
|||
Error occurred reading the images, performing detection on the
|
||||
images, consolidating the results or drawing annotations (if
|
||||
requested). See the error message to diagnose the issue.
|
|
@ -0,0 +1 @@
|
|||
API for detecting animals in camera trap images by batch.
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"components": {
|
||||
"schemas": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
{
|
||||
"id": "/apis/camera-trap-batch-animal-detection-asynchronous",
|
||||
"name": "Camera Trap Batch Animal Detection (asynchronous)",
|
||||
"apiRevision": "1",
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/api.description.html",
|
||||
"subscriptionRequired": true,
|
||||
"serviceUrl": null,
|
||||
"path": "v1/camera-trap/detection-async",
|
||||
"protocols": [
|
||||
"https"
|
||||
],
|
||||
"authenticationSettings": {
|
||||
"oAuth2": null,
|
||||
"openid": null
|
||||
},
|
||||
"subscriptionKeyParameterNames": {
|
||||
"header": "Ocp-Apim-Subscription-Key",
|
||||
"query": "subscription-key"
|
||||
},
|
||||
"isCurrent": true,
|
||||
"operations": [
|
||||
{
|
||||
"id": "/apis/camera-trap-batch-animal-detection-asynchronous/operations/post-detect",
|
||||
"name": "Processes the input image(s) using the detection model.",
|
||||
"method": "POST",
|
||||
"urlTemplate": "/detect",
|
||||
"templateParameters": [],
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/operations/POST__detect.description.html",
|
||||
"request": {
|
||||
"$ref-description": "",
|
||||
"queryParameters": [
|
||||
{
|
||||
"name": "confidence",
|
||||
"description": "The threshold above which a proposed bounding box is considered a detection. Set it to a low value such as 0.05 if you would like to receive all condidate boxes and try different thresholds. If you would like to receive the annotated images (by setting `render` to true) in the result, use a higher threshold for clearer visualizations.",
|
||||
"type": "integer",
|
||||
"values": []
|
||||
},
|
||||
{
|
||||
"name": "render",
|
||||
"description": "If true, the endpoint will return all input images annotated with detection bounding boxes with confidence above the `confidence` threshold, in addition to the json result.",
|
||||
"type": "boolean",
|
||||
"defaultValue": "false",
|
||||
"values": []
|
||||
}
|
||||
],
|
||||
"headers": [],
|
||||
"representations": []
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"statusCode": 200,
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/operations/POST__detect.response.200.description.html",
|
||||
"representations": [
|
||||
{
|
||||
"contentType": "multipart/form-data"
|
||||
}
|
||||
],
|
||||
"headers": []
|
||||
},
|
||||
{
|
||||
"statusCode": 400,
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/operations/POST__detect.response.400.description.html",
|
||||
"representations": [],
|
||||
"headers": []
|
||||
},
|
||||
{
|
||||
"statusCode": 413,
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/operations/POST__detect.response.413.description.html",
|
||||
"representations": [],
|
||||
"headers": []
|
||||
},
|
||||
{
|
||||
"statusCode": 500,
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/operations/POST__detect.response.500.description.html",
|
||||
"representations": [],
|
||||
"headers": []
|
||||
}
|
||||
],
|
||||
"policies": null,
|
||||
"$ref-policy": "api-management/policies/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/operations/POST__detect.xml"
|
||||
},
|
||||
{
|
||||
"id": "/apis/camera-trap-batch-animal-detection-asynchronous/operations/get-model_version",
|
||||
"name": "Returns the detector model version.",
|
||||
"method": "GET",
|
||||
"urlTemplate": "/model_version",
|
||||
"templateParameters": [],
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/operations/GET__model_version.description.html",
|
||||
"request": {
|
||||
"queryParameters": [],
|
||||
"headers": [],
|
||||
"representations": []
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"statusCode": 200,
|
||||
"$ref-description": "api-management/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/operations/GET__model_version.response.200.description.html",
|
||||
"representations": [
|
||||
{
|
||||
"contentType": "text/plain",
|
||||
"schemaId": "5d697be6e546f10c0ca9ab5f"
|
||||
}
|
||||
],
|
||||
"headers": []
|
||||
}
|
||||
],
|
||||
"policies": null
|
||||
}
|
||||
],
|
||||
"apiSchemas": [
|
||||
{
|
||||
"id": "/apis/camera-trap-batch-animal-detection-asynchronous/schemas/5d697be6e546f10c0ca9ab5f",
|
||||
"contentType": "application/vnd.oai.openapi.components+json",
|
||||
"$ref-documentValue": "api-management/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/apiSchemas/5d697be6e546f10c0ca9ab5f.document"
|
||||
}
|
||||
],
|
||||
"$ref-policy": "api-management/policies/apis/Camera_Trap_Batch_Animal_D1RIJ6XN.xml",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
Returns a string indicating the version of the model currently used by
|
||||
this API.
|
|
@ -0,0 +1 @@
|
|||
A string indicating the version of the model used.
|
|
@ -0,0 +1 @@
|
|||
Processes up to 8 images supplied as data using the animal detection model. The resulting bounding boxes, confidences and (optionally) annotated images are returned.
|
|
@ -0,0 +1,50 @@
|
|||
Images are successfully processed. The detection bounding boxes and their confidences will be returned in a json, in addition to annotated image files if `render` was true. Since multiple objects of different types may be returned, the response is encoded using `requests_toolbelt.multipart.encoder.MultipartEncoder`.
|
||||
|
||||
Here is an example of how you can parse the result in Python:
|
||||
```
|
||||
import os
|
||||
import json
|
||||
from requests_toolbelt.multipart import decoder
|
||||
from PIL import Image
|
||||
|
||||
results = decoder.MultipartDecoder.from_response(r)
|
||||
|
||||
text_results = {}
|
||||
images = {}
|
||||
for part in results.parts:
|
||||
# part is a BodyPart object with b'Content-Type', and b'Content-Disposition', the later includes 'name' and 'filename' info
|
||||
headers = {}
|
||||
for k, v in part.headers.items():
|
||||
headers[k.decode(part.encoding)] = v.decode(part.encoding)
|
||||
if headers.get('Content-Type', None) == 'image/jpeg':
|
||||
c = headers.get('Content-Disposition')
|
||||
image_name = c.split('name="')[1].split('"')[0] # this is an HTTP string; you can parse it more elegantly using a library
|
||||
image = Image.open(io.BytesIO(part.content))
|
||||
|
||||
images[image_name] = image
|
||||
|
||||
elif headers.get('Content-Type', None) == 'application/json':
|
||||
text_result = json.loads(part.content.decode())
|
||||
|
||||
for img_name, img in sorted(images.items()):
|
||||
img.save(img_name + '.jpg')
|
||||
```
|
||||
`text_result` looks like this:
|
||||
```
|
||||
{
|
||||
'S1_D04_R6_PICT0022.JPG': [[0.011515299789607525,
|
||||
0.11399328708648682,
|
||||
0.9100480079650879,
|
||||
1.0,
|
||||
0.9953194260597229,
|
||||
1]],
|
||||
'S1_D04_R6_PICT0128.JPG': [[0.5885017514228821,
|
||||
0.019416160881519318,
|
||||
0.6662894487380981,
|
||||
0.16861802339553833,
|
||||
0.8873217105865479,
|
||||
2]],
|
||||
'S1_D04_R6_PICT0129.JPG': []
|
||||
}
|
||||
```
|
||||
where the keys are the unique image identifier that you specified for each image in the request body. The value is an array containing the detections above `confidence` that were found. The array is empty if no animals/persons/vehicles are detected above the confidence threshold. Each detection is an array also, `[ymin, xmin, ymax, xmax, confidence, category]`, where the first four floats are the _relative_ coordinates of the bounding box.
|
|
@ -0,0 +1,3 @@
|
|||
No image(s) of accepted types (image/jpeg, image/png,
|
||||
application/octet-stream) received, or the `confidence` parameter is
|
||||
not a float between 0 and 1.
|
|
@ -0,0 +1,2 @@
|
|||
More than 8 images are sent, or the total size of uploaded content is too
|
||||
big.
|
|
@ -0,0 +1,3 @@
|
|||
Error occurred reading the images, performing detection on the
|
||||
images, consolidating the results or drawing annotations (if
|
||||
requested). See the error message to diagnose the issue.
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"id": "/apis/task-management",
|
||||
"name": "Task Management",
|
||||
"apiRevision": "1",
|
||||
"$ref-description": "",
|
||||
"subscriptionRequired": true,
|
||||
"serviceUrl": null,
|
||||
"path": "taskmanagement",
|
||||
"protocols": [
|
||||
"https"
|
||||
],
|
||||
"authenticationSettings": {
|
||||
"oAuth2": null,
|
||||
"openid": null
|
||||
},
|
||||
"subscriptionKeyParameterNames": {
|
||||
"header": "Ocp-Apim-Subscription-Key",
|
||||
"query": "subscription-key"
|
||||
},
|
||||
"isCurrent": true,
|
||||
"operations": [
|
||||
{
|
||||
"id": "/apis/task-management/operations/task",
|
||||
"name": "task",
|
||||
"method": "GET",
|
||||
"urlTemplate": "/task/{taskId}",
|
||||
"templateParameters": [
|
||||
{
|
||||
"name": "taskId",
|
||||
"type": "",
|
||||
"required": true,
|
||||
"values": []
|
||||
}
|
||||
],
|
||||
"$ref-description": "",
|
||||
"request": {
|
||||
"queryParameters": [],
|
||||
"headers": [],
|
||||
"representations": []
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"statusCode": 200,
|
||||
"$ref-description": "",
|
||||
"representations": [],
|
||||
"headers": []
|
||||
}
|
||||
],
|
||||
"policies": null,
|
||||
"$ref-policy": "api-management/policies/apis/Task_Management__1[Current]/operations/GET__task_{taskId}.xml"
|
||||
}
|
||||
],
|
||||
"apiSchemas": [],
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"settings": {
|
||||
"RegistrationEnabled": "True",
|
||||
"UserRegistrationTerms": null,
|
||||
"UserRegistrationTermsEnabled": "False",
|
||||
"UserRegistrationTermsConsentRequired": "False",
|
||||
"DelegationEnabled": "False",
|
||||
"DelegationUrl": "",
|
||||
"DelegatedSubscriptionEnabled": "False"
|
||||
},
|
||||
"$ref-policy": "api-management/policies/global.xml",
|
||||
"IntegrationModuleVersion": "15",
|
||||
"IntegrationModuleBitsVersion": "0.11.805.0",
|
||||
"ExportDate": "2019-08-30T23:54:38.1421862Z",
|
||||
"SupportedPreviousBitsVersions": [
|
||||
14
|
||||
]
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "Administrators",
|
||||
"$ref-description": "api-management/groups/Administrators/description.html",
|
||||
"builtIn": true,
|
||||
"type": "system",
|
||||
"externalId": null,
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "Developers",
|
||||
"$ref-description": "api-management/groups/Developers/description.html",
|
||||
"builtIn": true,
|
||||
"type": "system",
|
||||
"externalId": null,
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "Guests",
|
||||
"$ref-description": "api-management/groups/Guests/description.html",
|
||||
"builtIn": true,
|
||||
"type": "system",
|
||||
"externalId": null,
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.
|
|
@ -0,0 +1,27 @@
|
|||
<!--
|
||||
IMPORTANT:
|
||||
- Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.
|
||||
- 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, place the cursor at the desired insertion point and select a policy from the sidebar.
|
||||
- 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.
|
||||
- Comments within policy elements are not supported and may disappear. Place your comments between policy elements or at a higher level scope.
|
||||
-->
|
||||
<policies>
|
||||
<inbound>
|
||||
<base />
|
||||
<set-backend-service base-url="http://52.168.126.148/v1/camera-trap/detection-sync" />
|
||||
</inbound>
|
||||
<backend>
|
||||
<base />
|
||||
</backend>
|
||||
<outbound>
|
||||
<base />
|
||||
</outbound>
|
||||
<on-error>
|
||||
<base />
|
||||
</on-error>
|
||||
</policies>
|
|
@ -0,0 +1,27 @@
|
|||
<!--
|
||||
IMPORTANT:
|
||||
- Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.
|
||||
- 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, place the cursor at the desired insertion point and select a policy from the sidebar.
|
||||
- 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.
|
||||
- Comments within policy elements are not supported and may disappear. Place your comments between policy elements or at a higher level scope.
|
||||
-->
|
||||
<policies>
|
||||
<inbound>
|
||||
<base />
|
||||
<set-backend-service base-url="http://52.168.126.148/v1/camera-trap/detection-async" />
|
||||
</inbound>
|
||||
<backend>
|
||||
<base />
|
||||
</backend>
|
||||
<outbound>
|
||||
<base />
|
||||
</outbound>
|
||||
<on-error>
|
||||
<base />
|
||||
</on-error>
|
||||
</policies>
|
|
@ -0,0 +1,60 @@
|
|||
<!--
|
||||
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>
|
||||
<set-backend-service base-url="REPLACE_WITH_AKS_IP" />
|
||||
<rewrite-uri template="/camera-trap/detection-async" />
|
||||
<send-request mode="new" response-variable-name="task" ignore-error="false">
|
||||
<set-url>@{
|
||||
var baseUrl = "REPLACE_WITH_UPSERT_URL";
|
||||
return baseUrl;
|
||||
}</set-url>
|
||||
<set-method>POST</set-method>
|
||||
<set-body>@{
|
||||
Uri origUri = new Uri(context.Request.Url.ToString());
|
||||
var data = context.Request.Body != null ? context.Request.Body.As<JObject>() : new JObject();
|
||||
|
||||
var e = new JObject();
|
||||
e.Add("Status", "created");
|
||||
e.Add("BackendStatus", "created");
|
||||
e.Add("Endpoint", origUri.AbsoluteUri);
|
||||
e.Add("Body", data.ToString(Newtonsoft.Json.Formatting.None));
|
||||
e.Add("PublishToGrid", true);
|
||||
|
||||
return e.ToString(Newtonsoft.Json.Formatting.None);
|
||||
}</set-body>
|
||||
</send-request>
|
||||
<choose>
|
||||
<when condition="@(context.Variables.ContainsKey("task"))">
|
||||
<set-variable name="task_info" value="@(((IResponse)context.Variables["task"]).Body.As<JObject>())" />
|
||||
<return-response>
|
||||
<set-status code="200" />
|
||||
<set-body>@(((JObject)(context.Variables["task_info"])).ToString())</set-body>
|
||||
</return-response>
|
||||
</when>
|
||||
<otherwise>
|
||||
<return-response>
|
||||
<set-status code="500" />
|
||||
<set-body>Task insert failed.</set-body>
|
||||
</return-response>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</inbound>
|
||||
<backend />
|
||||
<outbound>
|
||||
<base />
|
||||
</outbound>
|
||||
<on-error>
|
||||
<base />
|
||||
</on-error>
|
||||
</policies>
|
|
@ -0,0 +1,33 @@
|
|||
<!--
|
||||
IMPORTANT:
|
||||
- Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.
|
||||
- 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, place the cursor at the desired insertion point and select a policy from the sidebar.
|
||||
- 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.
|
||||
- Comments within policy elements are not supported and may disappear. Place your comments between policy elements or at a higher level scope.
|
||||
-->
|
||||
<policies>
|
||||
<inbound>
|
||||
<send-request response-variable-name="context.Response" ignore-error="false">
|
||||
<set-url>@{
|
||||
var baseUrl = "REPLACE_WITH_GET_URL";
|
||||
return baseUrl + "&taskId=" + context.Request.MatchedParameters["taskId"];
|
||||
}</set-url>
|
||||
<set-method>GET</set-method>
|
||||
</send-request>
|
||||
<return-response response-variable-name="context.Response" />
|
||||
</inbound>
|
||||
<backend>
|
||||
<base />
|
||||
</backend>
|
||||
<outbound>
|
||||
<base />
|
||||
</outbound>
|
||||
<on-error>
|
||||
<base />
|
||||
</on-error>
|
||||
</policies>
|
|
@ -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>
|
|
@ -0,0 +1,25 @@
|
|||
<!--
|
||||
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" />
|
||||
<base />
|
||||
</inbound>
|
||||
<backend>
|
||||
<base />
|
||||
</backend>
|
||||
<outbound>
|
||||
<base />
|
||||
</outbound>
|
||||
</policies>
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"$ref-Production": "api-management/portalStyles/Production.css",
|
||||
"$ref-Template": null,
|
||||
"$ref-Preview": "api-management/portalStyles/Preview.css",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "ApiList",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/ApiList/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
{% if filtering.availableTags %}
|
||||
<filter-control class="pull-right"></filter-control>
|
||||
{% else %}
|
||||
<search-control class="pull-right"></search-control>
|
||||
{% endif %}
|
||||
|
||||
<h2>
|
||||
{% localized "ApisStrings|PageTitleApis" %}
|
||||
</h2>
|
||||
|
||||
{% if apis.size > 0 %}
|
||||
<ul class="list-unstyled">
|
||||
{% assign previousVersionSetId = "" %}
|
||||
|
||||
{% for api in apis %}
|
||||
{% if api.apiVersionSet %}
|
||||
{% if api.apiVersionSet.id != previousVersionSetId %}
|
||||
{% if previousVersionSetId == "" %}
|
||||
<li>
|
||||
<h3>{{api.apiVersionSet.name}}</h3>
|
||||
{{ api.apiVersionSet.description }}
|
||||
<ul class="list-unstyled list-indented">
|
||||
<li>
|
||||
<a href="/docs/services/{{api.id}}">{{api.apiVersion | default: "Original" }}</a>
|
||||
{% if api.IsSoap %}
|
||||
<span class="badge badge-soap"> </span>
|
||||
{% endif %}
|
||||
{{api.description}}
|
||||
</li>
|
||||
{% else %}
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h3>{{api.apiVersionSet.name}}</h3>
|
||||
{{ api.apiVersionSet.description }}
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/docs/services/{{api.id}}">{{api.apiVersion | default: "Original" }}</a>
|
||||
{% if api.IsSoap %}
|
||||
<span class="badge badge-soap"> </span>
|
||||
{% endif %}
|
||||
{{api.description}}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="/docs/services/{{api.id}}">{{api.apiVersion | default: "Original" }}</a>
|
||||
{% if api.IsSoap %}
|
||||
<span class="badge badge-soap"> </span>
|
||||
{% endif %}
|
||||
{{api.description}}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% assign previousVersionSetId = api.apiVersionSet.id %}
|
||||
{% else %}
|
||||
{% if previousVersionSetId != "" %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<h3>
|
||||
<a href="/docs/services/{{api.id}}">{{api.name}}</a>
|
||||
{% if api.IsSoap %}
|
||||
<span class="badge badge-soap"> </span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
{{api.description}}
|
||||
</li>
|
||||
{% assign previousVersionSetId = "" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<paging-control></paging-control>
|
||||
{% else %}
|
||||
{% localized "CommonResources|NoItemsToDisplay" %}
|
||||
{% endif %}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "ApiListGrouped",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/ApiListGrouped/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
<filter-control class="pull-right"></filter-control>
|
||||
|
||||
<h2>
|
||||
{% localized "ApisStrings|PageTitleApis" %}
|
||||
</h2>
|
||||
|
||||
{% if tagGroups.size > 0 %}
|
||||
<ul class="list-unstyled">
|
||||
{% for tagGroup in tagGroups %}
|
||||
<li>
|
||||
<h3>{{ tagGroup.name }}</h3>
|
||||
<ul class="list-unstyled list-indented">
|
||||
{% for versionGroup in tagGroup.versionGroups %}
|
||||
<li>
|
||||
{% if versionGroup.isVersioned %}
|
||||
<h4>{{ versionGroup.name }}</h4>
|
||||
|
||||
{% if versionGroup.description %}
|
||||
<p>{{ versionGroup.description }}</p>
|
||||
{% endif %}
|
||||
|
||||
<ul class="list-unstyled list-indented">
|
||||
{% for api in versionGroup.apis %}
|
||||
<li>
|
||||
<a href="/docs/services/{{api.id}}">{{ api.apiVersion | default: "Original" }}</a>
|
||||
{% if api.IsSoap %}
|
||||
<span class="badge badge-soap"> </span>
|
||||
{% endif %}
|
||||
{{api.description}}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<h4><a href="/docs/services/{{versionGroup.apis[0].id}}">{{ versionGroup.apis[0].name }}</a></h4>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<paging-control></paging-control>
|
||||
|
||||
{% else %}
|
||||
{% localized "CommonResources|NoItemsToDisplay" %}
|
||||
{% endif %}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "AppList",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/AppList/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<h2>{% localized "AppStrings|WebApplicationsHeader" %}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% if applications.size > 0 %}
|
||||
<ul class="list-unstyled">
|
||||
{% for app in applications %}
|
||||
<li>
|
||||
{% if app.application.icon.url != "" %}
|
||||
<aside>
|
||||
<a href="/applications/details/{{app.application.id}}"><img src="{{app.application.icon.url}}" alt="App Icon" /></a>
|
||||
</aside>
|
||||
{% endif %}
|
||||
<h3><a href="/applications/details/{{app.application.id}}">{{app.application.title}}</a></h3>
|
||||
{{app.application.description}}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<paging-control></paging-control>
|
||||
{% else %}
|
||||
{% localized "CommonResources|NoItemsToDisplay" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "AppView",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/AppView/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
<h2>{{title}}</h2>
|
||||
{% if icon.url != "" %}
|
||||
<aside class="applications_aside">
|
||||
<div class="image-placeholder">
|
||||
<img src="{{icon.url}}" alt="Application Icon" />
|
||||
</div>
|
||||
</aside>
|
||||
{% endif %}
|
||||
|
||||
<article>
|
||||
{% if url != "" %}
|
||||
<a target="_blank" href="{{url}}">{{url}}</a>
|
||||
{% endif %}
|
||||
|
||||
<p>{{description}}</p>
|
||||
|
||||
{% if requirements != null %}
|
||||
<h3>{% localized "AppDetailsStrings|WebApplicationsRequirementsHeader" %}</h3>
|
||||
<p>{{requirements}}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if attachments.size > 0 %}
|
||||
<h3>{% localized "AppDetailsStrings|WebApplicationsScreenshotsHeader" %}</h3>
|
||||
{% for screenshot in attachments %}
|
||||
{% if screenshot.type != "Icon" %}
|
||||
<a href="{{screenshot.url}}" data-lightbox="example-set">
|
||||
<img src="/Developer/Applications/Thumbnail?url={{screenshot.url}}" alt='{% localized "AppDetailsStrings|WebApplicationsScreenshotAlt" %}' />
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</article>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationOperationDetails",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationOperationDetails/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,319 @@
|
|||
<div class="dropdown pull-right">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="apiMenu" data-toggle="dropdown">
|
||||
<span class="glyphicon glyphicon-download-alt"></span>
|
||||
<span class="glyphicon-text">API definition</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="apiMenu">
|
||||
<li role="presentation">
|
||||
<a role="menuitem" tabindex="-1" href="{{api.export.openApi3}}">
|
||||
<span class="glyphicon glyphicon-openapi"></span>
|
||||
<span class="glyphicon-text">Open API 3 (YAML)</span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a role="menuitem" tabindex="-1" href="{{api.export.openApi3Json}}">
|
||||
<span class="glyphicon glyphicon-openapi"></span>
|
||||
<span class="glyphicon-text">Open API 3 (JSON)</span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a role="menuitem" tabindex="-1" href="{{api.export.openApi}}">
|
||||
<span class="glyphicon glyphicon-openapi"></span>
|
||||
<span class="glyphicon-text">Open API 2 (JSON)</span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a role="menuitem" tabindex="-1" href="{{api.export.wadl}}">
|
||||
<span class="glyphicon glyphicon-wadl"></span>
|
||||
<span class="glyphicon-text">WADL</span>
|
||||
</a>
|
||||
</li>
|
||||
{% if api.IsSoap %}
|
||||
<li role="presentation">
|
||||
<a role="menuitem" tabindex="-1" href="{{api.export.wsdl}}">
|
||||
<span class="glyphicon glyphicon-wsdl"></span>
|
||||
<span class="glyphicon-text">WSDL</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h1>
|
||||
{{api.name}}
|
||||
{% if api.IsSoap %}
|
||||
<span class="badge badge-soap"> </span>
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% if operation.displayApiChangeHistory %}
|
||||
<a href="/docs/services/{{api.id}}/releaseChanges">API change history</a>
|
||||
{% endif %}
|
||||
|
||||
<p>{{api.description }}</p>
|
||||
|
||||
<div class="panel">
|
||||
<h2>{{operation.name}}</h2>
|
||||
<p>{{operation.description }}</p>
|
||||
<a class="btn btn-primary" href="{{consoleUrl}}" id="btnOpenConsole" role="button">
|
||||
Try it
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h3>{% localized "Documentation|SectionHeadingRequest" %}</h3>
|
||||
|
||||
<div class="panel">
|
||||
<h4>{% localized "Documentation|SectionHeadingRequestUrl" %}</h4>
|
||||
<label>{{ sampleUrl | escape }}</label>
|
||||
</div>
|
||||
|
||||
{% if operation.request %}
|
||||
|
||||
{% if operation.request.parameters.size > 0 %}
|
||||
<div class="panel">
|
||||
<h4>{% localized "Documentation|SectionHeadingRequestParameters" %}</h4>
|
||||
<ul class="list-group">
|
||||
{% for header in operation.request.parameters %}
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label>{{header.name}}</label>
|
||||
{%unless header.required %}
|
||||
<span class="text-muted">({% localized "Documentation|FormLabelSubtextOptional" %})</span>
|
||||
{% endunless %}
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
{{header.typeName}}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{header.description}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if operation.request.headers.size > 0 %}
|
||||
<div class="panel">
|
||||
<h4>{% localized "Documentation|SectionHeadingRequestHeaders" %}</h4>
|
||||
<ul class="list-group">
|
||||
{% for header in operation.request.headers %}
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label>{{header.name}}</label>
|
||||
{%unless header.required %}
|
||||
<span class="text-muted">({% localized "Documentation|FormLabelSubtextOptional" %})</span>
|
||||
{% endunless %}
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
{{header.typeName}}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{header.description}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if operation.request.description or operation.request.representations.size > 0 %}
|
||||
<div class="panel">
|
||||
<h4>{% localized "Documentation|SectionHeadingRequestBody" %}</h4>
|
||||
{% if operation.request.description %}
|
||||
<p>{{operation.request.description }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if operation.request.representations.size > 0 %}
|
||||
<div role="tabpanel">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
{% for representation in operation.request.representations %}
|
||||
<li role="presentation" {% if forloop.first %}class="active"{% endif %}>
|
||||
<a href="#requesttab{{forloop.index}}" role="tab" data-toggle="tab">
|
||||
{{representation.contentType}}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content tab-content-boxed">
|
||||
{% for representation in operation.request.representations %}
|
||||
<div id="requesttab{{forloop.index}}" role="tabpanel" class="tab-pane snippet{% if forloop.first %} active{% endif %}">
|
||||
{% if representation.sample or representation.schema %}
|
||||
<div role="tabpanel">
|
||||
{% if representation.sample and representation.schema %}
|
||||
<ul class="nav nav-tabs-borderless" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#requesttab{{forloop.index}}sample" role="tab" data-toggle="tab">Sample</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#requesttab{{forloop.index}}schema" role="tab" data-toggle="tab">Schema</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<div class="tab-content">
|
||||
{% if representation.sample %}
|
||||
<div id="requesttab{{forloop.index}}sample" role="tabpanel" class="tab-pane snippet active">
|
||||
<pre><code class="{{representation.Brush}}">{{ representation.sample | escape }}</code></pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if representation.schema %}
|
||||
<div id="requesttab{{forloop.index}}schema" role="tabpanel" class="tab-pane snippet">
|
||||
<pre><code class="{{representation.Brush}}">{{ representation.schema | escape }}</code></pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if operation.mockResponse %}
|
||||
<div class="well">
|
||||
<p>
|
||||
<b>{% localized "Documentation|NotificationHeadingMockingEnabled" %}</b>
|
||||
</p>
|
||||
<p>
|
||||
{% localized "Documentation|NotificationTextMockingEnabled" %}<br/>
|
||||
 <b>{{operation.mockResponse.statusCode}} {{operation.mockResponse.statusDescription}}</b>
|
||||
{{operation.mockResponse.description | strip_html }}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if operation.responses.size > 0 %}
|
||||
<h3>{% localized "Documentation|SectionHeadingResponses" %}</h3>
|
||||
{% for response in operation.responses %}
|
||||
{% if response.description or response.representations.size > 0 %}
|
||||
<h3>{{response.statusCode}} {{response.statusDescription}}</h3>
|
||||
|
||||
{% if response.description %}
|
||||
<p>{{ response.description }}</p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if response.headers.size > 0 %}
|
||||
<div class="panel">
|
||||
<h4>{% localized "Documentation|SectionHeadingResponseHeaders" %}</h4>
|
||||
<ul class="list-group">
|
||||
{% for header in response.headers %}
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label>{{header.name}}</label>
|
||||
{%unless header.required %}
|
||||
<span class="text-muted">({% localized "Documentation|FormLabelSubtextOptional" %})</span>
|
||||
{% endunless %}
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
{{header.typeName}}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{header.description}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if response.representations.size > 0 %}
|
||||
<div class="panel">
|
||||
<h4>{% localized "Documentation|SectionHeadingRepresentations" %}</h4>
|
||||
<div role="tabpanel">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
{% for representation in response.representations %}
|
||||
<li role="presentation" {% if forloop.first %}class="active"{% endif %}>
|
||||
<a href="#response{{response.statusCode}}tab{{forloop.index}}" role="tab" data-toggle="tab">
|
||||
{{representation.contentType}}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content tab-content-boxed">
|
||||
{% for representation in response.representations %}
|
||||
<div id="response{{response.statusCode}}tab{{forloop.index}}" role="tabpanel" class="tab-pane snippet{% if forloop.first %} active{% endif %}">
|
||||
|
||||
{% if representation.sample or representation.schema %}
|
||||
<div role="tabpanel">
|
||||
|
||||
{% if representation.sample and representation.schema %}
|
||||
<ul class="nav nav-tabs-borderless" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#response{{response.statusCode}}tab{{forloop.index}}sample" role="tab" data-toggle="tab">
|
||||
Sample
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#response{{response.statusCode}}tab{{forloop.index}}schema" role="tab" data-toggle="tab">
|
||||
Schema
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<div class="tab-content">
|
||||
{% if representation.sample %}
|
||||
<div id="response{{response.statusCode}}tab{{forloop.index}}sample" role="tabpanel" class="tab-pane snippet active">
|
||||
<pre><code class="{{representation.Brush}}">{{ representation.sample | escape }}</code></pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if representation.schema %}
|
||||
<div id="response{{response.statusCode}}tab{{forloop.index}}schema" role="tabpanel" class="tab-pane snippet">
|
||||
<pre><code class="{{representation.Brush}}">{{ representation.schema | escape }}</code></pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if api.IsSoap == false %}
|
||||
<div class="panel">
|
||||
<h4>{% localized "Documentation|SectionHeadingCodeSamples" %}</h4>
|
||||
<div role="tabpanel">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
{% for sample in samples %}
|
||||
<li role="presentation" {% if forloop.first %}class="active"{% endif %}>
|
||||
<a href="#{{sample.brush}}" aria-controls="{{sample.brush}}" role="tab" data-toggle="tab">
|
||||
{{sample.title}}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content tab-content-boxed" title="{% localized "Documentation|TooltipTextDoubleClickToSelectAll" %}">
|
||||
{% for sample in samples %}
|
||||
<div role="tabpanel" class="tab-pane tab-content-boxed {% if forloop.first %} active{% endif %} snippet snippet-resizable" id="{{sample.brush}}" >
|
||||
<pre><code class="{{sample.brush}}">{% partial sample.template for sample in samples %}</code></pre>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationOperationList",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationOperationList/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{% if filtering.availableTags %}
|
||||
<filter-control></filter-control>
|
||||
{% endif %}
|
||||
<ul class="nav nav-pills nav-stacked" role="navigation" data-offset-top="0">
|
||||
{% for operation in menuItems %}
|
||||
<li {% if operation.id == currentOperationId %}class="active"{% endif %}>
|
||||
<a href="/docs/services/{{apiId}}/operations/{{operation.id}}?{% if filtering.pattern %}&pattern={{filtering.pattern}}{% endif %}{% if filtering.selectedTags %}&tags={{filtering.selectedTags}}{% endif %}{% if filtering.groupBy %}&groupBy={{filtering.groupBy}}{% endif %}">
|
||||
{% case operation.HttpMethod %}
|
||||
{% when 'GET' %}
|
||||
<span class="badge badge-success">{{operation.HttpMethod}}</span> {{operation.Title}}
|
||||
{% when 'POST' %}
|
||||
<span class="badge badge-warning">{{operation.HttpMethod}}</span> {{operation.Title}}
|
||||
{% when 'PUT' %}
|
||||
<span class="badge badge-info">{{operation.HttpMethod}}</span> {{operation.Title}}
|
||||
{% when 'DELETE' %}
|
||||
<span class="badge badge-danger">{{operation.HttpMethod}}</span> {{operation.Title}}
|
||||
{% else %}
|
||||
<span class="badge badge-default">{{operation.HttpMethod}}</span> {{operation.Title}}
|
||||
{% endcase %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationOperationListGrouped",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationOperationListAQ3NS0/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
<filter-control></filter-control>
|
||||
<ul class="nav nav-pills nav-stacked ">
|
||||
{% for group in groups %}
|
||||
<li>
|
||||
<a href="#collapse-{{group.name}}" data-toggle="collapse" class="text-muted">
|
||||
<b>{{group.name}}</b>
|
||||
<i class="glyphicon glyphicon-menu-up pull-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<ul class="nav nav-pills nav-stacked collapse in" role="navigation" data-offset-top="0" id="collapse-{{group.name}}">
|
||||
{% for operation in group.menuItems %}
|
||||
<li {% if operation.id == currentOperationId %}class="active" {% endif %}>
|
||||
<a href="/docs/services/{{apiId}}/operations/{{operation.id}}?{% if filtering.pattern %}&pattern={{filtering.pattern}}{% endif %}{% if filtering.selectedTags %}&tags={{filtering.selectedTags}}{% endif %}{% if filtering.groupBy %}&groupBy={{filtering.groupBy}}{% endif %}">
|
||||
{% case operation.HttpMethod %} {% when 'GET' %}
|
||||
<span class="badge badge-success">{{operation.HttpMethod}}</span> {{operation.Title}} {% when 'POST' %}
|
||||
<span class="badge badge-warning">{{operation.HttpMethod}}</span> {{operation.Title}} {% when 'PUT' %}
|
||||
<span class="badge badge-info">{{operation.HttpMethod}}</span> {{operation.Title}} {% when 'DELETE' %}
|
||||
<span class="badge badge-danger">{{operation.HttpMethod}}</span> {{operation.Title}} {% else %}
|
||||
<span class="badge badge-default">{{operation.HttpMethod}}</span> {{operation.Title}} {% endcase %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationSamplesCsharp",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationSamplesCsharp/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
using System;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using System.Web;
|
||||
|
||||
namespace CSHttpClientSample
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
MakeRequest();
|
||||
Console.WriteLine("Hit ENTER to exit...");
|
||||
Console.ReadLine();
|
||||
}
|
||||
|
||||
static async void MakeRequest()
|
||||
{
|
||||
var client = new HttpClient();
|
||||
var queryString = HttpUtility.ParseQueryString(string.Empty);
|
||||
|
||||
{% if headers.size > 0 -%}
|
||||
// Request headers
|
||||
{% for header in headers -%}
|
||||
{% case header.Name -%}
|
||||
{% when "Accept"%}
|
||||
client.DefaultRequestHeaders.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "Accept-Charset" -%}
|
||||
client.DefaultRequestHeaders.AcceptCharset.Add(StringWithQualityHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "Accept-Encoding" -%}
|
||||
client.DefaultRequestHeaders.AcceptEncoding.Add(StringWithQualityHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "Accept-Language" -%}
|
||||
client.DefaultRequestHeaders.AcceptLanguage.Add(StringWithQualityHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "Cache-Control" -%}
|
||||
client.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("{{header.value}}");
|
||||
{% when "Connection" -%}
|
||||
client.DefaultRequestHeaders.Connection.Add("{{header.value}}");
|
||||
{% when "Date" -%}
|
||||
client.DefaultRequestHeaders.Date = DateTimeOffset.Parse("{{header.value}}");
|
||||
{% when "Expect" -%}
|
||||
client.DefaultRequestHeaders.Expect.Add(NameValueWithParametersHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "If-Match" -%}
|
||||
client.DefaultRequestHeaders.IfMatch.Add(EntityTagHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "If-Modified-Since" -%}
|
||||
client.DefaultRequestHeaders.IfModifiedSince = DateTimeOffset.Parse("{{header.value}}");
|
||||
{% when "If-None-Match" -%}
|
||||
client.DefaultRequestHeaders.IfNoneMatch.Add(EntityTagHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "If-Range" -%}
|
||||
client.DefaultRequestHeaders.IfRange = RangeConditionHeaderValue.Parse("{{header.value}}");
|
||||
{% when "If-Unmodified-Since" -%}
|
||||
client.DefaultRequestHeaders.IfUnmodifiedSince = DateTimeOffset.Parse("{{header.value}}");
|
||||
{% when "Max-Forwards" -%}
|
||||
client.DefaultRequestHeaders.MaxForwards = int.Parse("{{header.value}}");
|
||||
{% when "Pragma" -%}
|
||||
client.DefaultRequestHeaders.Pragma.Add(NameValueHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "Range" -%}
|
||||
client.DefaultRequestHeaders.Range = RangeHeaderValue.Parse("{{header.value}}");
|
||||
{% when "Referer" -%}
|
||||
client.DefaultRequestHeaders.Referrer = new Uri("{{header.value}}");
|
||||
{% when "TE" -%}
|
||||
client.DefaultRequestHeaders.TE.Add(TransferCodingWithQualityHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "Transfer-Encoding" -%}
|
||||
client.DefaultRequestHeaders.TransferEncoding.Add(TransferCodingHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "Upgrade" -%}
|
||||
client.DefaultRequestHeaders.Upgrade.Add(ProductHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "User-Agent" -%}
|
||||
client.DefaultRequestHeaders.UserAgent.Add(ProductInfoHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "Via" -%}
|
||||
client.DefaultRequestHeaders.Via.Add(ViaHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "Warning" -%}
|
||||
client.DefaultRequestHeaders.Warning.Add(WarningHeaderValue.Parse("{{header.value}}"));
|
||||
{% when "Content-Type" -%}
|
||||
{% else -%}
|
||||
client.DefaultRequestHeaders.Add("{{header.Name}}", "{{header.value}}");
|
||||
{% endcase -%}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if parameters.size > 0 -%}
|
||||
// Request parameters
|
||||
{% for parameter in parameters -%}
|
||||
queryString["{{parameter.Name}}"] = "{{parameter.Value}}";
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
var uri = "{{scheme}}://{{host}}{{path}}{% if path contains '?' %}&{% else %}?{% endif %}" + queryString;
|
||||
|
||||
{% case method -%}
|
||||
|
||||
{% when "POST" -%}
|
||||
HttpResponseMessage response;
|
||||
|
||||
// Request body
|
||||
byte[] byteData = Encoding.UTF8.GetBytes("{{ body | replace:'"','\"'}}");
|
||||
|
||||
using (var content = new ByteArrayContent(byteData))
|
||||
{
|
||||
{% if body -%}
|
||||
content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
|
||||
{% endif -%}
|
||||
response = await client.PostAsync(uri, content);
|
||||
}
|
||||
|
||||
{% when "GET" -%}
|
||||
var response = await client.GetAsync(uri);
|
||||
{% when "DELETE" -%}
|
||||
var response = await client.DeleteAsync(uri);
|
||||
{% when "PUT" -%}
|
||||
HttpResponseMessage response;
|
||||
|
||||
// Request body
|
||||
byte[] byteData = Encoding.UTF8.GetBytes("{{ body | replace:'"','\"'}}");
|
||||
|
||||
using (var content = new ByteArrayContent(byteData))
|
||||
{
|
||||
{% if body -%}
|
||||
content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
|
||||
{% endif -%}
|
||||
response = await client.PutAsync(uri, content);
|
||||
}
|
||||
{% when "HEAD" -%}
|
||||
var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, uri));
|
||||
{% when "OPTIONS" -%}
|
||||
var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Options, uri));
|
||||
{% when "TRACE" -%}
|
||||
var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Trace, uri));
|
||||
|
||||
if (response.Content != null)
|
||||
{
|
||||
var responseString = await response.Content.ReadAsStringAsync();
|
||||
Console.WriteLine(responseString);
|
||||
}
|
||||
{% endcase -%}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationSamplesCurl",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationSamplesCurl/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
@ECHO OFF
|
||||
|
||||
curl -v -X {{method}} "{{scheme}}://{{host}}{{path}}{{query | escape }}"
|
||||
{% for header in headers -%}
|
||||
-H "{{ header.name }}: {{ header.value }}"
|
||||
{% endfor -%}
|
||||
{% if body -%}
|
||||
--data-ascii "{{ body | replace:'"','^"' }}"
|
||||
{% endif -%}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationSamplesJava",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationSamplesJava/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
|
||||
import java.net.URI;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
public class JavaSample
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
HttpClient httpclient = HttpClients.createDefault();
|
||||
|
||||
try
|
||||
{
|
||||
URIBuilder builder = new URIBuilder("{{scheme}}://{{host}}{{path}}");
|
||||
|
||||
{% if parameters.size > 0 -%}
|
||||
{% for parameter in parameters -%}
|
||||
builder.setParameter("{{parameter.name}}", "{{parameter.value}}");
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
URI uri = builder.build();
|
||||
Http{{ method | downcase | capitalize }} request = new Http{{ method | downcase | capitalize }}(uri);
|
||||
{% for header in headers -%}
|
||||
request.setHeader("{{header.Name}}", "{{header.value}}");
|
||||
{% endfor %}
|
||||
|
||||
{% if body -%}
|
||||
// Request body
|
||||
StringEntity reqEntity = new StringEntity("{{ body | replace:'"','\"' }}");
|
||||
request.setEntity(reqEntity);
|
||||
{% endif -%}
|
||||
|
||||
HttpResponse response = httpclient.execute(request);
|
||||
HttpEntity entity = response.getEntity();
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
System.out.println(EntityUtils.toString(entity));
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationSamplesJs",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationSamplesJs/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>JSSample</title>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var params = {
|
||||
{% if parameters.size > 0 -%}
|
||||
// Request parameters
|
||||
{% for parameter in parameters -%}
|
||||
"{{parameter.name}}": "{{parameter.value}}",
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: "{{scheme}}://{{host}}{{path}}{% if path contains '?' %}&{% else %}?{% endif %}" + $.param(params),
|
||||
{% if headers.size > 0 -%}
|
||||
beforeSend: function(xhrObj){
|
||||
// Request headers
|
||||
{% for header in headers -%}
|
||||
xhrObj.setRequestHeader("{{header.name}}","{{header.value}}");
|
||||
{% endfor -%}
|
||||
},
|
||||
{% endif -%}
|
||||
type: "{{method}}",
|
||||
{% if body -%}
|
||||
// Request body
|
||||
data: "{{ body | replace:'"','\"' }}",
|
||||
{% endif -%}
|
||||
})
|
||||
.done(function(data) {
|
||||
alert("success");
|
||||
})
|
||||
.fail(function() {
|
||||
alert("error");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationSamplesObjc",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationSamplesObjc/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
int main(int argc, const char * argv[])
|
||||
{
|
||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
NSString* path = @"{{scheme}}://{{host}}{{path}}";
|
||||
NSArray* array = @[
|
||||
// Request parameters
|
||||
@"entities=true",
|
||||
{% if parameters.size > 0 -%}
|
||||
{% for parameter in parameters -%}
|
||||
@"{{parameter.name}}={{parameter.value}}",
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
];
|
||||
|
||||
NSString* string = [array componentsJoinedByString:@"&"];
|
||||
path = [path stringByAppendingFormat:@"?%@", string];
|
||||
|
||||
NSLog(@"%@", path);
|
||||
|
||||
NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
|
||||
[_request setHTTPMethod:@"{{method}}"];
|
||||
{% if headers.size > 0 -%}
|
||||
// Request headers
|
||||
{% for header in headers -%}
|
||||
[_request setValue:@"{{header.value}}" forHTTPHeaderField:@"{{header.name}}"];
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
{% if body -%}
|
||||
// Request body
|
||||
[_request setHTTPBody:[@"{{ body | replace:'"','\"' }}" dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
{% endif -%}
|
||||
|
||||
NSURLResponse *response = nil;
|
||||
NSError *error = nil;
|
||||
NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];
|
||||
|
||||
if (nil != error)
|
||||
{
|
||||
NSLog(@"Error: %@", error);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSError* error = nil;
|
||||
NSMutableDictionary* json = nil;
|
||||
NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
|
||||
NSLog(@"%@", dataString);
|
||||
|
||||
if (nil != _connectionData)
|
||||
{
|
||||
json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
|
||||
}
|
||||
|
||||
if (error || !json)
|
||||
{
|
||||
NSLog(@"Could not parse loaded json with error:%@", error);
|
||||
}
|
||||
|
||||
NSLog(@"%@", json);
|
||||
_connectionData = nil;
|
||||
}
|
||||
|
||||
[pool drain];
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationSamplesPhp",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationSamplesPhp/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
|
||||
require_once 'HTTP/Request2.php';
|
||||
|
||||
$request = new Http_Request2('{{scheme}}://{{host}}{{path}}');
|
||||
$url = $request->getUrl();
|
||||
|
||||
{% if headers.size > 0 -%}
|
||||
$headers = array(
|
||||
// Request headers
|
||||
{% for header in headers -%}
|
||||
'{{header.name}}' => '{{header.value}}',
|
||||
{% endfor -%}
|
||||
);
|
||||
|
||||
$request->setHeader($headers);
|
||||
{% endif -%}
|
||||
|
||||
{% if parameters.size > 0 -%}
|
||||
$parameters = array(
|
||||
// Request parameters
|
||||
{% for parameter in parameters -%}
|
||||
'{{parameter.name}}' => '{{parameter.value}}',
|
||||
{% endfor -%}
|
||||
);
|
||||
|
||||
$url->setQueryVariables($parameters);
|
||||
{% endif -%}
|
||||
|
||||
$request->setMethod(HTTP_Request2::METHOD_{{method}});
|
||||
|
||||
{% if body -%}
|
||||
// Request body
|
||||
$request->setBody("{{ body | replace:'"','\"' }}");
|
||||
{% endif -%}
|
||||
|
||||
try
|
||||
{
|
||||
$response = $request->send();
|
||||
echo $response->getBody();
|
||||
}
|
||||
catch (HttpException $ex)
|
||||
{
|
||||
echo $ex;
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationSamplesPython",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationSamplesPython/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
########### Python 2.7 #############
|
||||
import httplib, urllib, base64
|
||||
|
||||
headers = {
|
||||
{% if headers.size > 0 -%}
|
||||
# Request headers
|
||||
{% for header in headers -%}
|
||||
'{{header.name}}': '{{header.value}}',
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
params = urllib.urlencode({
|
||||
{% if parameters.size > 0 -%}
|
||||
# Request parameters
|
||||
{% for parameter in parameters -%}
|
||||
'{{parameter.name}}': '{{parameter.value}}',
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
})
|
||||
|
||||
try:
|
||||
{% case scheme -%}
|
||||
{% when "http" -%}
|
||||
conn = httplib.HTTPConnection('{{host}}')
|
||||
{% when "https" -%}
|
||||
conn = httplib.HTTPSConnection('{{host}}')
|
||||
{% endcase -%}
|
||||
conn.request("{{method}}", "{{path}}{% if path contains '?' %}&{% else %}?{% endif %}%s" % params{% if body %}, "{{ body | replace:'"','\"' }}"{% endif %}, headers)
|
||||
response = conn.getresponse()
|
||||
data = response.read()
|
||||
print(data)
|
||||
conn.close()
|
||||
except Exception as e:
|
||||
print("[Errno {0}] {1}".format(e.errno, e.strerror))
|
||||
|
||||
####################################
|
||||
|
||||
########### Python 3.2 #############
|
||||
import http.client, urllib.request, urllib.parse, urllib.error, base64
|
||||
|
||||
headers = {
|
||||
{% if headers.size > 0 -%}
|
||||
# Request headers
|
||||
{% for header in headers -%}
|
||||
'{{header.name}}': '{{header.value}}',
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
}
|
||||
|
||||
params = urllib.parse.urlencode({
|
||||
{% if parameters.size > 0 -%}
|
||||
# Request parameters
|
||||
{% for parameter in parameters -%}
|
||||
'{{parameter.name}}': '{{parameter.value}}',
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
})
|
||||
|
||||
try:
|
||||
{% case scheme -%}
|
||||
{% when "http" -%}
|
||||
conn = http.client.HTTPConnection('{{host}}')
|
||||
{% when "https" -%}
|
||||
conn = http.client.HTTPSConnection('{{host}}')
|
||||
{% endcase -%}
|
||||
conn.request("{{method}}", "{{path}}{% if path contains '?' %}&{% else %}?{% endif %}%s" % params{% if body %}, "{{ body | replace:'"','\"' }}"{% endif %}, headers)
|
||||
response = conn.getresponse()
|
||||
data = response.read()
|
||||
print(data)
|
||||
conn.close()
|
||||
except Exception as e:
|
||||
print("[Errno {0}] {1}".format(e.errno, e.strerror))
|
||||
|
||||
####################################
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "DocumentationSamplesRuby",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/DocumentationSamplesRuby/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
require 'net/http'
|
||||
|
||||
uri = URI('{{scheme}}://{{host}}{{path}}')
|
||||
|
||||
{% if parameters.size > 0 -%}
|
||||
query = URI.encode_www_form({
|
||||
# Request parameters
|
||||
{% for parameter in parameters -%}
|
||||
'{{parameter.name}}' => '{{parameter.value}}'{% unless forloop.last %},{% endunless %}
|
||||
{% endfor -%}
|
||||
})
|
||||
if query.length > 0
|
||||
if uri.query && uri.query.length > 0
|
||||
uri.query += '&' + query
|
||||
else
|
||||
uri.query = query
|
||||
end
|
||||
end
|
||||
{% endif -%}
|
||||
|
||||
request = Net::HTTP::{{ method | downcase | capitalize }}.new(uri.request_uri)
|
||||
{% for header in headers -%}
|
||||
# Request headers
|
||||
request['{{header.name}}'] = '{{header.value}}'
|
||||
{% endfor -%}
|
||||
{% if body -%}
|
||||
# Request body
|
||||
request.body = "{{ body | replace:'"','\"' }}"
|
||||
{% endif -%}
|
||||
|
||||
response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
|
||||
http.request(request)
|
||||
end
|
||||
|
||||
puts response.body
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "ErrorPage",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/ErrorPage/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
<h2>{% localized "ErrorPageStrings|PageTitleError" %}</h2>
|
||||
|
||||
<h3>{% localized "ErrorPageStrings|TitlePotentialSolution" %}</h3>
|
||||
<br />
|
||||
|
||||
<ul>
|
||||
<li>{% localized "ErrorPageStrings|TextblockPotentialSolutionRefresh" %}</li>
|
||||
<li>
|
||||
{% capture textPotentialSolutionTryAgain %}{% localized "ErrorPageStrings|TextblockPotentialSolutionTryAgain" %}{% endcapture %}
|
||||
{% capture backLink %}<a href="#">{% localized "ErrorPageStrings|LinkLabelBack" %}</a>{% endcapture %}
|
||||
{% assign replaceString = '{0}' %}
|
||||
|
||||
{{ textPotentialSolutionTryAgain | append : " " | split : replaceString | join : backLink }}
|
||||
</li>
|
||||
<li>
|
||||
{% capture textPotentialSolutionStartOver %}{% localized "ErrorPageStrings|TextblockPotentialSolutionStartOver" %}{% endcapture %}
|
||||
{% capture homeLink %}<a href="/">{% localized "ErrorPageStrings|LinkLabelHomePage" %}</a>{% endcapture %}
|
||||
{% assign replaceString = '{0}' %}
|
||||
|
||||
{{ textPotentialSolutionStartOver | append : " " | split : replaceString | join : homeLink }}
|
||||
</li>
|
||||
<li>
|
||||
{% capture textReportProblem %}{% localized "ErrorPageStrings|TextReportProblem" %}{% endcapture %}
|
||||
{% capture emailLink %}<a href="{{emailBody}}" target="_self" title="API Management Support">{% localized "ErrorPageStrings|LinkLabelSendUsEmail" %}</a>{% endcapture %}
|
||||
{% assign replaceString = '{0}' %}
|
||||
|
||||
{{ textReportProblem | append : " " | split : replaceString | join : emailLink }}
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<br />
|
||||
Error Code: {{errorCode}}
|
||||
<br />
|
||||
<br />
|
||||
Reference ID: {{referenceCode}}
|
||||
</p>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "IssueList",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/IssueList/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<search-control></search-control>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<h2>{% localized "IssuesStrings|WebIssuesIndexTitle" %}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% if issues.size > 0 %}
|
||||
<ul class="list-unstyled">
|
||||
{% capture reportedBy %}{% localized "IssuesStrings|WebIssuesStatusReportedBy" %}{% endcapture %}
|
||||
{% assign replaceString0 = '{0}' %}
|
||||
{% assign replaceString1 = '{1}' %}
|
||||
{% for issue in issues %}
|
||||
<li>
|
||||
<h3>
|
||||
<a href="/issues/{{issue.id}}">{{issue.title}}</a>
|
||||
</h3>
|
||||
<p>{{issue.description}}</p>
|
||||
<em>
|
||||
{% capture state %}{{issue.issueState}}{% endcapture %}
|
||||
{% capture devName %}{{issue.subscriptionDeveloperName}}{% endcapture %}
|
||||
{% capture str1 %}{{ reportedBy | split : replaceString0 | join : state }}{% endcapture %}
|
||||
{{ str1 | append : " " | split : replaceString1 | join : devName }}
|
||||
<span class="UtcDateElement">{{ issue.reportedOn | date: "r" }}</span>
|
||||
</em>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<paging-control></paging-control>
|
||||
{% else %}
|
||||
{% localized "CommonResources|NoItemsToDisplay" %}
|
||||
{% endif %}
|
||||
{% if canReportIssue %}
|
||||
<a class="btn btn-primary" id="createIssue" href="/Issues/Create">{% localized "IssuesStrings|WebIssuesReportIssueButton" %}</a>
|
||||
{% elsif isAuthenticated %}
|
||||
<hr />
|
||||
<p>{% localized "IssuesStrings|WebIssuesNoActiveSubscriptions" %}</p>
|
||||
{% else %}
|
||||
<hr />
|
||||
<p>
|
||||
{% capture signIntext %}{% localized "IssuesStrings|WebIssuesNotSignin" %}{% endcapture %}
|
||||
{% capture link %}<a href="/signin">{% localized "IssuesStrings|WebIssuesSignIn" %}</a>{% endcapture %}
|
||||
{{ signIntext | append : " " | split : replaceString0 | join : link }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "NotFoundPage",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/NotFoundPage/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
<h2>{% localized "NotFoundStrings|PageTitleNotFound" %}</h2>
|
||||
|
||||
<h3>{% localized "NotFoundStrings|TitlePotentialCause" %}</h3>
|
||||
<ul>
|
||||
<li>{% localized "NotFoundStrings|TextblockPotentialCauseOldLink" %}</li>
|
||||
<li>{% localized "NotFoundStrings|TextblockPotentialCauseMisspelledUrl" %}</li>
|
||||
</ul>
|
||||
|
||||
<h3>{% localized "NotFoundStrings|TitlePotentialSolution" %}</h3>
|
||||
<ul>
|
||||
<li>{% localized "NotFoundStrings|TextblockPotentialSolutionRetype" %}</li>
|
||||
<li>
|
||||
{% capture textPotentialSolutionStartOver %}{% localized "NotFoundStrings|TextblockPotentialSolutionStartOver" %}{% endcapture %}
|
||||
{% capture homeLink %}<a href="/">{% localized "NotFoundStrings|LinkLabelHomePage" %}</a>{% endcapture %}
|
||||
{% assign replaceString = '{0}' %}
|
||||
|
||||
{{ textPotentialSolutionStartOver | append : " " | split : replaceString | join : homeLink }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
{% capture textReportProblem %}{% localized "NotFoundStrings|TextReportProblem" %}{% endcapture %}
|
||||
{% capture emailLink %}<a href="{{emailBody}}" target="_self" title="API Management Support">{% localized "NotFoundStrings|LinkLabelSendUsEmail" %}</a>{% endcapture %}
|
||||
{% assign replaceString = '{0}' %}
|
||||
|
||||
{{ textReportProblem | append : " " | split : replaceString | join : emailLink }}
|
||||
</p>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "ProductList",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/ProductList/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
<search-control></search-control>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<h2>{% localized "ProductsStrings|PageTitleProducts" %}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% if products.size > 0 %}
|
||||
<ul class="list-unstyled">
|
||||
{% for product in products %}
|
||||
<li>
|
||||
<h3><a href="/products/{{product.id}}">{{product.title}}</a></h3>
|
||||
{{product.description}}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<paging-control></paging-control>
|
||||
{% else %}
|
||||
{% localized "CommonResources|NoItemsToDisplay" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "ProductView",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/ProductView/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
<h2>{{Product.Title}}</h2>
|
||||
<p>{{Product.Description}}</p>
|
||||
|
||||
{% assign replaceString0 = '{0}' %}
|
||||
|
||||
{% if Limits and Limits.size > 0 %}
|
||||
<h3>{% localized "ProductDetailsStrings|WebProductsUsageLimitsHeader"%}</h3>
|
||||
<ul>
|
||||
{% for limit in Limits %}
|
||||
<li>{{limit.DisplayName}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if apis.size > 0 %}
|
||||
<p>
|
||||
<b>
|
||||
{% if apis.size == 1 %}
|
||||
{% capture apisCountText %}{% localized "ProductDetailsStrings|TextblockSingleApisCount" %}{% endcapture %}
|
||||
{% else %}
|
||||
{% capture apisCountText %}{% localized "ProductDetailsStrings|TextblockMultipleApisCount" %}{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% capture apisCount %}{{apis.size}}{% endcapture %}
|
||||
{{ apisCountText | split : replaceString0 | join : apisCount }}
|
||||
</b>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
{% for api in Apis %}
|
||||
<li>
|
||||
<a href="/docs/services/{{api.Id}}">{{api.Name}}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if subscriptions.size > 0 %}
|
||||
<p>
|
||||
<b>
|
||||
{% if subscriptions.size == 1 %}
|
||||
{% capture subscriptionsCountText %}{% localized "ProductDetailsStrings|TextblockSingleSubscriptionsCount" %}{% endcapture %}
|
||||
{% else %}
|
||||
{% capture subscriptionsCountText %}{% localized "ProductDetailsStrings|TextblockMultipleSubscriptionsCount" %}{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% capture subscriptionsCount %}{{subscriptions.size}}{% endcapture %}
|
||||
{{ subscriptionsCountText | split : replaceString0 | join : subscriptionsCount }}
|
||||
</b>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
{% for subscription in subscriptions %}
|
||||
<li>
|
||||
<a href="/developer#{{subscription.Id}}">{{subscription.DisplayName}}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if CannotAddBecauseSubscriptionNumberLimitReached %}
|
||||
<b>{% localized "ProductDetailsStrings|TextblockSubscriptionLimitReached" %}</b>
|
||||
{% elsif CannotAddBecauseMultipleSubscriptionsNotAllowed == false %}
|
||||
<subscribe-button></subscribe-button>
|
||||
{% endif %}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "SignInTemplate",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/SignInTemplate/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
<h2 class="text-center">{% localized "SigninStrings|WebAuthenticationSigninTitle" %}</h2>
|
||||
{% if registrationEnabled == true %}
|
||||
<p class="text-center">{% localized "SigninStrings|WebAuthenticationNotAMember" %}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="row center-block ap-idp-container">
|
||||
<div class="col-md-6">
|
||||
{% if registrationEnabled == true %}
|
||||
<p>{% localized "SigninStrings|WebAuthenticationSigininWithPassword" %}</p>
|
||||
<basic-SignIn></basic-SignIn>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if registrationEnabled != true and providers.size == 0 %}
|
||||
{% localized "ProviderInfoStrings|TextboxExternalIdentitiesDisabled" %}
|
||||
{% else %}
|
||||
{% if providers.size > 0 %}
|
||||
<div class="col-md-6">
|
||||
<div class="providers-list">
|
||||
<p class="text-left">
|
||||
{% if registrationEnabled == true %}
|
||||
{% localized "ProviderInfoStrings|TextboxExternalIdentitiesSigninInvitation" %}
|
||||
{% else %}
|
||||
{% localized "ProviderInfoStrings|TextboxExternalIdentitiesSigninInvitationPrimary" %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<providers></providers>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if userRegistrationTermsEnabled == true %}
|
||||
<div class="col-md-6">
|
||||
<div id="terms" class="modal" role="dialog" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{% localized "SigninResources|DialogHeadingTermsOfUse" %}</h4>
|
||||
</div>
|
||||
<div class="modal-body break-all">{{userRegistrationTerms}}</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{% localized "CommonStrings|ButtonLabelClose" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>{% localized "SigninResources|TextblockUserRegistrationTermsProvided" %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "SignUpTemplate",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/SignUpTemplate/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
<h2 class="text-center">{% localized "SignupStrings|PageTitleSignup" %}</h2>
|
||||
<p class="text-center">
|
||||
{% localized "SignupStrings|WebAuthenticationAlreadyAMember" %} <a href="/signin">{% localized "SignupStrings|WebAuthenticationSigninNow" %}</a>
|
||||
</p>
|
||||
|
||||
<div class="row center-block ap-idp-container">
|
||||
<div class="col-md-6">
|
||||
<p>{% localized "SignupStrings|WebAuthenticationCreateNewAccount" %}</p>
|
||||
<sign-up></sign-up>
|
||||
</div>
|
||||
|
||||
{% if providers.size > 0 %}
|
||||
<div class="col-md-6">
|
||||
<div class="providers-list">
|
||||
<p class="text-left">
|
||||
{% if registrationEnabled == true %}
|
||||
{% localized "ProviderInfoStrings|TextboxExternalIdentitiesSignupInvitation" %}
|
||||
{% else %}
|
||||
{% localized "ProviderInfoStrings|TextboxExternalIdentitiesSignupInvitationPrimary" %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<providers></providers>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "UserProfile",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/UserProfile/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
<div class="pull-right">
|
||||
{% if canChangePassword == true %}
|
||||
<a class="btn btn-default" id="ChangePassword" role="button" href="{{changePasswordUrl}}">{% localized "UserProfile|ButtonLabelChangePassword" %}</a>
|
||||
{% endif %}
|
||||
{% if canChangeUserInfo == true %}
|
||||
<a id="changeAccountInfo" href="{{changeNameOrEmailUrl}}" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
<span>{% localized "UserProfile|ButtonLabelChangeAccountInfo" %}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h2>{% localized "SubscriptionStrings|PageTitleDeveloperProfile" %}</h2>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label for="Email">{% localized "UserProfile|TextboxLabelEmail" %}</label>
|
||||
</div>
|
||||
<div class="col-sm-9" id="Email">{{email}}</div>
|
||||
</div>
|
||||
|
||||
{% if isSystemUser != true %}
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label for="FirstName">{% localized "UserProfile|TextboxLabelEmailFirstName" %}</label>
|
||||
</div>
|
||||
<div class="col-sm-9" id="FirstName">{{FirstName}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label for="LastName">{% localized "UserProfile|TextboxLabelEmailLastName" %}</label>
|
||||
</div>
|
||||
<div class="col-sm-9" id="LastName">{{LastName}}</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label for="CompanyName">{% localized "UserProfile|TextboxLabelOrganizationName" %}</label>
|
||||
</div>
|
||||
<div class="col-sm-9" id="CompanyName">{{CompanyName}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<label for="AddresserEmail">{% localized "UserProfile|TextboxLabelNotificationsSenderEmail" %}</label>
|
||||
</div>
|
||||
<div class="col-sm-9" id="AddresserEmail">{{AddresserEmail}}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "UserProfileApps",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/UserProfileApps/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
<div class="ap-account-applications">
|
||||
<a id="RegisterApplication" href="/Developer/Applications/Register" class="btn btn-success pull-right">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
<span>{% localized "ApplicationListStrings|WebDevelopersRegisterAppLink" %}</span>
|
||||
</a>
|
||||
<h2>{% localized "ApplicationListStrings|WebDevelopersYourApplicationsHeader" %}</h2>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-8">{% localized "ApplicationListStrings|WebDevelopersAppTableNameHeader" %}</th>
|
||||
<th class="col-md-2">{% localized "ApplicationListStrings|WebDevelopersAppTableCategoryHeader" %}</th>
|
||||
<th class="col-md-2" colspan="2">{% localized "ApplicationListStrings|WebDevelopersAppTableStateHeader" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% if applications.size == 0 %}
|
||||
|
||||
<tr>
|
||||
<td class="col-md-12 text-center" colspan="4">
|
||||
{% localized "CommonResources|NoItemsToDisplay" %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% else %}
|
||||
|
||||
{% for app in applications %}
|
||||
<tr>
|
||||
<td class="col-md-8">
|
||||
{{app.title}}
|
||||
</td>
|
||||
<td class="col-md-2">
|
||||
{{app.categoryName}}
|
||||
</td>
|
||||
<td class="col-md-2">
|
||||
<strong>
|
||||
{% case app.state %}
|
||||
{% when ApplicationStateModel.Registered %}
|
||||
{% localized "ApplicationListStrings|WebDevelopersAppNotSubminted" %}
|
||||
|
||||
{% when ApplicationStateModel.Unpublished %}
|
||||
{% localized "ApplicationListStrings|WebDevelopersAppNotPublished" %}
|
||||
|
||||
{% else %}
|
||||
{{ app.state }}
|
||||
{% endcase %}
|
||||
</strong>
|
||||
</td>
|
||||
<td class="col-md-1">
|
||||
<div class="nowrap">
|
||||
{% if app.state != ApplicationStateModel.Submitted and app.state != ApplicationStateModel.Published %}
|
||||
<app-actions params="{ appId: '{{app.id}}' }"></app-actions>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "UserProfileSubscriptions",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/UserProfileSubscriptions/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
<div class="ap-account-subscriptions">
|
||||
<a href="{{developersUsageStatisticsLink}}" id="UsageStatistics" class="btn btn-default pull-right">
|
||||
<span class="glyphicon glyphicon-stats"></span>
|
||||
<span>{% localized "SubscriptionListStrings|WebDevelopersUsageStatisticsLink" %}</span>
|
||||
</a>
|
||||
|
||||
<h2>{% localized "SubscriptionListStrings|WebDevelopersYourSubscriptions" %}</h2>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% localized "SubscriptionListStrings|SubscriptionPropertyLabelDetails" %}</th>
|
||||
<th>{% localized "SubscriptionListStrings|SubscriptionPropertyLabelProduct" %}</th>
|
||||
<th>{% localized "SubscriptionListStrings|WebDevelopersSubscriptionTableStateHeader" %}</th>
|
||||
<th>{% localized "SubscriptionListStrings|SubscriptionPropertyLabelAction" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if subscriptions.size == 0 %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">
|
||||
{% localized "CommonResources|NoItemsToDisplay" %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
{% for subscription in subscriptions %}
|
||||
<tr id="{{subscription.id}}" {% if subscription.hasExpired %} class="expired" {% endif %}>
|
||||
<td>
|
||||
<div class="row">
|
||||
<label class="col-lg-3">{% localized "SubscriptionListStrings|SubscriptionPropertyLabelName" %}</label>
|
||||
<div class="col-lg-6">
|
||||
{{ subscription.displayName }}
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<a class="btn-link" href="/Subscriptions/{{subscription.id}}/Rename">{% localized "SubscriptionListStrings|SubscriptionPropertyLabelRename" %}</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
{% if subscription.isAwaitingApproval %}
|
||||
<div class="row">
|
||||
<label class="col-lg-3">{% localized "SubscriptionListStrings|SubscriptionPropertyLabelRequestedDate" %}</label>
|
||||
<div class="col-lg-6">
|
||||
{{ subscription.createdDate | date:"MM/dd/yyyy" }}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if subscription.isRejected == false %}
|
||||
{% if subscription.startDate %}
|
||||
<div class="row">
|
||||
<label class="col-lg-3">{% localized "SubscriptionListStrings|SubscriptionPropertyLabelStartedDate" %}</label>
|
||||
<div class="col-lg-6">
|
||||
{{ subscription.startDate | date:"MM/dd/yyyy" }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- ko with: Developers.Account.Root.account.key('{{subscription.primaryKey}}', '{{subscription.id}}', true) -->
|
||||
<div class="row">
|
||||
<label class="col-lg-3">{% localized "SubscriptionListStrings|WebDevelopersPrimaryKey" %}</label>
|
||||
<div class="col-lg-6">
|
||||
<code data-bind="text: $data.displayKey()" id="primary_{{subscription.id}}"></code>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<!-- ko if: !requestInProgress() -->
|
||||
<div class="nowrap">
|
||||
<a href="#" class="btn-link" id="togglePrimary_{{subscription.id}}" data-bind="click: toggleKeyDisplay, text: toggleKeyLabel"></a>
|
||||
|
|
||||
<a href="#" class="btn-link" id="regeneratePrimary_{{subscription.id}}" data-bind="click: regenerateKey, text: regenerateKeyLabel"></a>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko if: requestInProgress() -->
|
||||
<div class="progress progress-striped active">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
|
||||
<span class="sr-only"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<!-- ko with: Developers.Account.Root.account.key('{{subscription.secondaryKey}}', '{{subscription.id}}', false) -->
|
||||
<div class="row">
|
||||
<label class="col-lg-3">{% localized "SubscriptionListStrings|WebDevelopersSecondaryKey" %}</label>
|
||||
<div class="col-lg-6">
|
||||
<code data-bind="text: $data.displayKey()" id="secondary_{{subscription.id}}"></code>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<div class="nowrap">
|
||||
<a href="#" class="btn-link" id="toggleSecondary_{{subscription.id}}" data-bind="click: toggleKeyDisplay, text: toggleKeyLabel">{% localized "SubscriptionListStrings|ButtonLabelShowKey" %}</a>
|
||||
|
|
||||
<a href="#" class="btn-link" id="regenerateSecondary_{{subscription.id}}" data-bind="click: regenerateKey, text: regenerateKeyLabel">{% localized "SubscriptionListStrings|WebDevelopersRegenerateLink" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{subscription.productDetailsUrl}}">{{subscription.productTitle}}</a>
|
||||
</td>
|
||||
<td>
|
||||
<strong>
|
||||
{{subscription.state}}
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
<div class="nowrap">
|
||||
{% if subscription.canBeCancelled %}
|
||||
<subscription-cancel params="{ subscriptionId: '{{subscription.id}}', cancelUrl: '{{subscription.cancelUrl}}' }"></subscription-cancel>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Name": "UserProfileUpdate",
|
||||
"$ref-Published": null,
|
||||
"$ref-Draft": null,
|
||||
"$ref-Original": "api-management/portalTemplates/UserProfileUpdate/original.html",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<div class="row">
|
||||
<div class="col-sm-6 col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="Email">{% localized "SigninResources|TextboxLabelEmail" %}</label>
|
||||
<input autofocus="autofocus" class="form-control" id="Email" name="Email" type="text" value="{{email}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="FirstName">{% localized "SigninResources|TextboxLabelEmailFirstName" %}</label>
|
||||
<input class="form-control" id="FirstName" name="FirstName" type="text" value="{{firstName}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="LastName">{% localized "SigninResources|TextboxLabelEmailLastName" %}</label>
|
||||
<input class="form-control" id="LastName" name="LastName" type="text" value="{{lastName}}">
|
||||
</div>
|
||||
{% if IsAadB2CUser == false %}
|
||||
<div class="form-group">
|
||||
<label for="Password">{% localized "SigninResources|WebAuthenticationSigninPasswordLabel" %}</label>
|
||||
<input class="form-control" id="Password" name="Password" type="password">
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="form-group">
|
||||
<input class="form-control" id="Password" name="Password" value="B2CUserPassword" type="hidden">
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary" id="UpdateProfile">
|
||||
{% localized "UpdateProfileStrings|ButtonLabelUpdateProfile" %}
|
||||
</button>
|
||||
<a class="btn btn-default" href="/developer" role="button">
|
||||
{% localized "CommonStrings|ButtonLabelCancel" %}
|
||||
</a>
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"id": "/products/starter",
|
||||
"name": "Starter",
|
||||
"$ref-description": "api-management/products/Starter/product.description.html",
|
||||
"terms": "",
|
||||
"subscriptionRequired": true,
|
||||
"approvalRequired": false,
|
||||
"subscriptionsLimit": 1,
|
||||
"state": "published",
|
||||
"$refs-groups": [
|
||||
"api-management/groups/Administrators/configuration.json",
|
||||
"api-management/groups/Developers/configuration.json",
|
||||
"api-management/groups/Guests/configuration.json"
|
||||
],
|
||||
"$refs-apis": [],
|
||||
"$ref-policy": "api-management/policies/products/Starter.xml",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "/products/unlimited",
|
||||
"name": "Unlimited",
|
||||
"$ref-description": "api-management/products/Unlimited/product.description.html",
|
||||
"terms": null,
|
||||
"subscriptionRequired": true,
|
||||
"approvalRequired": true,
|
||||
"subscriptionsLimit": 1,
|
||||
"state": "published",
|
||||
"$refs-groups": [
|
||||
"api-management/groups/Administrators/configuration.json",
|
||||
"api-management/groups/Developers/configuration.json",
|
||||
"api-management/groups/Guests/configuration.json"
|
||||
],
|
||||
"$refs-apis": [
|
||||
"api-management/apis/Camera_Trap_Animal_DetectiA36G2G/configuration.json",
|
||||
"api-management/apis/Camera_Trap_Batch_Animal_D1RIJ6XN/configuration.json",
|
||||
"api-management/apis/Task_Management__1[Current]/configuration.json"
|
||||
],
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Subscribers have completely unlimited access to the API. Administrator approval is required.
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html >
|
||||
<html>
|
||||
<head />
|
||||
<body>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">Dear $DevFirstName $DevLastName,</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">
|
||||
On behalf of $OrganizationName and our customers we thank you for giving us a try. Your $OrganizationName API account is now closed.
|
||||
</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">Thank you,</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">Your $OrganizationName Team</p>
|
||||
<a href="$DevPortalUrl">$DevPortalUrl</a>
|
||||
<p />
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"subject": "Thank you for using the $OrganizationName API!",
|
||||
"$ref-body": "api-management/templates/AccountClosedDeveloper/body.html",
|
||||
"title": "Developer farewell letter",
|
||||
"description": "Developers receive this farewell email after they close their account.",
|
||||
"isDefault": false,
|
||||
"parameters": [
|
||||
{
|
||||
"name": "DevFirstName",
|
||||
"title": "Developer first name",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"name": "DevLastName",
|
||||
"title": "Developer last name",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"name": "OrganizationName",
|
||||
"title": "Organization name",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"name": "DevPortalUrl",
|
||||
"title": "Developer portal URL",
|
||||
"description": null
|
||||
}
|
||||
],
|
||||
"name": "/templates/AccountClosedDeveloper",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html >
|
||||
<html>
|
||||
<head />
|
||||
<body>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">Dear $DevFirstName $DevLastName,</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">
|
||||
We are happy to let you know that your request to publish the $AppName application in the application gallery has been approved. Your application has been published and can be viewed <a href="http://$DevPortalUrl/Applications/Details/$AppId">here</a>.
|
||||
</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">Best,</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">The $OrganizationName API Team</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"subject": "Your application $AppName is published in the application gallery",
|
||||
"$ref-body": "api-management/templates/ApplicationApprovedNotific15MB9Z2/body.html",
|
||||
"title": "Application gallery submission approved",
|
||||
"description": "Developers who submitted their application for publication in the application gallery on the developer portal receive this email after their submission is approved.",
|
||||
"isDefault": false,
|
||||
"parameters": [
|
||||
{
|
||||
"name": "AppId",
|
||||
"title": "Application id",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"name": "AppName",
|
||||
"title": "Application name",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"name": "DevFirstName",
|
||||
"title": "Developer first name",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"name": "DevLastName",
|
||||
"title": "Developer last name",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"name": "OrganizationName",
|
||||
"title": "Organization name",
|
||||
"description": null
|
||||
},
|
||||
{
|
||||
"name": "DevPortalUrl",
|
||||
"title": "Developer portal URL",
|
||||
"description": null
|
||||
}
|
||||
],
|
||||
"name": "/templates/ApplicationApprovedNotificationMessage",
|
||||
"__GitModuleVersion": 15
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html >
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Letter</title>
|
||||
</head>
|
||||
<body>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">Dear $DevFirstName $DevLastName,</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'"></p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">Thank you for joining the $OrganizationName API program! We host a growing number of cool APIs and strive to provide an awesome experience for API developers.</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">First order of business is to activate your account and get you going. To that end, please click on the following link:</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">
|
||||
<a id="confirmUrl" href="$ConfirmUrl" style="text-decoration:none">
|
||||
<strong>$ConfirmUrl</strong>
|
||||
</a>
|
||||
</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">If clicking the link does not work, please copy-and-paste or re-type it into your browser's address bar and hit "Enter".</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">Thank you,</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">$OrganizationName API Team</p>
|
||||
<p style="font-size:12pt;font-family:'Segoe UI'">
|
||||
<a href="$DevPortalUrl">$DevPortalUrl</a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче