The Business Data Service Rest API provides methods to manipulate business objects and to call rules.
Basic structure
You can create a call the Content service via an HTTP request. The URL template for this service is:
{server}/BDS.WebService/DataServiceRest.svc/{command}/{domain}/{rule-API-Code}?t={token}
The following parameters are standard for most of the supported commands.
Parameter | Description |
---|---|
t | The security token generated upon login |
Supported Commands
Text
Execute a rule through POST with JSON response
You can execute a rule via an HTTP POST request that looks like:
{server}/BDS.WebService/DataServiceRest.svc/exec2/{domain}/{rule-API-Code}?t={token}
The parameters in that URL are:
Parameter | Description |
---|---|
u | The path of where you want to create the new folder. |
The request body needs to be a JSON with the intended input parameters of the rule like:
{ Parameters : [{ Name : 'FIRSTNAME_OPTION', Value : 'LIKE' }, { Name : 'FIRSTNAME_VALUE1', Value : 'Joh' } ] }
The output varies depending on the type of rule you are executing and what output parameters it has. In all cases, this command returns back a JSON. In the example below, we called a Paginated SQL Rule whose Rule API Code is root_retrieve_paginated_Clients:
{ "DATA" : { "root_retrieve_paginated_Clients" : { "ITEMS" : [{ "FIRSTNAME" : "John", "ID" : "3", "LASTNAME" : "Smith", "SSN" : "111-1111-1111-1111", "RN" : "1" }, { "FIRSTNAME" : "Johnny", "ID" : "4", "LASTNAME" : "Jones", "SSN" : "2222-2222-2222-2222", "RN" : "2" }, { "FIRSTNAME" : "John", "ID" : "5", "LASTNAME" : "Gomez", "SSN" : "3333-3333-3333-3333", "RN" : "3" }, { "FIRSTNAME" : "John", "ID" : "6", "LASTNAME" : "Gill", "SSN" : "4444-4444-4444-444", "RN" : "4" } ], "TotalCount" : "4" } } }
Note: The exec2
command can be replaced with post.json
.
Execute a rule through GET with JSON response
You can execute a rule via an HTTP GET request that looks like:
{server}/BDS.WebService/DataServiceRest.svc/exec/{domain}/{rule-API-Code}?t={token}&{parameter1}={value1}&{parameter2}={value2}&{additional parameters}
The parameters in that URL are:
Parameter | Description |
---|---|
u | The path of where you want to create the new folder. |
parameter1, parameter2 | There are the input parameters of the rule you are executing. |
The output varies depending on the type of rule you are executing and what output parameters it has. In all cases, this command returns back a JSON. In the example below, we called a Paginated SQL Rule whose Rule API Code is root_retrieve_paginated_Clients:
{ "DATA" : { "root_retrieve_paginated_Clients" : { "ITEMS" : [{ "FIRSTNAME" : "John", "ID" : "3", "LASTNAME" : "Smith", "SSN" : "111-1111-1111-1111", "RN" : "1" }, { "FIRSTNAME" : "Amy", "ID" : "4", "LASTNAME" : "Jones", "SSN" : "2222-2222-2222-2222", "RN" : "2" }, { "FIRSTNAME" : "Jack", "ID" : "5", "LASTNAME" : "Gomez", "SSN" : "3333-3333-3333-3333", "RN" : "3" }, { "FIRSTNAME" : "Maya", "ID" : "6", "LASTNAME" : "Gill", "SSN" : "4444-4444-4444-444", "RN" : "4" } ], "TotalCount" : "4" } } }
Note: The exec
command can be replaced with get.json
.
Execute a rule through GET with XML response
Same as the previous command except the response will be an XML. You can execute a rule via an HTTP GET request that looks like:
{server}/BDS.WebService/DataServiceRest.svc/execxml/{domain}/{rule-API-Code}?t={token}&{parameter1}={value1}&{parameter2}={value2}&{additional parameters}
The parameters in that URL are:
Parameter | Description |
---|---|
u | The path of where you want to create the new folder. |
parameter1, parameter2 | There are the input parameters of the rule you are executing. |
The output varies depending on the type of rule you are executing and what output parameters it has. In all cases, this command returns back an XML. In the example below, we called a Paginated SQL Rule whose Rule API Code is root_retrieve_paginated_Clients:
<?xml version="1.0" encoding="UTF-8"?> <DATA> <root_retrieve_paginated_Clients> <ITEMS> <FIRSTNAME>John</FIRSTNAME> <ID>3</ID> <LASTNAME>Smith</LASTNAME> <SSN>1111-1111-1111-1111</SSN> <RN>1</RN> </ITEMS> <ITEMS> <FIRSTNAME>Amy</FIRSTNAME> <ID>4</ID> <LASTNAME>Jones</LASTNAME> <SSN>2222-2222-2222-2222</SSN> <RN>2</RN> </ITEMS> <ITEMS> <FIRSTNAME>Jack</FIRSTNAME> <ID>5</ID> <LASTNAME>Gomez</LASTNAME> <SSN>3333-3333-3333-3333</SSN> <RN>3</RN> </ITEMS> <ITEMS> <FIRSTNAME>Maya</FIRSTNAME> <ID>6</ID> <LASTNAME>Gill</LASTNAME> <SSN>4444-4444-4444-4444</SSN> <RN>4</RN> </ITEMS> <TotalCount>4</TotalCount> </root_retrieve_paginated_Clients> </DATA>
Note: The execxml
command can be replaced with get.xml
.