Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -683,6 +683,57 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.BotService/locations/{location}/operationresults/{operationId}": {
"get": {
"x-ms-examples": {
"Get Server Details": {
"$ref": "./examples/operationResults.json"
}
},
"tags": [
"Operations"
],
"operationId": "OperationResult_Get",
"x-ms-long-running-operation": true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

GET operations MUST not be long running. If the resource takes a long time to come up, please user provisioning states.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i added the x-ms-longrunning attribute as autorest was complaining about it, so i have now removed it.
instead of a long running operation we merely want a way to query for an operation result. the operation result operation isnt longrunning itself. sorry for the confusion.

"description": "List the result of the specified operation.",
"parameters": [
{
"name": "location",
"in": "path",
"required": true,
"type": "string",
"description": "The region name which the operation will lookup into. including 'global'"
},
{
"name": "operationId",
"in": "path",
"required": true,
"type": "string",
"description": "The target operation Id."
},
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/subscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "If the operation completed successfully, the service should return 200 (OK)."
},
"202": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On similar lines, not sure if the service is supposed to return a 202 response. 202 status code corresponds to accepted, i.e., the operation as been accepted but not completed. A non-long running GET operation MUST finish and return right away.
Please confirm is the service has undergone an ARM/API review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the above pattern is directly taken from azure-rest-api-specs\specification\analysisservices\resource-manager\Microsoft.AnalysisServices\stable\2016-05-16\analysisservices.json (please see line 425)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The file you pointed out is incorrect too. 202 is simply not acceptable for a GET operation. Does your service actually return that status code?

"description": "If the operation has been accepted and is ongoing, the service should return 202 (Accepted)"
},
"default": {
"description": "Error response describing why the operation failed",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/BotServices/listServiceProviders": {
"post": {
"tags": [
Expand Down Expand Up @@ -765,7 +816,7 @@
}
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}": {
"put": {
Expand Down Expand Up @@ -1990,7 +2041,7 @@
"description": "Diplay Name of the Service Provider",
"readOnly": true
},
"serviceProviderName": {
"serviceProviderName": {
"type": "string",
"description": "Diplay Name of the Service Provider",
"readOnly": true
Expand Down Expand Up @@ -2212,38 +2263,38 @@
"modelAsString": false,
"values": [
{
"value": "FacebookChannel"
"value": "FacebookChannel"
},
{
"value": "EmailChannel"
"value": "EmailChannel"
},
{
"value": "KikChannel"
"value": "KikChannel"
},
{
"value": "TelegramChannel"
"value": "TelegramChannel"
},
{
"value": "SlackChannel"
"value": "SlackChannel"
},
{
"value": "MsTeamsChannel"
"value": "MsTeamsChannel"
},
{
"value": "SkypeChannel"
"value": "SkypeChannel"
},
{
"value": "WebChatChannel"
"value": "WebChatChannel"
},
{
"value": "DirectLineChannel"
"value": "DirectLineChannel"
},
{
"value": "SmsChannel"
"value": "SmsChannel"
}
]
},
"description": "The name of the Channel resource."
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60",
"location": "global",
"operationId": "00000000000000000000000000000000",
"api-version": "2017-12-01"
},
"responses": {
"200": {
"headers": {}
},
"202": {
"headers": {}
}
}
}