How to pass parameter value for get , post and put method in OSB 12 c - osb

I need pass parameter like below
Http://host:port/wsintegration/id
Here I need to pass if value .
Please any one help how to do this .... Thanks in advance 😊

You haven't mentioned if you're using the Http Transport of REST adapter.
Assuming you're using the HTTP transport you can insert the relative URI parameter to replace the 'id'.
<http:relative-URI>{fn:replace('/wsintegration/id','id','YOUR_VALUE')}</http:relative-URI>

Related

Get data from odk Aggregate

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

angualrjs: escape slashes from parameter value passed to $http.get

I am using a simple HTTP GET call in angularjs and passing some query string parameters.
One of the param is a date. Let's say "update" and the value passed is 03/20/2015.
When I make $http.get call passing the "update" as query string parameter,
the request is sent as
http://myservice.com/services/products?update=03%2F20%2F2015
I would like to send it as
http://myservice.com/services/products?update=03/20/2015
Any help is greatly appreciated.
I suggest to replace slashes with dashes in the date: 03-20-2015
here you can find some more informations
%2F is just the encoded url for '/', your back-end could decode it automatically.

Accessing test&target API / calling saveCampaign/createCampaign API

I am trying to access saveCampaign API for testing purpose.
I followed the instructions provided, formed URL to create a plain campaign with URL :
https://testandtarget.omniture.com/api?client=user&email=user1#acme.com&password=pword&version=1&operation=saveCampaign&thirdPartyId=extID501&version=1&campaign=NNNNCampaign-Name
ofcourse, by editing proper email,clientID and password.
I get below mentioned error message :
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<error>
<message> A generic Exception has occurred. </message>
<code> 500 </code>
</error>
However the operation listCampaign works fine and returns a list of campaigns.
It would be a great help if someone could help.
thanks in advance.
The campaign parameter needs to contain a valid XML representation of the campaign you want to create/save as stated in the Test&Target's API docs. The error message you get points to a problem parsing the campaign XML parameter which is most likely caused by sending invalid data.
the XML document was not valid.
I modified it and created offer and could crate campaign.
thanks florin for pointing me in correct direction

How to read in html files with another method than file_get_contents() in codeigniter and send via html mail without getting shred?

Whenever i'm using file_get_contents() to pass a html-email-template $body=file_get_contents($path); as a variable to the phpmailer method $mail->MsgHTML($body); the mail gets shred.
How else to do? Would file_get_html() of the simple_html_dom script help? How to run that as library in codeigniter? What other possibilities are there? I would appreciate some advices, links etc.
Regards
Just a hunch as I don't know what you mean by shred.
$mail->CharSet='utf-8';
$mail->Encoding = 'base64';

Passing parameters to ->redirect() via $_GET

Hi I have this sentence
$g->addButton('')->set('NEW ACTIVITY')->js('click')->univ()->redirect('newactivity');
Is it possible to call the "redirect" method and passing parameters via $_GET ? so in the page "newactivity" I can ask for $_GET['something'] ?
Something like this
$g->addButton('')->set('NEW ACTIVITY')->js('click')->univ()->redirect('newactivity?id=1'); (this doesn't work)
or
$g->addButton('')->set('NEW ACTIVITY')->js('click')->univ()->redirect('newactivity','id=1');
Thanks
What you need is to properly build destination URL.
http://agiletoolkit.org/learn/understand/page/link
->univ()->redirect($this->api->getDestinationURL('newactivity',array('id'=>1)));
using stickyGET will affect ALL the urls you are going to produce form this point on. So if you add 2 links, each of them would be passing ID.
stickyGET is better if you need to pass argument which was already passed through GET, such as
array('id'=>$_GET['id']);
Here is a place where other ATK4 Developers chat too, perhaps another resource for your ATK4 Q's. https://chat.stackoverflow.com/rooms/2966/agile-toolkit-atk4

Resources