How to add additional headers along with value in wso2 api manger? - wso2-api-manager

I am trying setting up wso2 api manager and trying to add additional header parameter with values from wso2 manager
Is there any way to do, have installed only wso2 api manager,

You can create a sequence like below and update in the insequence of the mediation when publishing the api.
<sequence xmlns="http://ws.apache.org/ns/synapse" name="sequence">
 <property name="Test" value="Test1" scope="transport"/>
</sequence>
or you can use the header mediator. Refer this blog.
Also you can place the sequence in the API file.

Related

WSO2 Carbon - custom mediators in common policies

where i can find in Carbon option to upload my own mediators inside common policies, so its possible to choose from these menu bar and its not necessary to upload file into custom policies in publisher ?
Thanks !
Follow the below steps to upload your custom policies as common policies in WSO2 API Manager
Construct your mediation policy and save it with proper naming convention and extension
Navigate to the Carbon Management console of the API Manager server (https://localhost:9443/carbon) and log in with Admin credentials
Expand Resources accordion and click on Browse
Go to /_system/governance/apimgt/customsequences path and choose either in, or out, or fault Resource Collection based on where your mediation policy wants to be listed
Click on Add Resource and upload the content
Method: Upload from content
File: Upload the mediation policy file
Click on Add
Once the above steps are executed successfully, you can log in to the Publisher portal and select the custom mediation policy from the Common Policies section.

Adding analytics for specific fields in API Connect

I am currently facing an issue while logging specific field in API Connect analytics for SOAP Services.
There is a section in API Designer Analytics where you can define and specify existing Parameters for your API that can be used to gather analytics data about the API. For REST I have tried and I am getting specified fields in Analytics but for SOAP I am not getting.
I am using version 5.0.8.5

Firebase dynamic links - custom suffix

I made a simple python script to generate firebase dynamic links for my app using POST API
https://firebase.google.com/docs/dynamic-links/rest
However, in web UI I can set custom link address (i.e. example.app.goo.gl/customlinkname), while using API address seems to be always auto-generated.
Is there such a feature using POST API?
I tried to set "option": CUSTOM with customSuffix parameter, however response was that option CUSTOM is not supported.
Nope -- this feature is not available using the REST or Client SDKs. Only for Dynamic Links that you create using the Firebase Console.

Get XXXXX#developer.gserviceaccount.com as a service account

I am new to Google Analytics and I am trying to retrieve Google Analytics data using Pentaho Data Integration (CE 6.0) by following Pentaho Google Analytics
It says I need to create a service account to get the data. On the google developer console I at location Google API manager --> Credentials --> Create service account
Now when I try to create a new service account, it by default assigns XXXXX#YYYY.iam.gserviceaccount.com
Instead of this I must have XXXXX#developer.gserviceaccount.com
Can someone please share any insight on how to get XXXXX#developer.gserviceaccount.com as a service account email?
The old format for service accounts was
XXXXX#developer.gserviceaccount.com
the new format for service accounts appears to be
XXXXX#{projectId}.iam.gserviceaccount.com
you will probably not be able to create one with the old format just go with the new format

In wso2 api cloud is it possible to add custom sequence for manipulating request and response to/from back end service

From my understanding of the regular WSO2 API Manager product I could create multiple synapse-configurations and register them as (global or api specific) sequences by placing them in the proper directory.
I would then utilize the Sequence configuration capabilites on the "Manage screen" to apply different sequences to the request and response payloads of the backend.
I read the documentation at https://docs.wso2.com/display/APICloud/Key+Concepts#KeyConcepts-Sequences as it is not possible to add more but I wanted to ask specifically.
Is it at all possible to do this type of manipulation in the current version of public API cloud?
I have talked with the relevant teams and this is how you can add a sequence in the API Cloud. Although I mentioned about adding a sequence via the Gateway's carbon console (and said it was broken), WSO2 API Manager product is not a position to make it working (this is a known limitation). If I explain the reason in simple terms, to support it they will need to ship a lot of mediator UIs which will make the product similar to the WSO2 ESB. Following is what you can do.
Use WSO2 Developer Studio to create the sequence you want.https://docs.wso2.com/display/DVS371/Creating+ESB+Artifacts#CreatingESBArtifacts-Workingwithsequences
Go to API Gateway at https://gateway.api.cloud.wso2.com/carbon
You need to login to the gateway. Username is email#tenantDomain. If your email abc#gmail.com and tenant domain (or the organisation key is xyz) you need to give abc.gmail.com#xyz as the username (note the # in the email being replaced with a DOT). Go to "Manage" in the top level menu of API Cloud and you will be able to figure out your organisation key.
Go to Resources -> Browse menu and navigate to /_system/governance/apimgt/customsequences/ registry path. Upload your sequence to in, out or fault folders based on your requirement. This will be then available when you create APIs via the API Publisher.
Yes, it is possible. You have to follow the below steps.
Go to API Gateway at https://gateway.api.cloud.wso2.com/carbon
You need to login to the gateway. Username is email#tenantDomain. If your email abc#gmail.com and tenant domain (or the organisation key is xyz) you need to give abc.gmail.com#xyz as the username (note the # in the email being replaced with a DOT). Go to "Manage" in the top level menu of API Cloud and you will be able to figure out your organisation key.
After login, you can go to sequence menu and add a sequence. I tried these steps just now and realised there is a broken page at add sequence. We are in the process of fixing it. Will keep you updated.
Difference of API Cloud and API Manager standalone version is, you have to store the sequence in the registry for it to be available at the API Publishing time.
We'll be adding a doc on this at the following location soon.
https://docs.wso2.com/display/APICloud/About+WSO2+API+Cloud#AboutWSO2APICloud-CommonAPICloudusecases

Resources