Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Is that api for pro...
 
Notifications
Clear all

Is that api for projeqtor exists?

15 Posts
4 Users
0 Reactions
23.4 K Views
(@fran_collombon)
Posts: 11
Active Member
Topic starter
 
[#3018]

Thank a lot.


 
Posted : 10 Feb 2016 23H33
(@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


 
Posted : 11 Feb 2016 16H10
(@fran_collombon)
Posts: 11
Active Member
Topic starter
 

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


 
Posted : 11 Feb 2016 20H47
(@fran_collombon)
Posts: 11
Active Member
Topic starter
 

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


 
Posted : 11 Feb 2016 21H13
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Exactly the same format that you receive wth a GET!


 
Posted : 11 Feb 2016 21H28
(@fran_collombon)
Posts: 11
Active Member
Topic starter
 

?dl=0

?dl=0

It doesn't work...


 
Posted : 11 Feb 2016 21H47
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

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


 
Posted : 11 Feb 2016 23H42
(@fran_collombon)
Posts: 11
Active Member
Topic starter
 

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


 
Posted : 11 Feb 2016 23H57
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

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


 
Posted : 12 Feb 2016 0H16
(@fran_collombon)
Posts: 11
Active Member
Topic starter
 

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


 
Posted : 12 Feb 2016 0H28
babynus
(@babynus)
Posts: 14966
Main Contributor 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);

 
Posted : 12 Feb 2016 10H36
(@fran_collombon)
Posts: 11
Active Member
Topic starter
 

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


 
Posted : 12 Feb 2016 11H18
(@fran_collombon)
Posts: 11
Active Member
Topic starter
 

Somebody can help me? 🙁


 
Posted : 12 Feb 2016 11H58
(@sayef1)
Posts: 6
Active Member
 

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


 
Posted : 12 Jul 2016 18H29
(@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


 
Posted : 12 Jul 2016 19H11
Share:

Scroll to Top