PXWEBApi error 404

15 views
Skip to first unread message

hussam...@gmail.com

unread,
Sep 10, 2025, 6:32:07 AM (3 days ago) Sep 10
to pcaxis
  I installed PxWebApi 2.0-beta on Windows by downloading it from GitHub and extracting it to C:\inetpub\wwwroot\PxWebApi. I made sure .NET 8.0 Runtime and ASP.NET Core were installed. When I opened http://localhost/PxWebApi/ in the browser, the Swagger page appeared, which means the API is running. However, when I tried to access the tables via PowerShell using Invoke-WebRequest -Uri 'http://localhost/PxWebApi/api/v2/tables' -Headers @{ 'API_ADMIN_KEY' = 'test' }, I got a 404 Not Found error. I then created the folder App_Data inside PxWebApi and placed all my PX files in C:\inetpub\wwwroot\PxWebApi\App_Data\Tables, making sure the folder inherited permissions from the parent and the application pool had read and modify rights. After restarting IIS, I still encounter 404 errors. I would like to know if there are additional steps required to ensure PxWebApi reads the PX files correctly and exposes the tables through the API.1.png  3.png2.png

So, please, who can help me?

Stefan Jul Gunnersen

unread,
Sep 10, 2025, 7:18:50 AM (2 days ago) Sep 10
to pca...@googlegroups.com
Hello,

I am no expert, but we are working with the new PxWebApi these days and had to rebuild the index. Not sure if this is the cause.

We have a database so not running PX files, though.

Also, the Invoke request in the command line seems not to hit the data methods, but some admin functionality. When it works, it should work from Swagger/OpenAI interface.

Else, we need Petros or others to answer more technical questions.

Kind regards,
Stefan Gunnersen,
IT Developer
Statistics Denmark

Den ons. 10. sep. 2025 kl. 12.32 skrev hussam...@gmail.com <hussam...@gmail.com>:
  I installed PxWebApi 2.0-beta on Windows by downloading it from GitHub and extracting it to C:\inetpub\wwwroot\PxWebApi. I made sure .NET 8.0 Runtime and ASP.NET Core were installed. When I opened http://localhost/PxWebApi/ in the browser, the Swagger page appeared, which means the API is running. However, when I tried to access the tables via PowerShell using Invoke-WebRequest -Uri 'http://localhost/PxWebApi/api/v2/tables' -Headers @{ 'API_ADMIN_KEY' = 'test' }, I got a 404 Not Found error. I then created the folder App_Data inside PxWebApi and placed all my PX files in C:\inetpub\wwwroot\PxWebApi\App_Data\Tables, making sure the folder inherited permissions from the parent and the application pool had read and modify rights. After restarting IIS, I still encounter 404 errors. I would like to know if there are additional steps required to ensure PxWebApi reads the PX files correctly and exposes the tables through the API.1.png  3.png2.png

So, please, who can help me?

--
You received this message because you are subscribed to the Google Groups "pcaxis" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pcaxis+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pcaxis/00ca1578-8a80-4cc2-9e6e-e7b362b9f96fn%40googlegroups.com.

Petros Likidis

unread,
Sep 10, 2025, 3:59:29 PM (2 days ago) Sep 10
to pca...@googlegroups.com
Hi Hussama!

From the screenshot it looks like you are target http://localhost/api/v2/admin/database when you run the PowerShell command to build the Menu.xml file. But it should have http://localhost/pxwebapi/api/v2/admin/database since that is the place that you installed PxWeb.

Kind regards 
Petros 

Den ons 10 sep. 2025 12:32 emhussam...@gmail.com <hussam...@gmail.com> skrev:
  I installed PxWebApi 2.0-beta on Windows by downloading it from GitHub and extracting it to C:\inetpub\wwwroot\PxWebApi. I made sure .NET 8.0 Runtime and ASP.NET Core were installed. When I opened http://localhost/PxWebApi/ in the browser, the Swagger page appeared, which means the API is running. However, when I tried to access the tables via PowerShell using Invoke-WebRequest -Uri 'http://localhost/PxWebApi/api/v2/tables' -Headers @{ 'API_ADMIN_KEY' = 'test' }, I got a 404 Not Found error. I then created the folder App_Data inside PxWebApi and placed all my PX files in C:\inetpub\wwwroot\PxWebApi\App_Data\Tables, making sure the folder inherited permissions from the parent and the application pool had read and modify rights. After restarting IIS, I still encounter 404 errors. I would like to know if there are additional steps required to ensure PxWebApi reads the PX files correctly and exposes the tables through the API.1.png  3.png2.png

So, please, who can help me?

--
Reply all
Reply to author
Forward
0 new messages