Symptom

Though PowerServer Compiler automatically converts all your data access related logic to the server side and packages it into REST APIs, it is not recommended to consume those restful APIs from another application since the transmitted data is formatted in a way for optimal commutation between the PowerServer client (cloud app) and the PowerServer server side. It is not suitable for external use.
 

Environment 

PowerServer 2021 or above 

 

Resolution

Your PowerBuilder Cloud Pro package includes tools that designed for this scenario. The tools are included without extra charge and it is also high-automated and very flexible to expand.

So to re-use your DataWindow & SQLs in your PowerBuilder app, there are over all four steps to follow: 

•    Step 1. Open the PB workspace including the DataWindows that you want to reuse in SnapDevelop (the free C# IDE included in your PowerBuilder). 
Right-click the solution name, and select Open PB Workspace to open your PowerBuilder application.


•    Step 2. Select the targeted DataWindow objects and convert them to the C# Models with DataWindow Converter.  


•    Step 3. Scaffold the Service and Controller or you can add more services to your API. 

•    Step 4 Test and share your API to the third party. 

For detailed instructions please refer to the online help.  

Additional Resource
•    How to use the DataWindow Converter to generate the Models using the options that match your application requirements
•    More REST API Resources
•    Elevate Sessions 

3
2