application not found with luis api version 3.0 preview - azure

I was testing the new preview 3.0 version for LUIS on the test console available at "https://westus.dev.cognitive.microsoft.com/docs/services/luis-endpoint-api-v3-0-preview/operations/5cb0a9459a1fe8fa44c28dd8/console" .
Despite I am using the same key and app id that correctly work for version 2.0 I get as response the error message "The application wasn't found. Please make sure that the application is published to this region".
The ID for the application I inserted in the console form is published for westus region, the error message seems not truthful.
Anybody else is having the same issue?
Thanks

It seems like a bug in the documentation. Please try adding /slot/{slotName}/ before the predict keyword, where slotName is either staging or production. So the url becomes:
https://westus.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{appId}/versions/{versionId}/slots/{slotName}/predict?query={query}
An example would be:
https://westus.api.cognitive.microsoft.com/luis/v3.0-preview/apps/a1fc3658-a4c5-4fb2-88d3-69ba49e7abad/versions/0.1/slots/production/predict?query={query}

Thanks for your reply.
I added the /slot/production or /slot/staging part to the URL but this seems not to be enough for me.
After this change I get a 404 error as answer:
{
"error": {
"statusCode": 404,
"message": "Resource not found"
}
}

This is a new feature introduced in v3. We now allow publishing to the endpoint using the version Id instead of publishing to a slot. Since the version publishing isn't supported in the UI currently, you won't be able to publish to a version (yet). For now, use the publishing slot as Omar suggests.

Below the working Request URL produced by the get published slot prediction console, available at https://westus.dev.cognitive.microsoft.com/docs/services/luis-endpoint-api-v3-0-preview/operations/5cb0a91e54c9db63d589f433/console :
https://westus.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{APPID}/slots/Production/predict?query={QUERY}&verbose=true&log=true&show-all-intents=true
Thanks

Related

RestTemplate API call between microservice is Not working

I have 2 microservices based on SAP SDK 3.0 archetype binded by the same xsuaa service.From the first microservice A, I wanted to call the second microservice B by using rest template. It fails to call, as it is not able to authenticate. Can you find my approach is right?
Sharing the code below along with the error screenshot
Error:
<200,document.cookie="fragmentAfterLogin="+encodeURIComponent(location.hash)+";path=/";document.cookie="locationAfterLogin="+encodeURIComponent(location.href.split('#')[0].split(location.host)1)+";path=/";document.cookie="signature=pim93tQhbcWCYYAiFxYkwrHBY%2Fs%3D;path=/";location="https://xxxxx.hana.ondemand.com/oauth/authorize?response_type=code&client_id=sb-Ledify!t7251&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2Flogin%2Fcallback",{x-request-id=[k8h8rf33], x-frame-options=[SAMEORIGIN], Cache-Control=[no-cache, no-store, must-revalidate], Content-Type=[text/html], Content-Security-Policy=[script-src 'self' 'unsafe-inline'], Date=[Wed, 01 Apr 2020 11:23:01 GMT], Connection=[keep-alive], Content-Length=[620]}>
Note : localhost:5000 is my local approuter port and it is configured to call the second microservice which I have tested it in browser
Updated:
I have updated with getToken() but I am getting the below error in my local approuter.
Error Response:
xsapp.json Route
{
"source": "/notif-mock/(.*)",
"authenticationType": "xsuaa",
"destination": "notif-mock",
"csrfProtection": true
}
FYI, I have used the local approuter setup as per this post Link here
In the following line, you are concatenating a String with DecodedJWT:
String encodedAuth = "Bearer " + getJWTTokenDetails();
But DecodedJWT does not implement a toString() method. You must use getToken() instead.
Hint: For easier support handling please copy/paste your code, because text in screenshot cannot efficiently be referenced.
Arun,
Thanks for providing all the additional details. I recommend updating to SDK Version 3.16.1 and testing if it solves your issue.
I do it because version 3.9.0 which you're using at the moment has an incomplete implementation of security scenarios invoked by XSUAA.
We fixed many issues related to the handling of XSUAA and JWT validation in release 3.15.1. Please, check release notes for details..
If even after update your issue persists, we'll have to see how we can reproduce it or get more logs data from you as a response only doesn't provide enough clue on where it fails.
Hope it helps!

azure - keep receiving 404 for a cognitive service I just signed up?

