Jump to content

API calls


jhaughey

Recommended Posts

Is it possible to make API calls with javascript in the Fusion Pro rules editor? Specifically, we have a client who would like to enter data in English, and have it translated to other languages, including Asian character languages, for print.

 

I'm thinking that if there is some way to call the Google translate API there may be a way to do it? Open to any other ideas as well.

TIA

Link to comment
Share on other sites

It depends on what kind of API it is.

 

If the API you're calling can be accessed by a URL, then yes, you can make calls to it by simply building up the appropriate URL with query string and calling CreateResource() with it. If you search this forum for "maps" you'll find several examples, such as this one. This will work in FusionPro VDP Creator or Server, though you should craft your rule and your job to handle intermittent failures to access the website.

 

If the API is something like a RESTful service or a .NET web service which requires XML to be posted, then you can't call that from a JavaScript rule. You would need to do that from your own custom application, and that custom app could then supply the results in a data file to FusionPro Server.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...