Open sabrine2020 opened 8 years ago
Hi!
The orionexplorer.com implements this framework, thats uses the Orion Context Broker to API to communicate and provide informations.
At this moment isn't possible connect at another database, but we are working on it #4, any help will be welcome.
How we connect to another database using the Orion Context Broker API?
It is based on the multiservice functionality: https://fiware-orion.readthedocs.org/en/develop/user/multitenancy/index.html
and it is done by adding in the REST request the following header : "Fiware-Service: service_name"
The entity information will be then stored on the mongo data base : "orion_service_name"
Best regards.
Another implemented feature is the Entity service paths: https://fiware-orion.readthedocs.org/en/develop/user/service_path/index.html
It is also can be added by adding a request header: "Fiware-ServicePath: /Madrid/Gardens/ParqueNorte/Parterre1"
Best regards.
On orionexplorer.com interface we don't have this configuration at moment, but if you're using our lib to build your application you can use the method setToken to append custom headers on request:
<?php
$OrionAPI = new Orion\ContextBroker("localhost", 1024, "v1");
$OrionAPI->setToken("Fiware-Service","service_name");
$OrionAPI->setToken("Fiware-ServicePath",'/Madrid/Gardens/ParqueNorte/Parterre1');
(https://github.com/VM9/orion-explorer-php-frame-work/tree/master/examples)
At this moment it's the only way to use service based since is needed changes on user interface.
Best regards.
Thanks for your response but I am not using the lib code, I am only using the orionexplorer.com interface. Is there a fixed date for the release that contains the new features?
Best regards.
Hello,
In orion-explorer it connects by default to the "orion" database. My entities are stored in another database: "orion-mydatabase", that was created based on the header "Fiware-Service: mydatabase"
how can I using orionExlorer connect to another databases beside the default one? Tanks in advance for your help!