We'd like to promote some exposed APIs from the API manager on a different portal. The APIM Store even has an "Embed" button on the API overview providing an HTML snippet to include an iframe code into the page (refering the /store/apis/widget page).
However - the widget (and according my experience - any response) of the APIM store includes the "X-Frame-Options" set to DENY, effectviely prohibiting use of iframe.
Is there any way to allow the widget into an iframe?
Edit: seeing following post -
I have feeling that I won't be able to anything about the X-Frame-Options header ( https://docs.wso2.com/display/Security/Security+Advisory+WSO2-2016-0092 ), we could remove the header on the proxy server level, but I woudn't like to compromise security
If you want to display store jaggery app within an IFrame, you need to modify the 'jaggery.conf' file located in the <APIM_HOME>/repository/deployment/server/jaggeryapps/store/ directory. There you have to add antiClickJackingOption and antiClickJackingUri(URI that should be allowed) related parameters into the security filters section as below.
"filters":[
{
"name":"HttpHeaderSecurityFilter",
"class":"org.apache.catalina.filters.HttpHeaderSecurityFilter",
"params" : [
{"name" : "hstsEnabled", "value" : "false"},
{"name" : "antiClickJackingEnabled", "value" : "true"},
{"name" : "antiClickJackingOption", "value" : "ALLOW-FROM"},
{"name" : "antiClickJackingUri", "value" : "http://napagoda.com/*"},
{"name" : "blockContentTypeSniffingEnabled", "value" : "false"}
]
},
Related
In case of a sync between Marketo and Microsoft Dynamics the "Microsoft Type" field is added to leads data.
The issue is that there is no access to "Microsoft Type" field via REST API. I don't find its REST API name in the export fields document.
Any idea why it's not available or anyone knows the REST API name for Microsoft Type field?
Well, we integrated our Marketo instance with Salesforce, so I'm not 100% sure how the Type field is called in case of Microsoft Dynamics. However, based on the Salesforce integration (where the API name of the SFDC Type field is sfdcType) I would expect it to be "microsoftType".
To make sure, I would make a call to the Describe Lead API endpoint –at GET /rest/v1/leads/describe.json– to get a list of the field names available on the Lead object.
The response looks something like this:
[
{
"id":4,
"displayName":"Company Name",
"dataType":"string",
"length":255,
"rest": {
"name":"company",
"readOnly":false
},
"soap": {
"name":"Company",
"readOnly":false
}
}
// … other field descriptions
{
"id":90,
"displayName":"SFDC Type",
"dataType":"string",
"length":50,
"rest": {
"name":"sfdcType",// <- REST API name
"readOnly":true
}
}
// … other field descriptions
]
I've made a custom field(Marketo Microsoft Type) and a campaign where I assign Microsoft Type value to the new created custom field
I am using Google Places API Web Service, specifically nearbysearch to search for places around me. However, some of the places names that I get are in languages other than English, some are Chinese and Arabic, I tried to include language=en in the url. However, with no luck. It is worth mentioning that same places names are in English if I look them up in www.google.com/maps
The url I am using:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=25.1677738,55.4030409&radius=500&type=food&language=en&name=&key=YourKey
Please note that I have removed my key from the url.
This is part of the result I am getting with Arabic place name
{
"geometry" : {
"location" : {
"lat" : 25.167926,
"lng" : 55.4015231
}
},
"icon" : "https://maps.gstatic.com/mapfiles/place_api/icons/shopping-71.png",
"id" : "328ca6a7bb4dd48eb44215ed32fa5676fca8e462",
"name" : "سوبر ماركت بوماز ٢٤ساعة",
"place_id" : "ChIJlcEHXrVmXz4RJH7IVn7Rps4",
"reference" : "CoQBfwAAAI8pnOqGRA6E71Mmztnk8ueSA7kS9bn5idY3S5V0_D_JZP2F9knryHUervQXA_RZL3-9KZJH55NrX0dz4p1R1GUQbGz4jXGoDQMJemisTLpiu41dm8-wgZT6XzXsDUeLLo6QbENam3hM2gCXPzpjTu4F7GsV4t4bIX5FhDQ-SufVEhDYboMkA1reMj20kM4AAvzGGhStwclS0fE9rWQkn5LTUcxiio-3vA",
"scope" : "GOOGLE",
"types" : [
"grocery_or_supermarket",
"food",
"store",
"point_of_interest",
"establishment"
],
"vicinity" : "U2 - Italy U17 - Dubai"
}
Looked around the community for a while and found this a post that is regarding the inconsistency in the language used in Google Places API results. And as per the answer, it seems that it is actually a correct behavior, from the answer:
Even if you specify a language, it will return the response in that language only if there is one available, if not it will return the response in the language it was originally entered in.
There are workarounds included in there that I think that would be helpful.
I want to use the Afresco REST API to download a document. After some research I find out this REST API:
/alfresco/s/api/node/content{property}/{store_type}/{store_id}/{id}
But I am not sure how to pass the parameters.
If my document details URL in Share is :
http://127.0.0.1:8080/share/page/context/mine/document-details?nodeRef=workspace://SpacesStore/7f77488a-60a0-48c3-9369-77183ccad0d2
What should be passed in {property}, {store_type}, {store_id} and {id}?
For this NodeRef
workspace://SpacesStore/7f77488a-60a0-48c3-9369-77183ccad0d2
the values for parameter will be:
{property}: content
{store_type}: Workspace
{store_id}: spaceStore
{id}: 7f77488a-60a0-48c3-9369-77183ccad0d2
Details related to each parameter is already specified by Krutik.
And you should use this download url.
/alfresco/d/<d|a>/<workspace>/<store>/<nodeId>/<filename>
where d=direct and a=attached.
The attach or direct element is used to indicate whether to display the stream directly in the browser or download it as a file attachment.
You can find details of every web-script (REST API) in alfresco on below URL.
http://localhost:8080/alfresco/service/index
For your API it is given as below.
http://localhost:8080/alfresco/service/script/org/alfresco/cmis/content.get
Description of parameter is as below.
Property : Name of property which you want to retrieve.
store_type : Workspace Protocol
store_id : Store Id of node
id : Id of node.
I'm new in iPhone Development. I'm creating an application in which i need to fetch all the Restaurents, supermarkets, malls etc. in the nearby location using GoogleApi. Im using following link to find the venue:
https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=grocery_or_supermarket&sensor=true&key=AIzaSyAiFpFd85eMtfbvmVNEYuNds5TEF9FjIPI
But I'm getting the following message:
"html_attributions" : [],
"results" : [],
"status" : "REQUEST_DENIED"
Please help.
Any solution will be appreciated.
Thanks in advance.
"Access denied" is coming because the key(AIzaSyAiFpFd85eMtfbvmVNEYuNds5TEF9FjIPI) you are using is not valid.
You have to register your project on on Google and have to generate unique key from this link.replace the generated key with the key in your link, then this will work fine.
If you have any other query let me know.
I want to write a query that gets back everything that is known about a topic (only needs to be one level deep.
When working in the Freebase MQL Editor they give the following example for "Everything we know about Jimi Hendrix":
{
"*" : null,
"name" : "Jimi Hendrix",
"type" : "/music/artist"
}
The problem is that the query is bound to a type "/music/artist" and is only getting back properties that relate to that type. If you change the query to use a different type you get an entirely different result set.
{
"*" : null,
"name" : "Jimi Hendrix",
"type" : "/people/person"
}
How can I write a query that really gets back everything that Freebase knows about Jimi Hendrix?
To do this you'll need a more advanced type of query that looks at the underlying links (/type/link) that make up the Freebase graph. Each link has a source, a target and a property assigned to it and they can be queried like this:
[
{
"master_property" : null,
"source" : {
"id" : "/en/jimi_hendrix"
},
"target" : null,
"target_value" : null,
"type" : "/type/link"
}
]
These are called the outgoing links and represent most of the values that you usually see in the Freebase UI but you can also swap the source and target to get a list of incoming links links this:
[
{
"master_property" : null,
"source" : null,
"target" : {
"id" : "/en/jimi_hendrix"
},
"type" : "/type/link"
}
]
These links include properties on other topics that refer to Jimi Hendrix as their value and these values are not all shown on the Freebase Jimi Hendrix page to keep the volume of information to a manageable level.
The Freebase Topic API might be what you're after:
http://www.freebase.com/experimental/topic/standard?id=/en/jimi_hendrix
The Topic API will grab all properties directly related to a topic in the graph. The API wraps a series of MQL queries to get all the data and outputs in JSON.
Google "Freebase Topic HTTP API" for further information.
After a while, we figured this is a typical use case, so we introduce a whole new API for doing this:
http://www.freebase.com/docs/topic_api
This will get you all the properties from the above queries, as well as mediators and other goodies.
Note that if you want all the properties from ALL the topics in Freebase, you should be using the data dumps and not the run-time query language (it will be many times faster).