This is a detailed document for using the features of AppSuite.
Webhook Specifications
Webhook is architecture which notifies to external services with HTTP on any events. On AppSuite, webhook is run with auto action when data have been added or updated.
Request
Request Method
POST
Content Type of Request
application/json
Request Body
The added/updated data and the app information are sent.
Key
Value
Description
app_id
[App ID]
This is the ID of the app.
data_id
[Data ID]
This is the ID of the added/updated data.
data
[Data]
This is the content of the added/updated data. Format of the data is same as record of the response of the data Reference API.
(For more information, please refer to AppSuite API Specifications > Data Reference API. )
* This JSON is not affected by access rights unlike the response of the data Reference API.
Part values which can not be refered by a user who add/update the data will be sent.
Part values of other applications which can not be refered by a user who add/update the data will be sent.
\permissions key will not be sent.
deny_write key will not be sent.
type
[added | updated]
This is the action to call the auto action: added on the data added, updated on the data updated.
app_name
[App Name]
This is the app name.
action_name
[Title of Add/Update Action]
This is the title of the add/update action.
access_token
[Access Token]
This is the "Access Token" of the add/update action. A empty value will be sent on empty.
url
[Detail Screen URL]
This is the URL to display the data with the default details screen.
This is the URL to display the data with the default details screen.
* The URL is generated with access URL (external network) of [Setup > URLs Settings] .
* A empty value will be sent if the access URL (external network) is empty.
When a error is occurred on webhook, the error information is saved to [App Settings > Operational Management > Error Log].
The following response need to be returned to save a error message such as some failure on the destination.
Example of Error Save
When the request have failed because the URL, the destination server or the network have any problem
When the response will not returned by 30 minutes
When the status code of the response is not "200"
When the status code of the response is "200" and the following response will be returned
Key
Value
Description
result
ng
Constant
error_message
[Error Message]
This string will be saved to the error log.
Example of the response{
"result": "ng",
"error_message": "The action have been stopped for invalid update data status."
}
Trouble Shootings
If data of same application have been added/updated from Webhook destination with AppSuite API, infinite loop may occurred because auto actions will be run again.
Infinite loop may be overload of the server and trigger any problem of management of desknet's NEO.
This is guidance of prevention or solution of the problem.
Prevention of Infinite Loop
In case of the destination program runs data addition/update API, auto_action=off parameter should be specified.
It prevents to run add/update actions with API.
(For more information, please refer to AppSuite API Specifications > Data Addition API. )
You should tune settings about webhook in auto actions.
If auto_action=off can not be specified because of system requirement, you should update "Run When" and "Narrow Down" to prevent infinite loop.
Solution of Infinite Loop
You should set "Status" in auto actions which can be run Webhook to "disable".
* You need to find the app with the problem.
You should stop or restart the web server.
To Find the App with the Problem
If you can not find the app which infinite loop occurs with auto actions, you should find the app which runs data addition/update API repeatedly with [Setup > Log > Search Access Log].
* To use access log, desknet's NEO sheduler needs to be activated.
Set "Logging for Create Add/Edit/Delete" to "Save" in [Setup > Log > Access Log Settings].
* You need to wait about 10 minute because access log is collected at 10-minute intervals.
Search access log with [Setup > Log > Search Access Log]. You should narrow down not to match log except for AppSuite.
After the search results have been displayed, download CSV file from [Download] button and open the file.
The value of "Function Details" column is "insert_data" or "update_data"
The value of "Table Name, etc." column is "t000000000" (9 digits after "t")
Rows which match both of above are logs of the data addition/update APIs.
If mass addition/update log of save table exist, Infinite loop may occurred.
Get the app ID from "Table Name, etc." (9 digits after "t"). Remove first "t" and last 3 digits from table name to get the app ID.
(e.g. The app ID of "t000571000" is "571")
Enter the following URL to your web browser to display the application management screen of the app.
* You need to login with system administrator or AppSuite administrator.
・desknet's NEO URL: https://local.yourdomain/cgi-bin/dneo/dneo.cgi
・App ID: 571
Example of above case