WEB API and SCRIPT IN FACTORYSTUDIO

Dear Experts

Good new week to all of guys.
I’m using factory studio factory to build my web platform application.
I have some unknown issues please help me to clear.

  1. I see that JavaScript is only supported on code behind web Display. It isn’t supported at main script page, is it?
  2. I want to Factory studio to build a back-end web application, and other application can get, put data from factory studio via API? Is that posible?

Many Thanks.

Hi Thanos,

  1. JavaScript is supported only in HTML5 displays for code-behind web displays. It is not supported in WPF displays.

  2. Yes, it is possible to use Factory Studio to build a back-end web application. You can integrate it with other applications by using the WebAccess API. For detailed guidance, please refer to our documentation: Using WebAccess Service - 9.2 - Tatsoft LLC

Please, let us know if it helps with your questions.

Best regards,
Gabriel Caetano de Oliveira.

Dear Expert.
Thank for your feedback.
I tried use API tool test to connect to Factorystudio but can’t connect.
How can I check where were reasons?
Many Thank

Hi Thanos,

You can use tools like Postman or Insomnia to test REST API requests.

  1. Ensure the TWebServer is running and the FactoryStudio project is executing. Also, check the port in which the WebServer is running, if the WebServer is not using the default port (80), you should include that information on every URL described through the document using the syntax: :

You can find more information in the following documentation link: TWebServer - Embedded Web Server - 9.2 - Tatsoft LLC

Using the API testing tool, perform a GET request to a URL like the following example:
http://localhost/fs-9.2/WebAccessService.svc/GetVersion
If the response is {"GetVersionResult":2}, it indicates the connection is successful.

Best Regards,
Gabriel Caetano de Oliveira

Dear Expert.
Actually, I run Webserver and operated to acess html display on Chrome application well.
But API can’t connect.
Best.

Hi Thanos,

Could you clarify what API you are referring to? Additionally, could you explain in detail what you are trying to do?

Best Regards,
Gabriel Caetano.

Dear Expert.
In my project, I created some HTML5 displays for WEB SCADA application.
Beside that, I have an other WEB app which need to get reltime-data from Factory studio webserver via RestFull API.
I tried to use RestFull on;ine tool to connect with Factory studio webserver
Best

Hi Thanos,

Please verify the port on which the TWebServer is running. You can check this information in the Server Info section.

Once confirmed, test the connection using the following example URL:
http://localhost/fs-9.2/WebAccessService.svc/GetVersion

Note: If the port is different from the default (80), make sure to specify it in the URL. For example:
http://localhost:3100/fs-9.2/WebAccessService.svc/GetVersion

Best regards,
Gabriel Caetano de Oliveira.