This is super werid.
So I just created my resource group and signed up for a cognitive service.
pretty sure i have the right key and the right resource url.
yet I kept receiving "404 resource not" found for every api call i made to it.
Anyone ever ran into a problem similiar to this? And what do you think what might be the problem here? Will super appreicate any suggestions & recommendtions on how to resolve it!
solved it.. imageSearchEndPoint in
const client = new ImageSearchClient(cognitiveServiceCredentials, {
endpoint: imageSearchEndPoint,
});
(of the #azure/cognitiveservices-imagesearch) should just be the full domain name and not the full api url
i.e. https://meow.cognitiveservices.azure.com/ and not https://meow.cognitiveservices.azure.com/bing/v7.0.

Azure Media Service REST API error MissingApiVersionParameter

I am trying setup media service pipeline via rest services using
https://learn.microsoft.com/en-us/azure/media-services/latest/stream-files-tutorial-with-rest
Section : Encode remote file stream video – REST
We are getting an error at mentioned Step : Create an output asset
As per documentation
https://management.azure.com/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.Media/mediaServices/:accountName/assets/:assetName?api-version={{api-version}}
Endpoint that we generaetd: https://management.azure.com/subscriptions/xxxx-xxx-xxx-xxx-xxxxxxxxxx/resourceGroups/xxxxxx_resource_group/providers/Microsoft.Media/mediaServices/xxxxx/assets/xxxxxxxxxx?api-version=2018-08-01
Even if we give api version as 2.1, 2.2 etc …. Then also error is same.
response error :
{
"error": {
"code": "MissingApiVersionParameter",
"message": "The api-version query parameter (?api-version=) is required for all requests."
}
}
In REST v2 the API versions were 2.0 through 2.19, current. But in the REST v3 the API the released version is 2018-07-01. See
https://learn.microsoft.com/en-us/rest/api/media/assets/createorupdate.
Also, download the Postman Collection for V3 and look at the URLs. Make sure that you are formatting them properly.
https://learn.microsoft.com/en-us/azure/media-services/latest/media-rest-apis-with-postman
Use the Postman Console to see the full URL post (open via Alt-CTL-C)
Typical create Asset call would look like:
https://management.azure.com/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.Media/mediaServices/:accountName/assets/:assetName?api-version={{api-version}}
"/assets?api-version=2018-07-01" is an example

OData service can be called in Browsers but in Excel 2016

I got a sample servlet using Olingo lib: https://odata-demoservice.run.aws-usw02-pr.ice.predix.io/DemoService.svc/Products. It works fine in Chrome/IE/FF or in Postman. But when I query in Excel 2016/OS Windows 10 with the steps like:
New Query
From Other Sources
From OData Feed
Got the error like: "We encountered an error while trying to connect. Details: Invalid URI: The hostname could not be parsed"
Any ideas are appreciated.
Thanks
#RodolfoOliveira: yes, I resolved this issue. the reason is that when I deployed it to Cloud, the uri in metadata is still http. What I did is implement a CustomProcessor and correct the url.
More detail is here: https://issues.apache.org/jira/browse/OLINGO-758
just need to do the custom Processor. Do the same as the original source but change a bit about the url. Detail in here: https://olingo.apache.org/javadoc/odata4/org/apache/olingo/server/api/processor/DefaultProcessor.html
Register it with the Handler at first, then the issue should be solved.
ODataHttpHandler handler = odata.createHandler(edm);
handler.register(new CustomDefaultProcessor());
Hope this help.

Azure Function error - 'The Keys feature is not available because Authentication/Authorization is enabled for this Function App.'

I wanted to learn about Azure Functions and so created a one from the HttpTrigger-CSharp template in the portal.
Once the Azure Function was created I see a warning message in the Keys tab indicating that 'The Keys feature is not available because Authentication/Authorization is enabled for this Function App.'
Under 'Integrate', allowed HTTP methods are 'All methods', the mode is 'Standard' and the Authorization Level is 'Function'.
Under 'Manage', the error message is displayed for Function keys and Host Keys and the function state is enabled.
In the Settings of the Functional App itself, I navigated to 'Platform Features' / 'Networking' / 'Authentication / Authorization' and App Service Authentication is Off, contrary to the error message.
Where I attempt to Test the Azure Function, I get none of the expected messages in the log.
When I click on ' Get function URL', the function URL is empty.
Does anyone have any idea what is going on? Hopefully I am missing something simple.
It should be noted that I can create an Azure Function from the TimerTrigger-CSharp template and it runs successfully.
So this is a pretty big bug, you can follow this thread.
https://github.com/projectkudu/AzureFunctionsPortal/issues/1229
I encourage you to complain in that thread. Issue resolved.
There was an issue in the latest portal deployment. It has now been addressed. Please see https://github.com/projectkudu/AzureFunctionsPortal/issues/1229 for details.
We had the same issue, and it was a ui glitch and indeed has been resolved now as #david-ebbo mentioned.

Resources