Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

how to call a 3rd party rest api

310000N98T gravatar image
Question by webacity  (197) | Oct 03, 2015 at 07:01 PM restapialchemyapiibmclouddeveloperstrongloop

I want to use a bluemix 3rd party remote api (alchemy api)

At the moment I am unclear how this is done in a web application.

Does this happen client side or server side?

A lot of examples I'm seeing at the moment are about server nodejs/ express js but they seem to focus on creating your own apis. I'm not interested in creating my own api but to simply use a 3rd party api and to display the results in a client side UI

Taking a client side approach seems easier to understand. I could say create a form and a submit button to create a url request that calls a remote api with custom parameters. The json results could then be parsed and put in some client side UI

But I am unclear about what happens to the api key i.e. presumably it becomes visible in the url and someone else could see it, and what about authentication etc

I suspect the right approach is to use the server side approach for security, authentication etc

Surprisingly I tend to only find examples on the internet on how to create your own api not about calling a 3rd party rest api from server side such as nodejs & express.

If the server approach is the recommended approach how does my client side ui call (with custom parameters) the server side nodejs/expressjs, which in turn calls a remote api, which then returns the results for me to use in client ui? Or if it returns the results to the server, how do I then get that info from the server to my client ui.

Any good tutorial links much appreciated

I've noticed a new product called bluemix strongloop. Is this the right place to start?

If so, I'll focus on their documentation

People who like this

  0   Show 1
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
310000N98T gravatar image webacity (197)   Oct 04, 2015 at 04:02 AM 0
Share

The api explorer example in strongloop focuses on creating your own novel custom api i.e their coffeeshop example, where you are setting up a fictional coffeeshop where you can order coffees using get, put etc

It occurred to me that if I wanted strongloop to use 3rd party apis, all I need to do is to map the 3rd party api library to api explorer. i.e. manually recreate each 3rd party api in strongloop api explorer

I assume this is the right approach? though slightly counter intuitive as I would probably need to completely replicate an entire 3rd party api library manually into strongloop but surely a much better approach then doing a client side version of calling 3rd party rest apis. Taking a server side approach I will then have access to better security, authentication, analytics and other cool stuff that strongloop offers etc

Let me know anybody if this is a completely wrong approach to using strongloop for 3rd party apis

1 reply

  • Sort: 
110000PNBC gravatar image
Accepted answer

Answer by @chughts (12979) | Oct 06, 2015 at 06:09 AM

Based on the tags, I am guessing that you are trying to use the AlchemyAPIs. Fortunately there is a getting started guide on

http://www.alchemyapi.com/developers/getting-started-guide

with coding examples in Node.js, Python, Ruby and PHP.

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

Follow this question

74 people are following this question.

Answers

Answers & comments

Related questions

does strongloop connect with cloudant and dashdb? 0 Answers

Loopback start boilerplate vs Node red starter boilerplate 1 Answer

is node red scalable? 0 Answers

what's the difference between strongloop and loopback? 1 Answer

Supported Linked Data Resources on Alchemy api 0 Answers

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges