While calling the Azure DevOps Feed API to list NPM packages, I’m getting an error indicating a conflict between query parameters, even though I’m only explicitly passing packageNameQuery.
- Run the following Node.js code:
const apiUrl = `https://feeds.dev.azure.com/${organization}/_apis/packaging/Feeds/${feedId}/packages?protocolType=Npm&packageNameQuery=${packageName}&includeAllVersions=true&$top=${top}&$skip=${skip}&api-version=7.1`;
const curlCmd = curl -s -H "Authorization: Bearer ${accessToken}" "${apiUrl}";
const apiResponse = execSync(curlCmd).toString();
console.log(apiResponse);
**Expected Behavior:** The API should return the list of NPM packages filtered by `packageNameQuery`.
**Actual Behavior:** The API returns the following error response:
```json
{
"$id": "1",
"innerException": null,
"message": "Query parameter 'normalizedPackageName' conflicts with 'packageNameQuery'.",
"typeName": "Microsoft.VisualStudio.Services.Feed.WebApi.IncompatibleQueryParametersException, Microsoft.VisualStudio.Services.Feed.WebApi",
"typeKey": "IncompatibleQueryParametersException",
"errorCode": 0,
"eventId": 3000
}
Notes:
I am not including normalizedPackageName anywhere in the query.
- The issue seems to occur when using
top and skip.