Search code examples
phpsymfonysymfony-2.8akeneo

Akeneo API error with the families, although I want to get categories?


This is the error that I have:

[Akeneo\Pim\Exception\NotFoundHttpException]     
  No route found for "GET /api/rest/v1/families/" 

And this is what I triggered.

$pages = $apiClient->getCategoryApi()->all(100);

I don't get Akeneo. How can I overcome this ? I obviously don't know how to read it.

This is the exception trace:

() at /var/www/html/iclei/vendor/akeneo/api-php-client/src/Client/HttpExceptionHandler.php:49
 Akeneo\Pim\Client\HttpExceptionHandler->transformResponseToException() at /var/www/html/iclei/vendor/akeneo/api-php-client/src/Client/HttpClient.php:46
 Akeneo\Pim\Client\HttpClient->sendRequest() at /var/www/html/iclei/vendor/akeneo/api-php-client/src/Client/AuthenticatedHttpClient.php:67
 Akeneo\Pim\Client\AuthenticatedHttpClient->sendRequest() at /var/www/html/iclei/vendor/akeneo/api-php-client/src/Client/ResourceClient.php:56
 Akeneo\Pim\Client\ResourceClient->getResource() at /var/www/html/iclei/vendor/akeneo/api-php-client/src/Api/FamilyApi.php:51
 Akeneo\Pim\Api\FamilyApi->get() at /var/www/html/iclei/src/AppBundle/lib/cms/AkeneoConnector.php:143
 AppBundle\lib\cms\AkeneoConnector->parse() at /var/www/html/iclei/src/AppBundle/lib/cms/AkeneoConnector.php:133
 AppBundle\lib\cms\AkeneoConnector->getContentElementList() at /var/www/html/iclei/src/AppBundle/Command/AppTriggerBuildCommand.php:78
 AppBundle\Command\AppTriggerBuildCommand->pageAction() at /var/www/html/iclei/src/AppBundle/Command/AppTriggerBuildCommand.php:62
 AppBundle\Command\AppTriggerBuildCommand->execute() at /var/www/html/iclei/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:242
 Symfony\Component\Console\Command\Command->run() at /var/www/html/iclei/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:861
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/iclei/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:193
 Symfony\Component\Console\Application->doRun() at /var/www/html/iclei/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:84
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/iclei/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:117
 Symfony\Component\Console\Application->run() at /var/www/html/iclei/app/console:27

Solution

  • Regarding the stack trace, you are calling get on family endpoint, in the AkeneoConnectorclass:

    Akeneo\Pim\Api\FamilyApi->get() at /var/www/html/iclei/src/AppBundle/lib/cms/AkeneoConnector.php:143
    

    Also, please verify that Akeneo PIM API is accessible.