I'm having trouble retrieving the list of APIM Products from the REST API based on the "apiId" passed in. I tried using the IDENTIFIER value from the screenshot below:
However, I get the following error:
Invoke-RestMethod : {"error":{"code":"ResourceNotFound","message":"Api not found.","details":null}} At D:\powershell scripts\testing\test_add_api2.ps1:77 char:5 + Invoke-RestMethod -Method Get -Uri $url -Header @{ "Authorization ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-Rest Method], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMet hodCommand
I'm using the following path to retrieve the list of products:
https://{base url}/apis/{apiId}?api-version=2016-10-10
I've also verified that the access token is valid for 5 days out.
First, am I using the correct id for "apiId"? Second, has the path changed recently if I'm using the correct apiId?