Skip to main content

Hi . I'm new in Xentral. I install xentral version 21.1.0468b41 (Home) in local machine. I’m going to have a simple output of the API with GET method


According to this tutorial, I created an account to access the API. And I gave it the necessary permission.

But I do not have access to this address https://xentral.local/api/v1/artikel

Can anyone help me? Where is my problem?

 
 

 

 

Hello Morteza,

Thank you for your community post regarding API permissions and the screenshots. I'm happy to help you with it.

In your screenshot from postman we saw that you are using the wrong authorization type. You need "Digest Auth" instead of "Basic Auth".

?name=inline1675527645.png

Please change it and let us know whether it works now.

Thank you very much, have a good day and best regards,

Matthias from the Xentral Customer Success Team


Thank you Matthias Berkmann-Schäfer. I created a Virtual Host to install Xentral in Ubuntu.
Actually my wrong was with the Virtual Host File.
I use 

<VirtualHost *:443>
   ServerName xentral.local
   ServerAlias www.xentral.local
   DocumentRoot /var/www/html/xentral/www
   <Directory /var/www/html/xentral/www/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride All
      Order allow,deny
      Allow from all
   </Directory>
   <FilesMatch \.php> 
        SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost/" 
    </FilesMatch> 
   ErrorLog ${APACHE_LOG_DIR}/xentral.error.log
   CustomLog ${APACHE_LOG_DIR}/xentral.access.log combined
   LogLevel debug

SSLEngine on
SSLCertificateKeyFile /etc/ssl/private/server.xentral.com.key
SSLCertificateFile /etc/ssl/certs/server.xentral.com.crt
</VirtualHost>

I changed it to

<VirtualHost *:443>
   ServerName xentral.local
   ServerAlias www.xentral.local
   DocumentRoot /var/www/html/xentral/www
   <Directory /var/www/html/xentral/www/>
      AllowOverride All
      Require all granted
   </Directory>
   <FilesMatch \.php> 
        SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost/" 
    </FilesMatch> 
   ErrorLog ${APACHE_LOG_DIR}/xentral.error.log
   CustomLog ${APACHE_LOG_DIR}/xentral.access.log combined
   LogLevel debug

SSLEngine on
SSLCertificateKeyFile /etc/ssl/private/server.xentral.com.key
SSLCertificateFile /etc/ssl/certs/server.xentral.com.crt
</VirtualHost>

As you can see, in the <Directory> tag,  should be  

   <Directory YourPath>
      AllowOverride All
      Require all granted
   </Directory>

 


Antworten