Title: External REST-API into WordPress
Last modified: February 6, 2018

---

# External REST-API into WordPress

 *  [scepticore](https://wordpress.org/support/users/scepticore/)
 * (@scepticore)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/external-rest-api-into-wordpress/)
 * Hi guys!
 * I have a customer with the wish, to include information from a separate Software.
   I see, that this software also serves a REST-API. Now I need someone to prove
   my idea of doing this or giving me ideas to improve it.
 * My plan looks like this:
 * 1. Information from REST-API into the functions.php File
    2. Generate an Object/
   Array and serve those informations to a template 3. Include the templates in 
   content-blocks 4. Include the content-blocks on the pages, where they are used
 * Does this make sense or does it even work? Or is there another way, go get this
   done faster?
 * I decided to put the templates into the blocks, because it is easier to include
   those blocks in different regions/sections on the page.
 * Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/external-rest-api-into-wordpress/#post-9943663)
 * Depending on the amount of data and nature of it I’d consider caching the result
   in a transient or storing it more permanently in the database between points 
   1 & 2, for better performance.
 *  Thread Starter [scepticore](https://wordpress.org/support/users/scepticore/)
 * (@scepticore)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/external-rest-api-into-wordpress/#post-9943684)
 * [@jakept](https://wordpress.org/support/users/jakept/)
 * So basically my “flowchart” makes sense to you? And saving the information sounds
   good, but that means that I also need to check, if there has changed anything
   and keep the informations up to date.
 * But thanks for that input, haven’t thought so far.
 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/external-rest-api-into-wordpress/#post-9947790)
 * Depends on the data. If it’s a small amount of data it would be simpler just 
   to replace it all at once. If it’s a larger amount of data you probably shouldn’t
   query it on every page load. So how complex you need to get depends entirely 
   on what sort of API you’re dealing with. If you can share what exactly you’re
   working with you’ll get better feedback.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘External REST-API into WordPress’ is closed to new replies.

## Tags

 * [external](https://wordpress.org/support/topic-tag/external/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 2 participants
 * Last reply from: [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/external-rest-api-into-wordpress/#post-9947790)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
