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

Add locations/operationsResults endpoint for DELETE workflow #28808

Merged
Show file tree
Hide file tree
Changes from 3 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
@@ -0,0 +1,16 @@
{
"parameters": {
"api-version": "2023-09-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"operationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"location": "westus2"
},
"responses": {
"200": {},
"202": {
"headers": {
"location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ApiManagement/locations/westus2/operationResults/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?api-version=2023-09-01-preview"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,54 @@
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId}": {
"get": {
"tags": [
"OperationResults"
],
"description": "Returns operation results for long running operations executing DELETE or PATCH on the resource.",
"operationId": "OperationsResults_Get",
"x-ms-examples": {
"DeleteOperationResult": {
"$ref": "./examples/ApiManagementGetOperationResult.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/OperationIdParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved the operation result."
Copy link
Member

Choose a reason for hiding this comment

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

operation

Seems like the result needs to be returned as well? there is no model for returning, just a description on the 200.

Copy link
Member Author

Choose a reason for hiding this comment

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

},
"202": {
Copy link
Member

Choose a reason for hiding this comment

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

202

202 is used generally when a long running request is accepted.

Copy link
Member Author

Choose a reason for hiding this comment

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

"description": "The operation is still in progress.",
Copy link
Member

@madhura-np madhura-np May 10, 2024

Choose a reason for hiding this comment

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

progress

Seems like this api should be called only on completed results?
If so, calling this on non-completed operation should fail and user can query the operationstatus to find the status of operation.

"headers": {
"Location": {
"type": "string",
"description": "URL for determining when an operation has completed."
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
}
}
}
}
}