Forum

API Documentation
 
Notifications
Retirer tout

API Documentation

11 Posts
5 Utilisateurs
0 Reactions
7,161 Vu
(@mcanuto)
Posts: 183
Reputable Member
Début du sujet
 
[#7813]

Hello,

I'd like to know how to connect to Projeqtor by API. Is there somewhere a documentation about this?

Than you.

Regards,
MCanuto


 
Posté : 11/10/2021 2:36 pm
(@babynus)
Posts: 14952
Membre Admin
 

Here
It is the "old" user manual, in PPT format, available on doanload page.
You'll find API description by the end of the doc.
 


 
Posté : 15/10/2021 1:42 pm
(@mcanuto)
Posts: 183
Reputable Member
Début du sujet
 

Hello,

thank you for this document.

Is there anything we need to install or activate more than the .htpasswd and the .htacess files?

I think I follow all the instruction but I keep getting this answer :



    404 Not Found


    

Not Found

    

The requested URL /api/Project/243 was not found on this server.

Do you have an idea why?

Thank you.
MCanuto


 
Posté : 19/10/2021 9:15 pm
(@babynus)
Posts: 14952
Membre Admin
 

Apache should enable mod_rewrite

  RewriteEngine On
   
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?uri=$1


 
Posté : 21/10/2021 6:00 pm
(@mcanuto)
Posts: 183
Reputable Member
Début du sujet
 

Hello, 

I've created the file .htaccess as described, but when I try to access with a GET Method to 

http:///api/Project/243, I get the 404 error,

but if I change the URL to http:///api/index.php?uri=Project/243, it works fine.

So, I think the issue is on the command : 

RewriteRule ^(.*)$ index.php?uri=$1

But how should I rewrite it to make it work with the URL's defined on the Doc?

Thank you for your help.

Regards,
MCanuto


 
Posté : 07/02/2022 4:55 pm
Sylvain Devidal
(@magicbuzz)
Posts: 38
Trusted Member
 

Hello,

I have the same issue there.

Using EasyPHP DEVServer on Windows with ProjeQtOr 9.4.2

I enabled the rewrite module but it fails with /api/Project/all query while using api/index.php?uri=Project/all works fine.


 
Posté : 08/02/2022 12:03 pm
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

I just tested again with WAMP Server : works fine for me, with Apache 2.4; rewrite_module enabled.
Maybe Apache error log file or access file may give information
 


 
Posté : 12/02/2022 6:37 pm
(@mcanuto)
Posts: 183
Reputable Member
Début du sujet
 

In the Apache accesslog file, I have this message :
- - [14/Feb/2022:11:27:28 +0100] "GET /api/Project/all HTTP/1.1" 404 211 "-" "PostmanRuntime/7.29.0"

In the Apache errorlog file I get nothing

Does this help? Do you understand where the problem is?

MCanuto


 
Posté : 14/02/2022 1:35 pm
(@ghazitriki)
Posts: 7
Active Member
 

Hello,

I also tried to use the API with basic auth using the username and its API key.

I guess httpasswd is no more required, right?

When I run this https://pj.company.net/api/Asset/433

I see nginx correctly sending the request to ProjeQtOr, the UI is loaded very quickly then I get redirected to 404 page.

All help is welcome.


 
Posté : 28/03/2023 1:42 pm
(@babynus)
Posts: 14952
Membre Admin
 

I guess httpasswd is no more required, right?

Yes it is ! 
If you use default.htaccess, it requires .htpasswd !

I see nginx correctly sending the request 

This is the source of the issue.
nginx does not use .htaccess.
So you have to convert what is in the .htaccess in the virtualHost definition for nginx.


 
Posté : 29/03/2023 4:56 pm
(@caie_guens)
Posts: 10
Active Member
 

HI
In the .htaccess,put the full path of .htpassord
good luck
Guenole


 
Posté : 28/02/2025 6:20 pm
Share:
Retour en haut