The Epicor rest documentation states that this is the endpoint for listing the function libraries in the system : https://serverurl/api/v2/efx/{Company}
However there is no mention of how to get a list of the actual functions inside the libraries themselves. Does anyone know of an endpoint for this? Thanks.
Hi Jose, could you elaborate? Are you saying there’s an endpoint listed in the rest help page or that the rest help page simply lists them? I’m trying to automate a process to call an endpoint and then list all the functions in the environment so I’m looking for it to be an actual endpoint I can call via script externally if it does exist. Thanks.
Makes sense. Given how easy it is to setup and maintain Epicor Functions, it really doesn’t make much sense anymore to develop integrations calling the standard REST API most of the time anyway. From security, maintenance, and efficiency/performance perspectives, leveraging the Epicor Functions framework to create easily publishable, maintainable, and testable functions just makes far more sense.
Just as an alternative to @Mark_Wonsil’s valid solution and as an FYI: Below is an example of an Epicor Function to return a list of Epicor Functions that can be used as a starting point.
By leveraging an Epicor Function to return a consolidated list of Functions, it will generally allow a far simpler integration in terms of external code/logic and be far more performant/efficient due to a lot less overhead while also making the broader solution easier to troubleshoot/support/update in the case of potential standard API/service changes in future updates.
var efxFunctionSearchTS = outputDs; //new Ice.Tablesets.EfxFunctionSearchTableset();
var efxFunctionSearchTempTS = new Ice.Tablesets.EfxFunctionSearchTableset();
// Get Library List
this.CallService<Ice.Contracts.EfxLibraryDesignerSvcContract>(efxSvc =>
{
var efxLibrarySeachOptions = new Ice.Lib.EfxLibraryDesigner.LibrarySearchOptions(“”,Ice.Lib.EfxLibraryDesigner.SearchKind.Usage,Ice.Lib.EfxLibraryDesigner.RollOutMode.Any);
Ice.Tablesets.EfxLibrarySearchTableset librariesDs = efxSvc.GetLibraryList(efxLibrarySeachOptions);
// For each Library, get Functions and merge results to a single return TS
foreach(var item in librariesDs.EfxLibraryList)
{
// Get Functions
var seachOptions = new Ice.Lib.EfxLibraryDesigner.FunctionSearchOptions(item.LibraryID,Ice.Lib.EfxLibraryDesigner.SearchKind.Usage);
efxFunctionSearchTempTS = efxSvc.GetFunctionList(seachOptions);
foreach(var efxFunctionListRow in efxFunctionSearchTempTS.EfxFunctionList)
{
var newEfxFunctionListRow = new EfxFunctionListRow();
BufferCopy.CopyExceptFor(efxFunctionListRow, newEfxFunctionListRow);
efxFunctionSearchTS.EfxFunctionList.Add(newEfxFunctionListRow);
}