Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cognitive Services] Update endpoint URL template for Content Moderator. #3505

Merged
merged 2 commits into from Aug 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ nodejs:
package-name: azure-cognitiveservices-contentmoderator
package-version: 3.0.0
output-folder: $(node-sdks-folder)/lib/services/contentModerator
override-client-name: ContentModeratorAPIClient
azure-arm: false
generate-license-txt: true
generate-package-json: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Content Moderator Client",
"version": "1.0",
"description": "You use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.\r\n\r\nWhen using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. \r\nText can be at most 1024 characters long. \r\nIf the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue.\r\n\r\nThis API is currently available in:\r\n\r\n* West US - westus.api.cognitive.microsoft.com\r\n* East US 2 - eastus2.api.cognitive.microsoft.com\r\n* West Central US - westcentralus.api.cognitive.microsoft.com\r\n* West Europe - westeurope.api.cognitive.microsoft.com\r\n* Southeast Asia - southeastasia.api.cognitive.microsoft.com ."
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the outdated region list.

"description": "You use the API to scan your content as it is generated. Content Moderator then processes your content and sends the results along with relevant information either back to your systems or to the built-in review tool. You can use this information to take decisions e.g. take it down, send to human judge, etc.\r\n\r\nWhen using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. \r\nText can be at most 1024 characters long. \r\nIf the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue."
},
"securityDefinitions": {
"apim_key": {
Expand All @@ -18,17 +18,14 @@
}
],
"x-ms-parameterized-host": {
"hostTemplate": "{baseUrl}",
"hostTemplate": "{Endpoint}",
"useSchemePrefix": false,
"parameters": [
{
"$ref": "#/parameters/baseUrl"
"$ref": "#/parameters/Endpoint"
}
]
},
"basePath": "/",
"schemes": [
"https"
],
"paths": {
"/contentmoderator/moderate/v1.0/ProcessImage/FindFaces": {
"post": {
Expand Down Expand Up @@ -2916,7 +2913,9 @@
"Metadata": {
"description": "Image List Metadata.",
"type": "object",

"additionalProperties": {
"type": "string"
},
"properties": {
"Key One": {
"description": "Optional Key value pair to describe your list.",
Expand Down Expand Up @@ -2949,6 +2948,9 @@
"Metadata": {
"description": "Term list metadata.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"properties": {
"Key One": {
"description": "Optional Key value pair to describe your list.",
Expand Down Expand Up @@ -3843,34 +3845,14 @@
"description": "The image file.",
"x-ms-parameter-location": "method"
},
"baseUrl": {
"name": "baseUrl",
"description": "Supported Azure regions for Content Moderator endpoints",
"Endpoint": {
"name": "Endpoint",
"description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).",
"x-ms-parameter-location": "client",
"required": true,
"type": "string",
"in": "path",
"x-ms-skip-url-encoding": true,
"x-ms-enum": {
"name": "azureRegionBaseUrl",
"modelAsString": true
},
"enum": [
"westus.api.cognitive.microsoft.com",
"westus2.api.cognitive.microsoft.com",
"eastus.api.cognitive.microsoft.com",
"eastus2.api.cognitive.microsoft.com",
"westcentralus.api.cognitive.microsoft.com",
"southcentralus.api.cognitive.microsoft.com",
"westeurope.api.cognitive.microsoft.com",
"northeurope.api.cognitive.microsoft.com",
"southeastasia.api.cognitive.microsoft.com",
"eastasia.api.cognitive.microsoft.com",
"australiaeast.api.cognitive.microsoft.com",
"brazilsouth.api.cognitive.microsoft.com",
"contentmoderatortest.azure-api.net"
]
"x-ms-skip-url-encoding": true
}

}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"teamName": "ModeratorTeam",
"reviewId": "201711v18ea829372b14f9e9d382621e62429a9",
"Content-Type": "application/json",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"teamName": "ModeratorTeam",
"reviewId": "201711v18ea829372b14f9e9d382621e62429a9",
"timescale": 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "89003",

"label": "test",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "89003",
"tag": 105,
"label": "test",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "89003",
"term": "hell",
"language": "eng"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"teamName": "Content moderator",
"reviewId": "201711v18ea829372b14f9e9d382621e62429a9",
"Content-Type": "text/plain",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"Content-Type": "application/json",
"body": {
"Name": "ImageList B",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"teamName": "sonaliProdTeam",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"ContentType": "Image",
"ContentId": "ContentID A",
"WorkflowName": "TestWorkflow",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"teamName": "ModeratorTeam",
"subTeam": "SubteamA",
"UrlContentType": "application/json",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"createReviewBody": [
{
"Metadata": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"Content-Type": "application/json",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"body": {
"Name": "TermList B",
"Description": "List of racy terms.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"teamName": "ModeratorTeam",
"subTeam": "SubteamA",
"Content-Type": "application/json",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "89003"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"listId": "89003",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"language": "eng"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "89003"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "89003",
"ImageId": "34562"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "89003"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "89003",
"term": "hell",
"language": "eng"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"Content-Type": "text/plain",
"Text Content": "Is this a crap email [email protected], phone: 6657789887, IP: 255.255.255.255, 1 Microsoft Way, Redmond, WA 98052"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",

"Content-Type": "application/json",
"ImageUrl": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"CacheImage": true,
"Content-Type": "image/jpeg",
"ImageStream": "11111111111111111111111111111111001111111111001111111111000111110011111000111111000001111000011110000011100000001110000111000000011000000000000000000000000100000000000000000000000000000000000000000000000000001000000000000000000000000110000110001000010001100001110011111111001111111100111110011111110011111110011111111111111111111111111111"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "a79e5f9eeafa4f059ac507a93e1a9ff1",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",

"Content-Type": "application/json",
"ImageUrl": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "a79e5f9eeafa4f059ac507a93e1a9ff1",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"CacheImage": true,
"imageFileContentType": "image/jpeg",
"ImageStream": "11111111111111111111111111111111001111111111001111111111000111110011111000111111000001111000011110000011100000001110000111000000011000000000000000000000000100000000000000000000000000000000000000000000000000001000000000000000000000000110000110001000010001100001110011111111001111111100111110011111110011111110011111111111111111111111111111"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "89003"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "89003",
"language": "eng"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"teamName": "Content moderator",
"reviewId": "201711v18ea829372b14f9e9d382621e62429a9"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "123",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"listId": "123"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com"
"Endpoint": "{Endpoint}"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"teamName": "ModeratorTeam",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"JobId": "201709i96f295aa5748101436064c42ddf"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"teamName": "ModeratorTeam",
"reviewId": "201709i96f295aa5748101436064c42ddf",
"baseUrl": "southeastasia.api.cognitive.microsoft.com"
"Endpoint": "{Endpoint}"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"listId": "89003",
"baseUrl": "southeastasia.api.cognitive.microsoft.com"
"Endpoint": "{Endpoint}"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com"
"Endpoint": "{Endpoint}"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"cacheimage": true,
"Content-Type": "application/json",
"listId": "12345",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"baseUrl": "southeastasia.api.cognitive.microsoft.com",
"Endpoint": "{Endpoint}",
"cacheimage": true,
"imageFileContentType": "image/jpeg",
"listId": "12345",
Expand Down
Loading