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.

API Documentation
 
Notifications
Clear all

API Documentation

11 Posts
5 Users
0 Reactions
7,208 Views
(@mcanuto)
Posts: 183
Active Member
Topic starter
 
[#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


 
Posted : 11 Oct 2021 14H36
babynus
(@babynus)
Posts: 14966
Main Contributor 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.
 


 
Posted : 15 Oct 2021 13H42
(@mcanuto)
Posts: 183
Active Member
Topic starter
 

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


 
Posted : 19 Oct 2021 21H15
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Apache should enable mod_rewrite

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


 
Posted : 21 Oct 2021 18H00
(@mcanuto)
Posts: 183
Active Member
Topic starter
 

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


 
Posted : 07 Feb 2022 16H55
Sylvain Devidal
(@magicbuzz)
Posts: 38
Active 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.


 
Posted : 08 Feb 2022 12H03
babynus
(@babynus)
Posts: 14966
Main Contributor 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
 


 
Posted : 12 Feb 2022 18H37
(@mcanuto)
Posts: 183
Active Member
Topic starter
 

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


 
Posted : 14 Feb 2022 13H35
(@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.


 
Posted : 28 Mar 2023 13H42
babynus
(@babynus)
Posts: 14966
Main Contributor 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.


 
Posted : 29 Mar 2023 16H56
(@caie_guens)
Posts: 10
Active Member
 

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


 
Posted : 28 Feb 2025 18H20
Share:

Scroll to Top