Request and Response Structures
Requests
Web Service requests must conform to a basic structure which contains execution instructions, and passed-in parameters (optional). Example request follows:
{
"componentDocumentName": "ws-test-service",
"functionName": "sortParameters",
"functionParameters": [9,5,7,2,1,8,6,4,3,0]
}
value | required | description |
---|---|---|
componentDocumentName | true | Name of Component Document containing the web service function |
functionName | true | Name of the function being called in the web service |
functionParameters | false | An array of parameters to pass to the function being called |
Refer to the execute
API documentation for examples on how to call a Web Service Component Function using curl
.
This can be found here Execute a Web Service Component Function
Responses
Web Service responses are determined by the function creator. It is recommended that the response be structured as a json
value, to maintain consistency with the core web services provided by Formbird (ie. Create, Retrieve, Search, etc). Following on from the "sortParameters" example request above, an example response follows:
{
{
"parameters": [0,1,2,3,4,5,6,7,8,9]
}
Refer to the API
documentation for information on the core web services provided by Formbird.