Forum

Is that api for pro...
 
Notifications
Retirer tout

Is that api for projeqtor exists?

15 Posts
4 Utilisateurs
0 Reactions
23.3 K Vu
(@fran_collombon)
Posts: 11
Active Member
Début du sujet
 
[#3018]

Thank a lot.


 
Posté : 10 Fév PM 23:022
(@richard-pare)
Posts: 165
Active Member
 

ProjeQtOr have an API (REST web service).
The detail is not available in the new user guide.
So they are available in the old user guide.
In an attachment, I sent to you the chapter about the API.

The old user guide is always available in /projector/manual/ProjeQtOr.ppt


 
Posté : 11 Fév PM 16:022
(@fran_collombon)
Posts: 11
Active Member
Début du sujet
 

Ok thank but this is the only documentation exist? I try to make POST but I don't understand how to make that?


 
Posté : 11 Fév PM 20:022
(@fran_collombon)
Posts: 11
Active Member
Début du sujet
 

I don't understand how format my json for a POST...


 
Posté : 11 Fév PM 21:022
(@babynus)
Posts: 14952
Membre Admin
 

Exactly the same format that you receive wth a GET!


 
Posté : 11 Fév PM 21:022
(@fran_collombon)
Posts: 11
Active Member
Début du sujet
 

?dl=0

?dl=0

It doesn't work...


 
Posté : 11 Fév PM 21:022
(@babynus)
Posts: 14952
Membre Admin
 

just look at response (bottom of second pri t screen)
error is explicit : data is not encrypted


 
Posté : 11 Fév PM 23:022
(@fran_collombon)
Posts: 11
Active Member
Début du sujet
 

I'm sorry but i don't understand? Is it possible that you explain me in more details? Thanks a lot! :dry: :dry: :dry:


 
Posté : 11 Fév PM 23:022
(@babynus)
Posts: 14952
Membre Admin
 

in the examples in pdf manual, you must replace the string with correct API key when encrypting $data


 
Posté : 12 Fév AM 00:022
(@fran_collombon)
Posts: 11
Active Member
Début du sujet
 

I'm sorry but I really don't understand without a concrete example, I don't understand the example... 🙁 🙁 🙁


 
Posté : 12 Fév AM 00:022
(@babynus)
Posts: 14952
Membre Admin
 

Retreive the API key in user screen corresponding to user used to connect to API.

$apiKey='enter here the API key';
$fullUrl="http://myserver/api/Ticket";
$data='{"id":"1", "name":"name to be changed for Ticket 1"}';
$data=AesCtr::encrypt($data, $apiKey, 256);
$curl = curl_init($fullUrl);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, "projeqtor:projeqtor");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, array('data'=>$data));
$curl_response = curl_exec($curl);
echo $curl_response;
curl_close($curl);

 
Posté : 12 Fév AM 10:022
(@fran_collombon)
Posts: 11
Active Member
Début du sujet
 

How can I test this with Postman? I don't understand your PHP code...
Thanks a lot


 
Posté : 12 Fév AM 11:022
(@fran_collombon)
Posts: 11
Active Member
Début du sujet
 

Somebody can help me? 🙁


 
Posté : 12 Fév AM 11:022
(@sayef1)
Posts: 6
Active Member
 

im having same problem with the post i hope you can give me hund to solve this 🙂


 
Posté : 12 Juil PM 18:077
(@richard-pare)
Posts: 165
Active Member
 

You can't use "Postman" or anything else. You must encrypt your data. But, PHP function "AesCtr" must be executed into the PHP environment.

Copy and paste the example, in a PHP file and execute it either by the browser or by command line PHP CLI.

See : Previous example


 
Posté : 12 Juil PM 19:077
Share:
Retour en haut