WebAPI do not work.

=20

On your jQuery file, replace line 15 from setLinks to setLinks()
=20
Regards,
Paulo Gr=E1cio
=20

···

From: Dhis2-users [mailto:dhis2-users-bounces+pgracio
<mailto:dhis2-users-bounces%2Bpgracio>
=3Dcriticalsoftware.com@lists.launchpad.net] On Behalf Of Paulo Gr=E1cio
Sent: s=E1bado, 3 de Agosto de 2013 13:22
To: 'helder yesid castrillon cobo'; dhis2-users@lists.launchpad.net
Subject: Re: [Dhis2-users] WebAPI do not work.

=20
Hi,
=20
Are you having any particular problem? Any error message?
=20
Regards,
Paulo Gr=E1cio
=20

From: Dhis2-users
[mailto:dhis2-users-bounces+pgracio=3Dcriticalsoftware.com@lists.launchpa=
d.net
] On Behalf Of helder yesid castrillon cobo
Sent: sexta-feira, 2 de Agosto de 2013 16:42
To: dhis2-users@lists.launchpad.net
Subject: [Dhis2-users] WebAPI do not work.

=20

HI,
I am designing a web site to publish the indicators that I have created =
in
DHIS, for this purpose am using the Web Api.=20
I have tried with DHIS Plugins and jquery but these hasn't worked.

I don't know what happend or that I should to do.

attached two example who I created based in the demo "
<DHIS2 App Hub; DHIS2 App Hub;

Note:
I checked that the user would had access to WebAPI.
The web site will be <http://salas.saludcauca.gov.co>
http://salas.saludcauca.gov.co

Thanks.

=20

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

=20

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

=20

=20

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

=20

