Knowledge Base/Making content from a REST endpoint available to Uniform

Making content from a REST endpoint available to Uniform

IntegrationDeveloperPersonalization

This recipe covers how to use Uniform to connect to an external system with content you want to use in Uniform, without having to write any code. In this example, reading content from the external system is accomplished using a REST endpoint.

The external content source in this example is a WordPress blog. You will make posts from the blog available in Uniform.

Interested in WordPress?

This recipe uses WordPress as an example, but it is not about WordPress specifically. For more details on how to use WordPress with Uniform, we have a lesson on our Connect : https://connect.uniform.dev/learn/visual-workspace-headless-wordpress/

This video walks you through the process of incorporating content from a WordPress site into a page built in Uniform.

Incorporate content from any external system without writing any code using the Uniform Visual Workspace.

This section provides instructions to build the data resource demonstrated in the video above.

  1. In Uniform, navigate to Data Types.
  2. Click the button Add data type.
  3. For Data Source, select HTTP Request > Create new....
  4. Enter the following values:

    Parameter

    Value

    Base URL

    https://public-api.wordpress.com/rest/v1.1/sites/227813160

    Name

    WordPress Site

    Public ID

    wordpressSite

  5. Click Save.
  1. Under the section Request settings, next to the dropdown with GET selected, enter the following value:
posts
  1. Enter the following values:

    Parameter

    Value

    Name

    WordPress Posts

    Public ID

    wordpressPosts

  2. Click Save.

In order to use the data type, you must create a Data Resource. These can be created in a number of places, depending on what you are trying to accomplish:

Location

Use cases

Component Patterns

A business user can use content from the external system in the specific component type.

Compositions

A business user can use content from the external system on parameters on the composition, or any of the components in the composition.

Content Entry Patterns

A business user can use content from the external system on fields on a specific content type.

Last modified: January 6, 2025