Developer Documentation Library > Interviewer - Server > UNICOM Intelligence Interviewer architecture > Web Service tier > Interview Web Service > Interview Web Service interface > /api/interviews/ENGINE/PROJECT/functions/FUNCNAME
 
/api/interviews/ENGINE/PROJECT/functions/FUNCNAME
This URL runs a function in the interview routing script and retrieves the result. The arguments for the function calls must be POSTed to the URL:
{
"Arguments": {
"Argument": [
{
"Name": "QuestionFullName",
"Value": "PhoneNumber"
},
{
"Name": "Response",
"Value": "555-443-2234"
}
]
}
}
The arguments can also be posted as XML by specifying format=xml as a query parameter. Only simple data types, and arrays of simple data types, are permitted as arguments. The following example shows an array that contains three strings:
{
"Arguments": {
"Argument": {
"Name": "ChildNames",
"Value": [
"John",
"Mary",
"Joseph"
]
}
}
}
The functions are presented as calls in the interview’s routing script and the results are returned in the same format as the request (XML or JSON). Function outputs for simple data types, IOM objects, or arrays of simple data types and IOM objects, are supported:
{
  "Return": "True"
}
{
"Return": [
"12.4",
"56.3",
"2.7"
]
}
{
"Return": {
"Category": {
"Name": "Male",
"Style": {
"ElementAlign": "NewLine",
"Indent": "1",
"Control": { "Type": "RadioButton" }
},
"Label": {
"Style": { "ElementAlign": "Right" },
"Text": "Male"
}
}
}
}
IOM objects are supported as they can be converted to Player XML fragments (see Player XML schema).
See also
Interview Web Service interface