Where is the HTTP post interface to overpass.eu - overpass-api

I want to make a call directly to overpass from within my java program and then parse the returned XML (so I can subsequently populate a DB with stations)
Where is the api for http://overpass-turbo.eu/,
i.e I wish to post a query to overpass-turbo. All I seem to be able to do is manually run a query and then select export.

http://overpass-api.de/command_line.html expalins that it is at http://overpass-api.de/api/interpreter?
there doesnt appear to be an interface for the QL but I can get what I want out of that.
edit actually the doco is misleading, you can just post the QL at it.
If you vote down a perfectly valid question do you lose cred ?

Related

Routing incoming request

I am trying to create a simple API using Go that performs certain operations depending on the data provided.
I was planning to provide JSON data to this API and get details from it for further use.
Since I was trying to provide JSON data I created the routing using gorilla/mux as below:
router.HandleFunc("/msa/dom/perform-factory-reset?json={jsonData}", CallGet)
log.Fatal(http.ListenAndServe(":8080", router))
But while trying to hit the endpoint http://localhost:8080/msa/dom/perform-factory-reset?json={"vrf":"ds","ip":"45","mac":"452","method":"gfd"} I am getting 404 page not found error.
Hence I tried to change the implementation such that new routing is done as:
router.HandleFunc("/msa/dom/perform-factory-reset/json={jsonData}", CallGet)
This works absolutely fine and I am able to perform desired tasks. Could someone tell me why this is happening?
Is the router gorilla/mux? If so, you cannot add query parameters to path like that. You have to:
router.Path("/msa/dom/perform-factory-reset").
Queries("json","{jsonData}").HandlerFunc(CallGet)
If it is some other router, then you still probably have to register path without the query parameters, and then get the query parameter values in the handler from the request.

How to filter REST API JSON result by passing params

I'm trying to consume JIRA 2 API and trying to get custom fields. I want to further filter by passing appropriate criteria in URI itself. Current query I'm using is something similar to this:
http://localhost:8522/jira522/rest/api/2/issue/createmeta?expand=projects.issuetypes.fields
The result I'm getting from above request is about 2000 lines.. How can I further filter to get only Custom_fields and also under custom fields I need to only the ones which are required?
I'm pretty new to REST API. Please guide me If anything is wrong... TIA. I spent a lot of time browsing but don't know what exactly I need to search for or where exactly I need to get started.
You can use another queryParam just like expand and add further filtering or pagination.
http://localhost:8522/jira522/rest/api/2/issue/createmeta?expand=projects.issuetypes.fields&limit=1000

Get all the reports which have used a specific resource id of a domain topic in jasper

I have created a topic using a Domain in my JasperReport Server. Now I need to get all the reports which have used that Domain or Topic by using REST API.
I have tried this REST call:
https://<host>/jasperserver-pro/rest_v2/resource/organizations/test/organizations/data/Reports?j_username=jasperadmin&j_password=jAspErAdmIn
It gives 200 OK. But no data, it only gives the login page source.
<title>TIBCO Jaspersoft: Login</title>
Can anyone tell me how how to get this from REST call?
First, your call to the API seems errorneous.
According to the docs the call to the repository service looks like this:
http://<host>:<port>/jasperserver[-pro]/rest_v2/resources?<parameters>
In your case this would be:
http://<host>/jasperserver-pro/rest_v2/resources?<parameters>
Sencond, since your call is different, you won't get any result. It is possible to search for a specific string:
http://<host>/jasperserver-pro/rest_v2/resources?q=Domain_Name
and / or a type:
http://<host>/jasperserver-pro/rest_v2/resources?q=Domain_Name&type=dataType
As far as I understand it, it is not possible to search which report use which resources, though.

SharePoint SOAP service GetListItem with respect to updated date?

Right now I am working on a project to fetch data from a SharePoint list using SOAP API. I tried and successfully fetches the complete list, but now I want to fetch some specific data that is updated after a specific date.
Is this possible to fetch such data using SOAP query. I can see last update filed when I view single item at the bottom. Is this some how possible to use that filed?
Yes you can use the Web Services to do lot of things just like filtering a list result. I don't know which language you use, but with JavaScript you can look at these two frameworks that should help you:
http://aymkdn.github.io/SharepointPlus/ : easy way to create your queries (I created it)
http://spservices.codeplex.com/ : the most popular framework but less easy to use (it's my point of view)
You can also look at the documentation on MSDN (the param to use is query): http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
At last found the answer,
The last update date and time can be retrieved from the list column "Modified".
The soap response will have the value in the attribute "ows_Modified".
Muhammad Usman

SugarCRM Querying Database

In SugarCRM, using SOAP API, imagining i have lots of accounts populated in the database, and i want to find the account that has 'phone_work' = '00352254856987'. How can i make a query to accomplish that? It would be something like this:?
$query = "phone_work = '${myPhone}'";
For what i have tried, it seems the compiler finds an error in the XML document, which means the query is not well executed. What is the best way to do this kind of queries?
I'm using magento and creating a module to connect to sugar, so it is PHP
It turned out the field 'phone_work' is wrong. You can access at: http://apidocs.sugarcrm.com/schema/6.3.0/pro/tables/accounts.html and get all the fields related to that module. In the module 'Accounts', the field name is called 'office phone', but in the database, the name is 'phone_office'. Because the query is for the database, we need to use database field names.
Could you post the error that you get? Take also a look at the sugarcrm.log and maybe increase the logging level to see if the sql that gets created from your query is wrong.
By the way I switched to REST Json to get rid of soap related problems.