Azure / Azure/azure-rest-api-specs

Monitor Action Group 2021-09-01 itsmReceivers returns Internal Server Error

Open
#20,488 0 comments 0 reactions 0 assignees View on GitHub
Monitor - Operational Insights Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

When PUT monitor action group with version 2021-09-01 in the [Swagger link](https://github.com/Azure/azure-rest-api-specs/blob/3de536d7c66c85f88d84c258ecf9d839865e17c1/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/actionGroups_API.json#L40). If set `itsmReceivers.ticketConfiguration = "{}"`, the service API will return 500 error. I also tried `"ticketConfiguration": {\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}` can work well, like in this example [link](https://github.com/Azure/azure-rest-api-specs/blob/3de536d7c66c85f88d84c258ecf9d839865e17c1/specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/examples/createOrUpdateActionGroup.json#L58).

Further test result shows that `"{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\"}"` can work well, seems `PayloadRevision` and `WorkItemType` keys are required in JSON string.

### API payload
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/wt-monitoring/providers/microsoft.insights/actionGroups/wttetsgroup?api-version=2021-09-01
```json
{
"location": "Global",
"tags": {},
"properties": {
"groupShortName": "sample",
"enabled": true,
"itsmReceivers": [
{
"name": "Sample itsm",
"workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c",
"connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1",
"ticketConfiguration": "{}",
"region": "westeurope"
}
]
}
}
```

Response: Status 500 Internal Server Error
```json
{
"code": "InternalError",
"message": null
}
```
x-ms-request-id: 4782f986-a896-4750-9a1e-61c8532d2434
x-ms-correlation-request-id: 28bbb144-a46c-40d7-9998-0c92ad85b682

Contributor guide

Open the contributing guide

Research direction

Start with specification/monitor/resource-manager/Microsoft.Insights/stable/2021-09-01/actionGroups_API.json and the linked createOrUpdateActionGroup.json example. Reproduce the PUT request with the documented ticketConfiguration variants and determine how the specification represents the required PayloadRevision and WorkItemType fields. Done means the required behavior or specification discrepancy is clearly identified and the 500 response is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.