Skip to main content

Import Service

The import service is a misfit among the web APIs as its implementation is slighty different. Looking at the service, you will notice two endpoints:

Import endpoints

They are basically the same, except that the "Execute" action is slightly more scalable because it accepts an array of the type that is accepted in the "InsertData" action.

Here is the data type of the POST body:

[
{
"StoredProcedureName": "sample string 1",
"ParameterNames": ["sample string 1", "sample string 2"],
"ParameterValues": ["sample string 1", "sample string 2"]
},
{
"StoredProcedureName": "sample string 1",
"ParameterNames": ["sample string 1", "sample string 2"],
"ParameterValues": ["sample string 1", "sample string 2"]
}
]

This web api merely executes the stored procedure that was passed in the StoredProcedureName parameter with the parameters and values in the corresponding arguments of the web api call.

An example of such a web api call could be the following:

[
{
"StoredProcedureName": "mboc_upsertPin",
"ParameterNames": ["Name", "HexColor"],
"ParameterValues": ["Pin 1", "#CD5C5C"]
},
{
"StoredProcedureName": "mboc_upsertPin",
"ParameterNames": ["Name", "HexColor"],
"ParameterValues": ["Pin 2", "#F08080"]
},
{
"StoredProcedureName": "mboc_upsertPin",
"ParameterNames": ["Name", "HexColor"],
"ParameterValues": ["Pin 3", "#FA8072"]
},
{
"StoredProcedureName": "mboc_upsertPin",
"ParameterNames": ["Name", "HexColor"],
"ParameterValues": ["Pin 4", "#FFA07A"]
}
]

When executed, this web api will have added or updated four pins. To learn more about how to format the request, check out the import actions article.

Read more