Yes you can but there are some pitfalls
If you don't need the -u [MyApiKey] this may be a direction. Otherwise create you http request with httpclient.
- Create your request string (https://www.domain.com¶m1=a¶m2=2...)
- Encode that url (see java action at the end)
- Create reply document (xml)
- Call 'storeurltofiledocument'
- Import the returned filedocument (xmlimport, xsd etc). Add some error handling in there because the returned xml may have multiple formats. One for the correct result and the other for errors. If you are lucky you can read the status easily from the xml.
Good luck
EncodeUrl
// create new encoded URL
URI uri = new URI(httpPart, domainPart, sub, apiPart, null);
java.net.URL url = uri.toURL();
return url.toString();
Or use CommunityCommons HTMLEncode