# REST

> The values of a group can be read in the REST API of WordPress, in a field called ugly-fields. It is read only.

Source: https://uglydev.com/docs/forms-bindings-rest-graphql/rest/
Updated: 20 November 2026

## Turning it on

There are two switches, one over the other:

![The REST API switch of a group, in Settings, Code and API](https://uglydev.com/wp-content/uploads/2026/11/shot-rest-1-1-scaled.webp)

*The REST API switch of a group, in Settings, Code and API.*

| Switch | Where | Default |
| --- | --- | --- |
| **REST API** (the whole site) | **Settings → Advanced** | On |
| **REST API** (this group) | The group's **Settings → Code and API**, in advanced mode | Off |

The values of a group come out only when **both** are on. If the switch of the whole site is off, the one of the group is shown off and cannot be changed, with a link to Settings.

> **Tip:** the switch of the whole site is a kill switch. If something goes wrong, you turn REST off for every group with one click.

## What it looks like

![The REST response of a page with the field ugly-fields, in a browser](https://uglydev.com/wp-content/uploads/2026/11/shot-rest-2-1.webp)

*The REST response of a page with the field ugly-fields, in a browser.*

```
GET /wp-json/wp/v2/pages/12
```

```json
{
	"id": 12,
	"title": { "rendered": "About us" },
	"ugly-fields": {
		"headline": "We make things",
		"team": [
			{ "name": "Ana", "role": "Chef" },
			{ "name": "Luis", "role": "Baker" }
		]
	}
}
```

It works for posts, pages, your own content types, terms and users: anything WordPress shows in its REST API.

## Who sees what

A visitor only gets what they could read anyway:

- A draft, a private post or a post with a password gives nothing.
- A **password** field never leaves.
- The fields of a **user** are private data: their own, or for those who may list users.
- Fields that point at posts (`post_object`, `relationship`, `page_link`) show nothing of a post the visitor cannot read.
