Azure / Azure/azure-rest-api-specs
API Explore Website for Application Insights has Incorrect Form
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
In https://dev.applicationinsights.io/apiexplorer The "Segment" form field accepts only one input for "GET /metrics".
However, according to the documentation (and the API's behavior) in https://dev.applicationinsights.io/reference for the segment query parameter, it is type "array (csv)":
> The name of the dimension to segment the metric values by. This dimension must be applicable to the metric you are retrieving. To segment by more than one dimension at a time, separate them with a comma (,). In this case, the metric data will be segmented in the order the dimensions are listed in the parameter.
As for behavior, if I manually edit the curl to be the following it seems to accept multiple dimensions as expected:
```
curl "https://api.applicationinsights.io/v1/apps/DEMO_APP/metrics/requests/count?timespan=PT12H&interval=PT1H&aggregation=sum&segment=request%2Fsource,request%2Fname" -H "x-api-key: DEMO_KEY"
```
Contributor guide
Research direction
Start at the API Explorer URL and the GET /metrics definition in the linked reference; trace how the segment query parameter is rendered in the form. Done means the form accepts multiple comma-separated dimensions and generates a request matching the documented API behavior and example curl request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100