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

[BUG] Incorrect type for Microsoft.SecurityInsights/threatIntelligence/main/queryIndicators keywords #33013

Open
jasonparallel opened this issue Mar 5, 2025 · 0 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@jasonparallel
Copy link

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2025-03-01/ThreatIntelligence.json#L890

API Spec version

2025-03-01

Describe the bug

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2025-03-01/ThreatIntelligence.json#L890
Specifies the keywords search param as a array of Strings. The API returns that this is invalid.

{ "pageSize": 100, "keywords": ["test"], "sources": [ "analyst1_dev.local.analyst1.com" ], "sortBy": [ { "itemKey": "lastUpdatedTimeUtc", "sortOrder": "descending" } ] }

Yields
{ "error": { "code": "BadRequest", "message": "JsonToken EndArray is not valid for closing JsonType Object. Path '', line 3, position 22.\nUnexpected character encountered while parsing value: [. Path 'keywords', line 3, position 15." } }

Changing keywords to ids (which is also an array of strings) returns 200 response. I'm not sure what the correct type is but is seems to not be the documented one.

Tested with several api spec versions.

Expected behavior

200 with response when a spec compliment message is sent

Actual behavior

400 error
{ "error": { "code": "BadRequest", "message": "JsonToken EndArray is not valid for closing JsonType Object. Path '', line 3, position 22.\nUnexpected character encountered while parsing value: [. Path 'keywords', line 3, position 15." } }

Reproduction Steps

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/queryIndicators?api-version=2024-09-01
{ "pageSize": 100, "keywords": ["test"], "sources": [ "analyst1_dev.local.analyst1.com" ], "sortBy": [ { "itemKey": "lastUpdatedTimeUtc", "sortOrder": "descending" } ] }

Environment

No response

@jasonparallel jasonparallel added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 5, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

1 participant