Yahoo finance webservice API direct to ?bypass=true - web-services

Refer to the Yahoo finance webservice API, I unable to find http://finance.yahoo.com/webservice/v1/symbols/YHOO,AAPL/quote?format=json&view=detail
It shows 'Not a valid parameter'.
I also discover it will direct to ?bypass=true
How can I view the json data?

My understanding is that json is only supported through Yahoo Query Language (yql) API. The API endpoint is http://query.yahooapis.com/v1/public/yql and you have to submit the query in the form as (prefixed with ?) q=select * from yahoo.finance.quotes where symbol in ('symbol1,symbol2'), you must also specify the format as format=json, you may also need to specify an environment in order for the data to be return correctly based on certain schema. So far I found env=store://datatables.org/alltableswithkeys works for me. The entire url of course has to be url-encoded, you can run a curl command to test it out (replace with actual stock symbol):
curl -G http://query.yahooapis.com/v1/public/yql? --data-urlencode "q=select * from yahoo.finance.quotes where symbol in ('symbol1, symbol2') --data-urlencode "format=json" --data-urlencode "env=store://datatables.org/alltableswithkeys"
For more information, please check YQL Guide. It took me hours of reading and try-and-error to make it work!

Related

where can i get deep documentation of ArgoCD apis

I need to list all applications based on some label filters.
https://argocd_domain/api/v1/applications
in order to list all apps from argoCD API, I want to put all possible filters.
The Argo CD API is documented in its Swagger document.
Copy and paste that JSON to the Swagger Editor, and you'll get a nicely-formatted page describing the API. Here's the section for listing applications:
The function to handle a list-applications request calls ConvertSelectorToLabelsMap. Reading the implementation of that parsing function, you can find the expected format of the selector parameter.
At a glance, it seems the format is a comma-delimited list of key=value pairs.
Using the Swagger Editor, I generated the this test URL:
curl -X GET "https://editor.swagger.io/api/v1/applications?selector=label1%3Dvalue1%2Clabel2%3Dvalue2" -H "accept: application/json"
Looks like you'll need to URL-encode the equals signs and commas.
You can find the Swagger docs by setting the path to /swagger-ui in your Argo CD server address. E.g. http://localhost:8080/swagger-ui.
You can find a hosted version of Argo's Swagger UI on https://cd.apps.argoproj.io/swagger-ui

Create product in Microsoft Dynamics 365 for Financials

I try to create a product (item) using OData V4 URL available in Web Services section in Microsoft Dynamics 365 for Financials as shown below.
I use Postman to execute the POST request. Each request is proceed with an authenticated and valid account.
The POST OData V4 URL is taken from the Web Services sections example: https://xyz.financials.dynamics.com:7048/MS/ODataV4/Company('my-company')/Items
I also tried the entity "Item_Card", same result.
Here is the config set in Postman:
Headers
Body
When I execute the request, I get the following error:
What is the missing "Data object"? Is this a standard of OData V4 protocol? Do I must supply a "Data object" into the body?
Is there anyone encountered that error and could explain what is missing/not working?
Update 2017-05-10
It seems that the REST endpoint is not available for Microsoft Dynamics Financials build < 16552. I currenly use build 16259.
Update 2017-05-23
I am now running on build 16552. I still get the same error. The update seems to have no effect on the POST request.
I had a similar issue today.
I am using SoapUI for testing a simple webservice on a custom table in an on premise version nav2017.
In the end I found out that I was writing a Date on a Date field in NAV. After changing that to DateTime and sending a correct date time string it was working.
It probably does not answer your question as I see no date in your body, but maybe for others who are searching for the error "Data Object not provide" it might help to check if the datatypes used in the body matches the datatypes in NAV.
Regards, Henry Verheij
I receive this error as well. In my case I was adding a vendor and I missed the NO. (this field is not on the interface'vendor card', but it appears in the listing and is mandatory in the service, however no documentation about it). So my guess you probable is missing a mandatory field.
PS:I used OData v4 Client Code Generator to generate my proxy from the metadata.

Firebug and AMF post

I have to debug a website that uses a swf to send amf posts to a flex2gateway.
In Firefox's "Firebug > Net" I see the POST url and when I click on it, the Post tab shows scrambled jiberish:
The response is also scrambled:
But the headers and cookies are not scrambled:
How can I unscramble the post so that I can create a curl with the proper post values. And how can I unscramble the response?
AMF is a binary format. As such Firebug and Chrome Dev Tools don't do a very good job of being able to read them. In the past, I have used a product called ServiceCapture to 'read' AMF messages. Charles is another product that can do this.

How to document APIs in postman in the following conditions?

We have a series of GET requests api, say in the format of
curl -XGET ip-address/api-keywords
These kind of requests generate a JSON responses.
Now the issue here is when I document using Postman,we do not want the ip address to be exposed. How to edit that in postman?.
You can setup environments in Postman that will let you use variables. Then in your collection, different developers or users can setup their own environments and variables. See https://www.getpostman.com/docs/environments

Using the Vimeo API, how do I replace all videos in a Vimeo album?

Using curl, I'm trying to create a working Vimeo API call that replaces the videos in a Vimeo album with a different set of videos. (The docs are here.) I am successfully deleting the existing videos from the album but my new video info seems to be invisible to Vimeo. Vimeo responds with a 201 ("created") instead of the 200 I'm looking for.
Here is my curl command (with subs for actual data):
curl -H "Authorization: bearer 123abc456def" -X PUT --data "videos=%2Fvideos%2F11111%2C%2Fvideos%2F22222%2C%2Fvideos%2F33333" "https://api.vimeo.com/me/albums/7777777/videos"
I don't know what I'm doing wrong and the Vimeo API docs & playground don't give me the answers I need. My questions and observations:
Should I be url encoding the new video URIs (e.g. 11111,22222, etc)? I have also tried without url encoding and it made no difference. But then the 201 might be telling me it didn't get as far as handling my replacement URIs.
a PUT is required for this operation. I have used PUT successfully to add a video to an existing album (in LiveCode, haven't tried it with curl)
I got the same results when I tried this PUT in LiveCode. I moved the request to curl because more people are familiar with curl.
This is my first rodeo using the Vimeo API. It's a great, vast resource and I've had no problems working with it until this. I'm just stuck on this item and really need it to work!
Thanks for any help you can offer.
This is an ancient, deprecated way of handling batch editing. I'm not sure how it still exists. We will move it to the proper batch creation standard in 3.4.
I think the existing system is supposed to be a comma separated list of video id's, so
curl -H "Authorization: bearer 123abc456def" -X PUT --data "videos=11111%2C22222%2C33333" "https://api.vimeo.com/me/albums/7777777/videos"
is likely the proper request.