G6K icon indicating copy to clipboard operation
G6K copied to clipboard

Error : API for this simulator is not implemented

Open mohamedlouay opened this issue 3 years ago • 2 comments

Hi , i want to use the simulator as API to be implemented in an externel website , i have added the following lines to the

"\config\packages\g6k.yml" .

    # api configuration
     api:
         cout-certificat-immatriculation: 
             step: 0
             action: Calculer 

image

then i have cleared the cache using this command :

    php bin/console cache:pool:clear cache.global_clearer

image

here is the request's result using API :

http://localhost/simulateur2/calcul/cout-certificat-immatriculation/api?demarche=1&franceOuImport=1&typeVehicule=1&declareVehiculeDemonstration=2&puissanceAdministrative=52&energie=1&invalidite=2&receptionCommunautaire=1&tauxCO2=350&departement=92&declareVehiculeDeCollection=2

image

Thanks for your time

mohamedlouay avatar Feb 01 '22 22:02 mohamedlouay

I found the solution , the problem was in indentation here

image

after that i have cleared the cach using these commands :

php bin/console cache:pool:clear cache.global_clearer
php bin/console cache:clear --no-warmup --env=dev
php bin/console cache:clear --no-warmup

mohamedlouay avatar Feb 01 '22 23:02 mohamedlouay

Bonjour @mohamedlouay,

Je suis conscient que votre poste remonte à plus d'un an, mais j'aimerai savoir si vous pouviez m'aider à intégrer le simulateur sur un site externe avec le mode API.

D'avance merci

ShoweRocket avatar Mar 10 '23 19:03 ShoweRocket