1. Outline
This page explains how to communicate with the server and update data via API.
Unifinity Platform uses UniBaaS to manage user data, so we will use a sample application that communicates with UniBaaS as an example.
The UniBaaS administration screen (WEB data) can be used to distribute apps and manage user data, and in this article we will explain the procedure for updating user group information from an app via the API.
The data to be updated is retrieved by
Communicate with server to obtain user information via APIfor more information.
Processing] Sample of updating data from a server via API
2. Creation Procedure
Submit the information you want to add to UniBaaS
Samples are available atCommunicate with server to obtain user information via API The following content has been added to the screens, DBs, and processes listed in the following table.
- Screen:
- Screen for entering information about the group you want to add
- PROCESSING:
- Set of data using [Dictionary].
- Process to display the screen for entering group information as a [sub form].
- Process to send the entered group information to UniBaaS
2.1. Screen Creation
Place a [Text Control] to input information to be sent to the server and a [Button Control] to execute the process of registering with the server.
In the sample, two text controls are placed for the purpose of sending a "Group Name" and a "Description of the registered group" to UniBaaS.
The screen for entering information to be sent to the server is not transitioned from the current screen, but is displayed in a pop-up window. This kind of control is used with 【Subform Control】.
Place a 【Sub Form Control】 on the screen that calls the popup screen.
Set it to be transparent and place it so that users cannot see it (upper left corner of the screen).
The size can be any value as it will be changed in [Processing].
For more information about pop-up processing using [Subform Controls],
Subform Referencefor more information.
2.2. Create a process
2.2.1. Data transmission process to the server
This article describes the process for sending to the server.
Data is sent to the server in the following flow.
- Connect to UniBaaS with "contracted company ID" and "access token
- Store acquired information in [Dictionary].
- Converts input into data for transmission
- Update the database on the server based on the information in 2.
In the sample, the group is retrieved one last time to confirm that it has been sent and displayed in the application.
2.2.2. Supplementation
The sample includes the "Group Registration" and "Common_HTTP Status Code Acquisition" logic as "Communication Processing.
The login process and the display of user information call the "Communication Process".
The "communication process" will be explained in another article, but please use the "communication process" as a sample logic for authentication to UniBaaS.
2.3. Assign the created process to a button
Return to the【【Screen】and embed the process you created into the button.
3. Confirmation of execution results
Access UniBaaS and verify that the data you sent was actually registered as a group.
4. Sample application
You can download it from the following link