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.
Related
Hi I am trying to synology api to download a file, it seems that the API documentation is outdated,
I successfuly login and logut using the API,
but when I tried to use this api call
http://myds.com:5000/webapi/entry.cgi?api=SYNO.FileStation.Info&version=1&method=getinfo
the response sends error 103, "Method do not exists".
According with the documentation, first, you have to retrive the cgi path,in my case is "entry.cgi".
then you know that part of the api direction
/webapi/?api=&version=&method=[&][&_sid=]
According with the error 103 the (in this case is getinfo) doesn't exists, but the documentation tells other thing.. and it's driving me crazy
https://global.download.synology.com/download/Document/Software/DeveloperGuide/Package/FileStation/All/enu/Synology_File_Station_API_Guide.pdf
Someone has used Synology api recently? I need to figure out how to use the SYNO.FileStation.Download api call.
I'm afraid you will need to look into the code of the filestation php files.
Here are some impressions of how this was done for the PhotoStation:
https://gist.github.com/anthonydahanne/4583444
https://blog.jbowen.dev/synology/photostation/getting-started/get-api-info/
Similar to PhotoStation I would first search for the info-method to check what the API is supposed to offer.
I just happened to come across your thread, have you tried viewing the APIs available on your Diskstation? You can do that by calling
http://<YourDiskstationURL:Port>/webapi/query.cgi?api=SYNO.API.Info&version=1&method=query&quer%20y=all
I have a function that looks like the successor to the download function:
{"maxVersion":2,"minVersion":1,"path":"entry.cgi","requestFormat":"JSON"}
,"SYNO.FileStation.Download":
In the API-documentation Synology suggests to check whether a specific API is available or if it has changed.
I need to use the table in from this wiki page https://en.wikipedia.org/wiki/List_of_most_visited_museums to make a database in python (though the latter part is irrelevant atm). I have to use the API (can't scrape) to access it. Right now I'm trying the API's documentation https://www.mediawiki.org/wiki/API:Parsing_wikitext#Example_1:_Parse_content_of_a_page Example #2 from this page is exactly what I want to do, but it's returning an error, and even running the original code in my notebook it also returns an error. Can anyone tell me how to either alter that code so it runs, or direct me to another way to do the same thing? Thanks.
This fetches the content you're after: https://en.wikipedia.org/w/api.php?action=parse&page=List%20of%20most%20visited%20museums&prop=wikitext§ion=2&format=json
If the example isn't working in your notebook, the problem probably lies with the rest of your code and not with the API call.
The documentation I can find for the Canonical Landscape API lets you do lots of things with scripts, but I can't find anything suggesting that you can get output. However, if you use the Canonical web interface, script output is available, so it's presumably exposed somehow...?
I just had this issue as well and since you're the first hit right now on google, I wanted to share the answer for everyone - if you run ExecuteScript on a landscape client and get back an ID of 123, and let's assume the job finished already - you want to then use that ID to ask the GetActivities API, with an input argument of "query" with value "parent-id:123". If there is a result there, you will find the script output you are looking for under the result_text field of the response. Good luck!!! It worked over here very well.
I'm trying to figure out a way to create orders via API (the ones that show up under https://app.goshippo.com/orders/), but seems like api docs dont really explain how to do so, and the only thing thats available is to create shipping labels. The libraries dont have any functions that will point me to this direction either. Is it even possible to make a call to the api for orders ?
Also, if this is not possible, how can I make goShippo send me a request for lets say a CSV, to sync all orders ?
PS: this is a custom build
Thanks
Feel free to use our order endpoint /v1/orders, but it is currently in beta version. The behavior of this endpoint may change (fields, error messages). We will update the following gist according to any modification that we make.
You can find more details about the endpoint at https://goshippo.com/docs/orders
The following Gist shows you how to POST on the Order endpoint.
https://gist.github.com/mnowik/59d2d550107b77cb31bf79b6b75d6e27
Fields with * are not active yet.
I've got a problem: I'm working on an external webinterface for my company and we use Atlassians JIRA as a project issue and tracking method. I am trying to connect our webinterface over the REST API. After a short research I found out, that Atlassian never implemented the possibility to create a new JIRA Project over their REST API. Well, that isn't that true, they've implemented it in the actual version (7.0) because they migrated their other two APIs to one REST API. Now comes my problem: We are currently unable to upgrade from version 6.4.4 to version 7.0.0. After a second search I found a workaround for this problem. You can find it here:
The real problem is that this workaround isn't working or I'm doing it wrong.
I've already tried it with a GET request and the given arguments as parameters and over the normal POST method with a JSON body in it.
What's my problem?
Here some more informations: When I try it over GET, I always receive the normal response for the URL (it returns a list with all available templates). When I try it over POST with a JSON body (this is by the way the normal method for the normal functions of the REST API) I get back a HTTP-Error 415 Unsupported media type.
it would be nice if someone could test this workaround with a 6.0+ version of JIRA
So after some months I got it by myself. You have to make a POST request with the following header fields:
Content-Type=application/x-www-form-urlencoded; charset=UTF-8
Authorization=Basic {set your credentials as a Base64-String: "user:password"}
X-Atlassian-Token=nocheck
Once done you can set your POST-Parameters to the following:
name=Name of the Project
key=Key of the Project
lead=Leader of the Project
keyEdited=true (don't change it!)
projectTemplateWebItemKey=com.atlassian.jira-legacy-project-templates:jira-blank-item (don't change it!)
projectTemplateModuleKey=com.atlassian.jira-legacy-project-templates:jira-blank-item (don't change it!)
Hope that this helps someone, Jira is just weird in some cases :/