- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- How to grab data from an API for a typeahead optio...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2022 12:00 PM
08-09-2022 12:00 PM
How to grab data from an API for a typeahead option type?
Hi team,
Does anyone has any idea on how to make an option type of type “typeahead” to bring data from an API in real time? (as it seems this is working only when the option type is of type “Select list”), so we are looking for any advice or recommendation for this.
Note that the option list that is linked to the typeahead field (option type) is already configured to grab data via API in real time.
Thanks for your inputs!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 08:54 AM
08-17-2022 08:54 AM
Re: How to grab data from an API for a typeahead option type?
Correct. The cloud ID variable of the cloud previously selected where to build the instance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 06:10 AM
08-17-2022 06:10 AM
Re: How to grab data from an API for a typeahead option type?
So, to be clear, this input requires selection of a previous input in order to populate?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2022 01:47 PM
08-16-2022 01:47 PM
Re: How to grab data from an API for a typeahead option type?
Thank you @ncelebic for your response.
We found another issue: we need to pass a variable to the API we try to trigger to filter the data to be populated in the typeahead input, but it marks an error and the API request cannot be completed, as this value is expected.
Please see attached the screenshots of our configuration and the error msg.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 01:48 PM
08-10-2022 01:48 PM
Re: How to grab data from an API for a typeahead option type?
No, that was just what the API return was. I used title and the value was the id.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 01:34 PM
08-10-2022 01:34 PM
Re: How to grab data from an API for a typeahead option type?
@ncelebic so with type ahead it is data.title and not data.name?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022 01:04 PM
08-10-2022 01:04 PM
Re: How to grab data from an API for a typeahead option type?
Hi @AnaDuranAZ.
I made a simple REST option list from this endpoint: https://api.sampleapis.com/coffee/hot and using the following translation script:
for(var x=0;x < data.length; x++) {
results.push({name: data[x].title,value:data[x].id});
}
I’m using a typeahead input with the option list selected. I added the input to an operational workflow and I’m able to use typeahead to select items out of the list. I have a screen grab here: Screencast at August 10th 2022 - 4.02.46 pm.mp4 - Droplr
I may be misinterpreting what you’re asking.