Extracting custom HTTP Headers to be used in a DSS service - http

We have a WOS2 DSS service which is used as the backend of an API created in WSO2 APIM. Since management wanted to create a custom http headers (username,passwd) which will be used to verify if the users is authorized based on a db data. How can I extract header data and pass it to the dss service as a parameter to be used in the query for authentication?

You can try custom sequence option. Define your mediation logic and store that in registry. And when publishing API use that sequence.
When defining mediation logic, extract that particular http header and make that to available in the request URL. Use, HTTP endpoints for that. Define properties in your custom sequence, which can extract values from your custom header.

Related

Why Language service in Azure requires a location instead of an endpoint

Most examples of Cognitive Services in Azure require an endpoint and a key. However the Language service in Azure needs a Location, instead of Endpoint? Why?
?
https://microsoftlearning.github.io/AI-900-AIFundamentals/instructions/04b-translate-text-and-speech.html
It is because the first part of the endpoints are the same, and the system use region to append to the general endpoint URL to generate the whole endpoint as below screenshot - api.cognitiveservice.microsofttranslator.com/[region/location]
I think this is just the difference of how to generate endpoint between different products - directly generate the whole endpoint URL or do A + region
Hope this helps.

How can HTTP queries be run in the Azure Monitor workbooks?

How can HTTP queries be run in the Azure Monitor workbooks?
I read all the documentation here and still can not find how could I use my application health checks http endpoints to report on my application status in an Azure Monitor woorkbook.
I have an ASP.NET application if it matters. It exposes endpoints which I would like to call from the workbook and do different visualizations depending on the data returned.
You'd use the "Custom Endpoint" data source in the Query step.
https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-data-sources#custom-endpoint
The endpoint needs to support CORS, because the calls would be coming from the azure portal, and also needs to support https, because the portal itself is loaded via https.
The endpoint is also expected to return JSON content, and then you can use JSONPath inside the settings of the custom endpoint's Result Settings tab to transform it into grid data.

Mule 4 : When Autodiscovery automatically applies a policy for a deployed API and manages it, why to add client id enforcement in API specification?

I have a question regarding Autodiscovery, and adding code fragments of policies to an API specification.
Using Autodiscovery, we can apply policies and it will be applicable to the deployed application. For example Rate limiting policy applied through Autodiscovery will work fine to manage the access of our API.
Then what is the purpose of adding Client id enforcement or adding the code snippet of this policy to the API RAML? Does this mean that once the RAML changes are done, we again need to update out code to include this new RAMl from exchange and redeploy our application?
The purpose of the snippet is to document that client_id and client_secret have to be send as part of the HTTP request to the REST API. It will also make APIKit validate that it is receiving the expected information for the policy to work.

How to expose the data service using wso2ei

I am new to this area, can anyone please help me on this. Below is my requirement.
I have a data source and i want to access those data through REST service, i have created a data source and its giving response when executing as CURL command. Further what i want to do is need to expose that as REST service in WSO2EI and the endpoint have to be configured/publish in wso2 API manager.
Please guide me on the flow how to achieve this, I have tried my best but i couldn't make much progress.
Thanks in advance.
You can create DSS REST services by creating ODATA service [1]. If you are using ODATA, you do not need to manually define CURD operations. DSS server will automatically map RDBMS database with CURD operations.
Otherwise you can create custom REST service with Data services as it described in here[2]. Here you can define a REST service along with the SQL query that need to execute for particular request.
I found this blog[3] that contain instruction to expose Data service with WSO2 API manager with an example. This example generate ODATA service with WSO2EI and expose as managed API with WSO2 API manager as following diagram.
https://docs.wso2.com/display/EI640/Exposing+Data+as+an+OData+Service
https://docs.wso2.com/display/EI640/Exposing+a+Datasource+as+a+Data+Service
https://medium.com/wso2-learning/how-to-expose-your-database-as-a-managed-api-with-wso2-in-10-minutes-c9ac2595738b

APIGEE - More than 2 WSDL to Same Proxy

We are planning to create a custom webservice solution on APIGEE.
Our requirement is create a single API PROXY which should be serve for more than 2 WSDL.
All WSDL contains different Operation and Binding.
Also data type defined in schema also entirely different.
Our main objective is no need to modify the API PROXY for any customer in the future.
Also want to utilize the OAUTH service provided by APIGEE for authetication.
Can you please tell how feasible in APIGEE?

Resources