------=_NextPart_000_00AC_01CE9833.72A96060
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"Error; =
xmlns=3D"http://www.w3.org/TR/REC-html40&quot;&gt;&lt;head&gt;&lt;meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1"><meta name=3DGenerator content=3D"Microsoft Word =
14 (filtered medium)"><!--[if !mso]><style>v\:* =
{behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
  {font-family:"Cambria Math";
  panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
  {font-family:Calibri;
  panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
  {font-family:Tahoma;
  panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
  {margin:0cm;
  margin-bottom:.0001pt;
  font-size:12.0pt;
  font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
  {mso-style-priority:99;
  color:blue;
  text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
  {mso-style-priority:99;
  color:purple;
  text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
  {mso-style-priority:99;
  mso-style-link:"Balloon Text Char";
  margin:0cm;
  margin-bottom:.0001pt;
  font-size:8.0pt;
  font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
  {mso-style-name:"Balloon Text Char";
  mso-style-priority:99;
  mso-style-link:"Balloon Text";
  font-family:"Tahoma","sans-serif";
  mso-fareast-language:PT;}
span.EmailStyle19
  {mso-style-type:personal-reply;
  font-family:"Calibri","sans-serif";
  color:#1F497D;}
.MsoChpDefault
  {mso-style-type:export-only;
  font-family:"Calibri","sans-serif";
  mso-fareast-language:EN-US;}
@page WordSection1
  {size:612.0pt 792.0pt;
  margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
  {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DPT link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Hi Lars,<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>This new functionality looks perfect for integration with public =
government portals. Looking forward to use it!<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Regards,<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Paulo Gr=E1cio<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><b><span =
lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
Dhis2-users =
[mailto:dhis2-users-bounces+pgracio=3Dcriticalsoftware.com@lists.launchpa=
d.net] <b>On Behalf Of </b>Lars Helge =D8verland<br><b>Sent:</b> =
ter=E7a-feira, 13 de Agosto de 2013 11:21<br><b>To:</b> helder yesid =
castrillon cobo<br><b>Cc:</b> =
dhis2-users@lists.launchpad.net<br><b>Subject:</b> Re: [Dhis2-users] =
WebAPI do not work.<o:p></o:p></span></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p class=3DMsoNormal>We see =
that many people face the same issue and there isn't really any =
&quot;best-practice&quot; solution to these light-weight &quot;web page =
to server app on different domain&quot; integration issues. FYI, as a =
response we are introducing a new access level for the DHIS sharing =
mechanism called &quot;external access&quot; in 2.13 - this will allow =
you to give read-only access without any authentication for individual =
charts, maps and reports.<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Lars<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div><div><p =
class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p =
class=3DMsoNormal>On Mon, Aug 12, 2013 at 9:18 PM, helder yesid =
castrillon cobo &lt;<a href=3D"mailto:helder_947@hotmail.com" =
target=3D"_blank">helder_947@hotmail.com</a>&gt; =
wrote:<o:p></o:p></p><div><div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><span lang=3DEN>thanks for your input, =
the problem was that you had raised.</span> It <span lang=3DEN>works =
well on the same domain,&nbsp; also I tried the proxy and it works =
fine.<br><br>regards</span><br><br><o:p></o:p></p><div><div =
class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><hr =
size=3D2 width=3D"100%" align=3Dcenter></div><p class=3DMsoNormal>From: =
<a href=3D"mailto:mortenoh@gmail.com" =
target=3D"_blank">mortenoh@gmail.com</a><br>Date: Mon, 5 Aug 2013 =
22:28:51 +0700<o:p></o:p></p><div><p class=3DMsoNormal><br>Subject: Re: =
[Dhis2-users] WebAPI do not work.<o:p></o:p></p></div><p =
class=3DMsoNormal>To: <a href=3D"mailto:janhenrik.overland@gmail.com" =
target=3D"_blank">janhenrik.overland@gmail.com</a><br>CC: <a =
href=3D"mailto:helder_947@hotmail.com" =
target=3D"_blank">helder_947@hotmail.com</a>; <a =
href=3D"mailto:dhis2-users@lists.launchpad.net" =
target=3D"_blank">dhis2-users@lists.launchpad.net</a><o:p></o:p></p><div>=
<div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p =
class=3DMsoNormal>You would still need to authenticate. Could be done =
with something like CORS I guess, but its not really ideal. We have used =
nginx for this before I know (setting a static Basic authentication =
header). But I'm not sure if that is the problem here or =
not.<o:p></o:p></p></div><div><p class=3DMsoNormal><br =
clear=3Dall><o:p></o:p></p><div><p =
class=3DMsoNormal>--<br>Morten<o:p></o:p></p></div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p =
class=3DMsoNormal>On Mon, Aug 5, 2013 at 9:35 PM, Jan Henrik =D8verland =
&lt;<a href=3D"mailto:janhenrik.overland@gmail.com" =
target=3D"_blank">janhenrik.overland@gmail.com</a>&gt; =
wrote:<o:p></o:p></p><div><p =
class=3DMsoNormal>JsonP?<o:p></o:p></p></div><div><div><div><p =
class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p =
class=3DMsoNormal>On Mon, Aug 5, 2013 at 5:26 PM, Morten Olav Hansen =
&lt;<a href=3D"mailto:mortenoh@gmail.com" =
target=3D"_blank">mortenoh@gmail.com</a>&gt; =
wrote:<o:p></o:p></p><div><p class=3DMsoNormal>Hi,<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Is the data you're fetching on the same server, or on =
a remote server? XHR doesn't support cross-domain requests, so you would =
probably have to setup a authenticating proxy (you could use =
nginx)<o:p></o:p></p></div></div><div><p class=3DMsoNormal><br =
clear=3Dall><o:p></o:p></p><div><p =
class=3DMsoNormal>--<br>Morten<o:p></o:p></p></div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><div><div><p =
class=3DMsoNormal>On Mon, Aug 5, 2013 at 8:58 PM, helder yesid =
castrillon cobo &lt;<a href=3D"mailto:helder_947@hotmail.com" =
target=3D"_blank">helder_947@hotmail.com</a>&gt; =
wrote:<o:p></o:p></p></div></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm =
6.0pt;margin-top:5.0pt;margin-bottom:5.0pt'><div><div><div><div><p =
class=3DMsoNormal>Thanks Paulo,<br><br>The problem is that with these =
solutions(plugin DHIS and jquery) doesn't show nothing on Web Browser. =
Before I had tried:<br>i) To replace setLinks to setLinks(), but&nbsp; =
it only works while I am logged in DHIS(generally in other tab of same =
browser).<br>ii) I tried with several users.<br>iii) I used the same =
code that Demo published in <a href=3D"DHIS2 App Hub; =
target=3D"_blank">DHIS2 App Hub) I cleaned =
cookies, temporal files, Etc. of my web Browser.<br>v) I also used =
different web browsers.<br>vi) I finally tried&nbsp; do everything =
locally(dhis local,&nbsp; HTML files)<br><br>Is necessary to configure =
something in DHIS?. example security,&nbsp; compatibility, access =
permissions.etc.<br><br>Regards,<o:p></o:p></p><div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><br><br><o:p></o:p></p></div><div><div><di=
v class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><hr =
size=3D2 width=3D"100%" align=3Dcenter></div><p class=3DMsoNormal>From: =
<a href=3D"mailto:pgracio@criticalsoftware.com" =
target=3D"_blank">pgracio@criticalsoftware.com</a><br>To: <a =
href=3D"mailto:helder_947@hotmail.com" =
target=3D"_blank">helder_947@hotmail.com</a>; <a =
href=3D"mailto:dhis2-users@lists.launchpad.net" =
target=3D"_blank">dhis2-users@lists.launchpad.net</a><br>Subject: RE: =
[Dhis2-users] WebAPI do not work.<br>Date: Sat, 3 Aug 2013 19:03:21 =
+0200<o:p></o:p></p></div><div><div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>On your jQuery file, replace line 15 from <i>setLinks</i> to =
<i>setLinks()</i></span><br><i><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>&nbsp;</span></i><br><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Regards,</span><br><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Paulo Gr=E1cio</span><br><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>&nbsp;</span><o:p></o:p></p><div><div =
style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm =
0cm 0cm'><p class=3DMsoNormal><b><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
Dhis2-users [mailto:<a href=3D"mailto:dhis2-users-bounces%2Bpgracio" =
target=3D"_blank">dhis2-users-bounces+pgracio</a>=3D<a =
href=3D"mailto:criticalsoftware.com@lists.launchpad.net" =
target=3D"_blank">criticalsoftware.com@lists.launchpad.net</a>] <b>On =
Behalf Of </b>Paulo Gr=E1cio<br><b>Sent:</b> s=E1bado, 3 de Agosto de =
2013 13:22<br><b>To:</b> 'helder yesid castrillon cobo'; <a =
href=3D"mailto:dhis2-users@lists.launchpad.net" =
target=3D"_blank">dhis2-users@lists.launchpad.net</a><br><b>Subject:</b> =
Re: [Dhis2-users] WebAPI do not =
work.</span><o:p></o:p></p></div></div><p =
class=3DMsoNormal>&nbsp;<br><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Hi,</span><br><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>&nbsp;</span><br><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Are you having any particular problem? Any error =
message?</span><br><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>&nbsp;</span><br><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Regards,</span><br><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Paulo Gr=E1cio</span><br><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>&nbsp;</span><o:p></o:p></p><div><div =
style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm =
0cm 0cm'><p class=3DMsoNormal><b><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
Dhis2-users [<a =
href=3D"mailto:dhis2-users-bounces+pgracio=3Dcriticalsoftware.com@lists.l=
aunchpad.net" =
target=3D"_blank">mailto:dhis2-users-bounces+pgracio=3Dcriticalsoftware.c=
om@lists.launchpad.net</a>] <b>On Behalf Of </b>helder yesid castrillon =
cobo<br><b>Sent:</b> sexta-feira, 2 de Agosto de 2013 =
16:42<br><b>To:</b> <a href=3D"mailto:dhis2-users@lists.launchpad.net" =
target=3D"_blank">dhis2-users@lists.launchpad.net</a><br><b>Subject:</b> =
[Dhis2-users] WebAPI do not work.</span><o:p></o:p></p></div></div><p =
class=3DMsoNormal>&nbsp;<o:p></o:p></p><div><p class=3DMsoNormal><span =
style=3D'font-family:"Calibri","sans-serif"'>HI,<br>I am designing a web =
site to publish the indicators that I have created in DHIS, for this =
purpose am using the Web Api. <br>I have tried with DHIS Plugins and =
jquery but these hasn't worked.<br><br>I don't know what happend or that =
I should to do.<br><br></span><span lang=3DEN-US =
style=3D'font-family:"Calibri","sans-serif"'>attached two example who I =
created based in the demo &quot;</span><span =
style=3D'font-family:"Calibri","sans-serif"'><a =
href=3D"DHIS2 App Hub; target=3D"_blank"><span =
lang=3DEN-US>DHIS2 App Hub =
lang=3DEN-US =
style=3D'font-family:"Calibri","sans-serif"'>&quot;<br><br>Note:<br>I =
checked that the user would had access to WebAPI.<br>The web site will =
be&nbsp; </span><span style=3D'font-family:"Calibri","sans-serif"'><a =
href=3D"http://salas.saludcauca.gov.co" target=3D"_blank"><span =
lang=3DEN-US>http://salas.saludcauca.gov.co</span></a></span><span =
lang=3DEN-US =
style=3D'font-family:"Calibri","sans-serif"'><br><br>Thanks.</span><o:p><=
/o:p></p></div></div></div></div></div></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'>__________________________________________=
_____<br>Mailing list: <a href=3D"https://launchpad.net/~dhis2-users&quot; =
target=3D"_blank">https://launchpad.net/~dhis2-users&lt;/a&gt;&lt;br&gt;Post to =
&nbsp; &nbsp; : <a href=3D"mailto:dhis2-users@lists.launchpad.net" =
target=3D"_blank">dhis2-users@lists.launchpad.net</a><br>Unsubscribe : =
<a href=3D"https://launchpad.net/~dhis2-users&quot; =
target=3D"_blank">https://launchpad.net/~dhis2-users&lt;/a&gt;&lt;br&gt;More help =
&nbsp; : <a href=3D"https://help.launchpad.net/ListHelp&quot; =
target=3D"_blank">https://help.launchpad.net/ListHelp&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;=
/blockquote></div><p class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><p =
class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><br>______________________________________=
_________<br>Mailing list: <a =
href=3D"https://launchpad.net/~dhis2-users&quot; =
target=3D"_blank">https://launchpad.net/~dhis2-users&lt;/a&gt;&lt;br&gt;Post to =
&nbsp; &nbsp; : <a href=3D"mailto:dhis2-users@lists.launchpad.net" =
target=3D"_blank">dhis2-users@lists.launchpad.net</a><br>Unsubscribe : =
<a href=3D"https://launchpad.net/~dhis2-users&quot; =
target=3D"_blank">https://launchpad.net/~dhis2-users&lt;/a&gt;&lt;br&gt;More help =
&nbsp; : <a href=3D"https://help.launchpad.net/ListHelp&quot; =
target=3D"_blank">https://help.launchpad.net/ListHelp&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;=
/div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div></div></div></div></di=

<p class=3DMsoNormal =

style=3D'margin-bottom:12.0pt'><br>______________________________________=
_________<br>Mailing list: <a =
href=3D"https://launchpad.net/~dhis2-users&quot; =
target=3D"_blank">https://launchpad.net/~dhis2-users&lt;/a&gt;&lt;br&gt;Post to =
&nbsp; &nbsp; : <a =
href=3D"mailto:dhis2-users@lists.launchpad.net">dhis2-users@lists.launchp=
ad.net</a><br>Unsubscribe : <a =
href=3D"https://launchpad.net/~dhis2-users&quot; =
target=3D"_blank">https://launchpad.net/~dhis2-users&lt;/a&gt;&lt;br&gt;More help =
&nbsp; : <a href=3D"https://help.launchpad.net/ListHelp&quot; =
target=3D"_blank">https://help.launchpad.net/ListHelp&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;=
/div><p class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div></body></html>
------=_NextPart_000_00AC_01CE9833.72A96060--