I've been trying all day how to load a json object cross domain. I was using a json to jsonp service at jsonp.nodejitsu.com but that has been down all day and I need to do this on my own.
This is where I've got so far:
$.getJSON("https://cex.io/api/ticker/WDC/BTC/?callback=?",function(data){console.log(data);});
Can anybody explain to me why this is not working? I am becoming very frustrated. I thought this was supposed to be easy!
Related
I was handed a D9 site. Have not touched Drupal since D7. Anyway, we have a client that is sending data to an endpoint on our sided. Here are the comments/notes that I got:
MarktCom populates some hidden vars on their site and sends them to the endpoint like this /Casingo/api/post
Casingo gets those values and contacts MarktCom's api with the clientID.
MarktCom then returns the member data
I realize this is probably a stupid question, but how do I find/get/see the data that MarktCom sent? I have gone thru the custom module. I see the endpoint url (above), I see the api data path and api domain. but I don't see the data when I dig into the directory (i'm assuming it probably a .json file.). I can see the ultimate .csv files that are being created from the data, but not the actual data.
Lots has happen due to the issues of the past couple of years, so getting to anyone on their side that knows what going has been hard/impossible. The overarching issue is that the .csv file, a couple of months ago, the data/info started all duplicating, so I want to see what we are getting so I can determine where to start fix.
And ideas on how I can investigate this would be much appreciated.
I'm having real trouble getting Informatica PowerCenter or Developer to call a URI based REST API and I'm doing it for something simple (JIRA's API). Basically I want to call JIRA's worklog REST API which is a different URL for a list of issue ids and write it to our DB.
https://docs.atlassian.com/jira/REST/6.2/
/rest/api/2/issue/{issueIdOrKey}/worklog
Informatica PowerCenter supports only HTTP transformation which is only a simple GET. Unfortunately the latest version is still stuck in the 'old' query type URL building where they append inputs into search strings. E.g. if I have a "key" input field with value "ABC-1" and the URL is jira/rest/api/2/search it would actually build the URL on the fly into jira/rest/api/2/search?key=ABC-1. While some of JIRA's API works this way, some use the URI way e.g. jira/rest/api/2/ABC-1/worklog which requires embedding the value into the URI. There's no way I can get this to work :-
if I do jira/rest/api/$key/worklog it still converts the URI into jira/rest/api/$key/worklog/?key=ABC-1 so $key does not get replaced
even if i pre-build the URI outside the mapping it's not feasible as the URI needs to be dynamic to the list of JIRA keys and anyway because it appends ? at the end JIRA throws an error (because ? is a reserved key word for this API)
HTTP transformation does not support NTLMv2 authentication which our company's JIRA instance may upgrade to shortly
Last resort is to use a Java transformation in which Informatica has quite little value add. This also means I need to somehow pass in the JIRA user password for authentication which is a separate challenge (versus just storing as a HTTP connection)
Informatica Developer supports REST Web Consumer Transformation but has similar limitations with only building query type URL. Even worse I can't even dynamically build the URL since it's fixed to the HTTP connection object URL.
Am I straight outta luck?
I got the query and here I would like to answer about this. I can write here only points and it might be you won’t be able to understand that thing properly. So Here I am putting link of blog where the task "how to informatica read rest api is mentioned in detail step by step with video tutotial. Some examples are also there. Feel free to visit
https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/
Hope it will help.
There is bit of a confusion, wondering if somebody can help me with this.
Here is an example which is a year old and uses goapp with polymer and endpoint
https://github.com/googlesamples/cloud-polymer-go
Here is a recent example using gcloud
https://github.com/GoogleCloudPlatform/golang-samples/tree/master/appengine_flexible/endpoints
Both are different as google changed its approach.
As per second example, I am able to create endpoint functions which uses json for input and output. However there are 2 problems
1st. It is throwing error if I put functions in different file under same package. It works when I run go run .go. but then I dont understand how app.yaml come into picture. I think this url /_ah/spi/. should work
2nd. I am using postman app to check the request and response from endpoint. Is there a better way? I thought google does provide a platform to test endpoint.
Is there any example which implements examples similar to 1st one with new libraries?
looking forward for your help. Thanks.
I would like to create a project but i don't really know how to organize it and what do i exactly need.
I want an application which has a tableview ( grouped section ), with a refresh ( pull down ) of the framework three20, then when the user refresh the uitableview, the app check the webservice and ( i guess ) get the JSON and update the tableview ( by populate a plist ? )
so what do i need ?
a webservice, with a backfront where i can update my json ?
my application which has a plist populated by the json received from the webservice ?
AND
i have another view, where the user can send to the webservice information about him and update it when he wants. he will have in the application a page where he can see his information that he sent to the webservice earlier.
ps : should i use coredata ?
hope you get what i wanted.
Thanks guys !
You could use coredata, i find it organizes everything much better, but there is of course an associated overhead with using it. You should definitely use it when you will be editing the information you have stored, sounds like per your requirement even though you do store the data, once you edit it you send it back to the web service, so you are not really modifying your stored data.
Therefore a p list would work just fine, but again there is nothing wrong with storing it in core data. Your general idea is correct, you will be calling your web service, parsing the JSON or XML that you get and refreshing your table with the data.
Depending on what communication protocol (SOAP, REST) and the response (JSON, XML) the Web service is using there are tools that will generate all you need for the communication, you don't really need to do all that by yourself.
I am trying to build an API service for my Yii based website,
I have create an API controller with all the functions that returns objects in JSON format.
I also created a system to generate API keys for a specific URL... but I cant seem to understand how to detect the url from where the call is being made to my api so I can compare and validate.
I have tryed with HTTP_REFERER ...not working...
Any idea how is this possible ?
Thanks
try this:
Yii::app()->request->urlReferrer
or
Yii::app()->request->host
or
Yii::app()->request->hostAddress
for more details see http://www.yiiframework.com/doc/api/1.1/CHttpRequest