I want to get form data using api's.
http://localhost:8080/ODKAggregate/view/submissionList?formId=abcd returns me a list of uuid's like:
<id>uuid:52af4a39-bf13-4305-b1a6-2b02d839dd7c</id>
<id>uuid:2e988c5b-8160-4d59-b2ee-6fe0728416bf</id>
<id>uuid:02c67418-8922-491d-a345-d41d223db949</id>
<id>uuid:4e06eb89-3f2c-4cef-b82b-38b725080c95</id>
<id>uuid:a3e2da91-719d-458d-bf9a-f15f4406eee7</id>
<id>uuid:19ff4408-0f6c-4e37-9d48-ecfb6d74b4e1</id>
Now I want to download each submission individually using downloadSubmission api described here https://github.com/opendatakit/opendatakit/wiki/Briefcase-Aggregate-API
Can anybody tell what will be the exact format to call downloadSubmission?
Thanks in advance!
../view/downloadSubmission?formId=YOURFORMID[#version=null#uiVersion=null]/YOURFORMID2*[#key=uuid:xyz]
*Look this up prefixed with each question in your form's XML
Related
I'm trying to use a REST web service from Geonames.org. When I try to manually put in the url with the parameters, it would only return the Country Code. I've tried to search for ways to implement it, but most of what I've seen return JSON text with multiple keys and data. I feel like the answer should be pretty simple, but I'm unsure.
I'm trying to use this for a React project I'm working on.
Here is an example of what the url returns
Just looked into the docs of that API, and it says if you want to receive JSON responses simply add JSON keyword to the endpoint. Like here for given endpoint you have:
http://api.geonames.org/countryCodeJSON?formatted=true&lat=47.03&lng=10.2&username=demo
so just change countryCode to countryCodeJSON.
Source: http://www.geonames.org/export/JSON-webservices.html
I am trying to use the API to return data from the Chagrin Falls station in Ohio. I can get the data from the website so I know there is data, but the API does not return any values.
I have a valid token and the examples in the documentation work, but if I try any to alter the examples in any way I get nothing back just any empty json object {}.
Example I am trying to use:
https://www.ncdc.noaa.gov/cdo-web/api/v2/data?datasetid=GSOM&stationid=GHCND:US1OHGG0014&units=standard&startdate=2020-08-01&enddate=2020-08-01&limit=1000
Data from the website:
https://www.ncdc.noaa.gov/cdo-web/datasets/GHCND/stations/GHCND:US1OHGG0014/detail
I don't exactly know how you are going to achieve this since you haven't told us what programming language you are using. However, with python I use a module called urllib to extract raw html data from a url that can be seen from the browser using ctrl+u.
I am using this regex to extract data in cell and pass to subsequent request where it is needed in JMeter.
Using Reg-ex to extract the data in cell:
"cell":\["","(.*?)","(.*?)","(.*?)","(.*?)","(.*?)","(.*?)","(.*?)","(.*?)","(.*?)","","(.*?)","(.*?)","(.*?)"]}]}
Can someone help to enhance it using beanshell or store it in array and then pass it to subsequent request?
It seems you are trying to extract something from JSON response. Using regular expressions for this is not very recommended.
Be aware that starting from JMeter 3.0 there is a JSON Extractor which can be used for fetching data from JSON responses using JsonPath language.
The relevant JsonPath expression to get the content of cell element will be as simple as:
$..cell
Going forward please try to include at least essential parts of the response into your question.
I have three input components:
Excel Input
XML Input
Table Input
I would like to do some validation and verification before inserting the integrated data into a data base.
Which component should I use for the data transformation/verification?
Try using the Data Validator step in PDI. Here you can validate the rows that are coming in from the Input step either using the inbuilt validator or even using regular expressions.
Hope it helps :)
There are several aproaches to achieve the verification. The easiest one is to code your validations using the "Modified java script value" step, but it's the most resource hungry, so Pentaho recommends avoiding it if you can. So you can use others steps, like the ones under the "flow" category.
We are working on an application that retrieves data from an external source. By processing the data the JSON must be manipulated before deserializing . So far so good.
A problem occurs when a JSON element contains multiple values. For example:
"CcRecipients":[{"EmailAddress":{"Address":"foo#example.com","Name":"FirstName
LastName"}},{"EmailAddress":{"Address":"bar#example.com","Name":"FirstName1
LastName1"}}],
What we are looking for is an regex that will retrieve all occurrences of
{"EmailAddress":{"Address":"foo#example.com","Name":"FirstName LastName"}},
I've already created a regex for a single occurence:
(\[\{"\w+":\{"\w+":"\w+#\w+\d.\w+.\w{3}","\w{4}":"\w+\s+\w+"\}\},\])
Anyone an idea? Thanks in advance!
\d is not required. Also you need to escape ..
Can you try this:
input.match(/{"\w+":{"\w+":"\w+#\w+\.\w{3}","\w{4}":"\w+\s+\w+"}}/g);