cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How to send/connect data with Vuforia Studio and postgres SQL

Fikhrul_Edham8
4-Participant

How to send/connect data with Vuforia Studio and postgres SQL

May i know how to connect vuforia studio to postgres database?I want to send my data to database,hopefully you can give some opinion and guide.Thanks

4 REPLIES 4

Hello Fikhrul_Edham8, 

 

The solution is to install PostgREST :

https://github.com/PostgREST/postgrest

http://postgrest.org/en/v7.0.0/

 

It is a tiers web server in front of Postgrest Database.

It allows HTTP requests to run Functions embbeded in Postgres Database who runs SQL queries.

It is possible to have results of data in JSON format.

 

In Vuforia Studio, in Project, only http requests in javascript is needed.

More details in this thread for example :

https://stackoverflow.com/questions/36975619/how-to-call-a-rest-web-service-api-from-javascript

 

  • Is it helping you ?

 

Best regards,

Samuel

 

I already install postgres SQL but I don't know how to connect with Vuforia Studio. Where should I paste the code in vuforia? Perhaps can you guide me step by step on how to achieve this solution? Because I'm new in vuforia studio. Thank you for your response.

Hello,

 

Please follow these steps :

  1.  Read the documentation about this third-party server to run SQL queries with REST http request in postgres database: http://postgrest.org/en/v7.0.0/
  2. Follow steps described to install it. More details in this web page: http://postgrest.org/en/v7.0.0/tutorials/tut0.html
  3. Please not that this server is not included in postgres database and in Vuforia Studio
  4.  Install Vuforia Studio as described in Help Center : http://support.ptc.com/help/vuforia/studio/en/index.html#page/Studio_Help_Center/common/VuforiaBeta_InstallThingBuilderWindows_Commercial.html
  5. In Help Center, we can find various tutorial at various levels (beginner, advanced ...etc...)
  6. For example, create a Project at:http://support.ptc.com/help/vuforia/studio/en/index.html#page/Studio_Help_Center%2FBeginner_CreateAndPublish.html%23
  7. How to invoke a JavaScript Function from a Buttonhttp://support.ptc.com/help/vuforia/studio/en/index.html#page/Studio_Help_Center%2FBeginner_JSInvokeFunction.html%23
  8. For your needs: create a Project, create a JavaScript function who calls by using REST api an HTTP request to PostgresREST server who will runs a SQL query in Postgres database.

 

Best regards,

Samuel

Hi @Fikhrul_Edham8 

 

Make use of Thingworx to communicate between PostgreSQL and Vuforia Studio.

 

Refer this article for Thingworx and External DB connection setup

 

/VR

Top Tags