Question

Using Imports via API Call

  • 2 October 2023
  • 2 replies
  • 126 views

Userlevel 3
Badge +6

I don’t think this is possible but wanted to check here because if it is possible it would be huge.

What I’m dreaming of is having an API endpoint where we can specify the import template name, along with a json document/payload containing the data points used in the import.

This would effectively be a low cost-cow effort way to create a new interface into the application, as we currently need to leverage IFS resources to create new endpoints for us.

For example, I could create an import containing an API template to create a new customer, with (for simplicity sake) the parameters: Customer ID, Customer Name, Node

I would then send a request to https://company.astea.cloud/RestService/import?templatename=CustomerImport

with {“Customer ID”: “APPLE”, “Customer Name”: “Apple Computer, Inc,”, “Node”: “Node1”}

in order to create the customer Apple.

I of course realize that this is the typical role of an API endpoint directly instead of via import, however, as I mentioned, this would act as a method for us to self-serve. We’re on 15.1


2 replies

Userlevel 7
Badge +10

I don’t know if it’s possible, but if you check the network tab in the developer tools while running an import, you can see the webservice that gets invoked when importing from the application.

The payload is the excel file along with the template and session information.

Hope this helps.  If a custom endpoint is needed to invoke this service, it would need to be done as a customization by IFS.

Userlevel 4
Badge +9

@k.bilsland 
You can also use the service entity apis. They are I think exactly what you want?
 

https://docs.ifs.com/techdocs/23r1/040_tailoring/300_extensibility/240_integration/500_entity_service_apis/#entity_service_apis
 

Not sure if that exist in Alliance?

 

 

Reply