---
title: "Entity browser"
date: "2023-10-05T00:49:18+00:00"
summary: "Simplify content management with the Entity Browser feature. Easily reference and embed media assets in your Drupal site using JSON:API integration. Streamline your workflow and enhance your site's visual appeal."
image:
type: "page"
url: "/drupal-starter-kits/add-ons/site-studio/entity-browser"
id: "b67e24ae-5a6d-4ff8-8f0a-6bcd7c01434b"
---

Schema:

    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "pattern": "^form-field$"
        },
        "id": {
          "type": "string",
          "pattern": "^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$"
        },
        "machine_name": {
          "type": "string"
        },
        "data": {
          "type": "object",
          "properties": {
            "uid": {
              "type": "string",
              "pattern": "^form-entity-browser$"
            },
            "title": {
              "type": "string"
            },
            "value": {
              "type": "object",
              "properties": {
                "entity": {
                  "type": "object",
                  "properties": {
                    "entityType": {
                      "type": "string"
                    },
                    "entityUUID": {
                      "type": "string"
                    },
                    "entityId": {
                      "type": "string"
                    }
                  }
                },
                "settings": {
                  "type": "object",
                  "properties": {
                    "entityBrowserType": {
                      "type": "string"
                    },
                    "entityType": {
                      "type": "string"
                    },
                    "bundles": {
                      "type": "object"
                    }
                  }
                },
                "jsonapi_link": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "required": [
        "id",
        "type",
        "data"
      ]
    }

Example output:

Given "Entity browser" form element on a component set up like so

![e45605da-Screenshot%202023-12-06%20at%2002.01.29.png](https://acquia.widen.net/content/6240e04f-3263-4ada-b86d-b071ea2dc0d6/web/e45605da-Screenshot%202023-12-06%20at%2002.01.29.png)

And used on Node layout canvas like so

![b9c3407f-Screenshot%202023-12-06%20at%2002.03.08.png](https://acquia.widen.net/content/7c7e7e89-7637-4a61-8fb2-311699d39462/web/b9c3407f-Screenshot%202023-12-06%20at%2002.03.08.png)

JSON:API output for this form field will be this:

    {
      "type": "form-field",
      "id": "69922b59-2b5a-4673-a5b5-ea57c0d83ff3",
      "machine_name": "entity-browser",
      "data": {
        "uid": "form-entity-browser",
        "title": "Entity browser",
        "value": {
          "entity": {
            "entityType": "media",
            "entityUUID": "79611cf8-0a54-4d6d-aebd-8f77a159acd5",
            "entityId": "79611cf8-0a54-4d6d-aebd-8f77a159acd5"
          },
          "settings": {
            "options": {
              "entityBrowserType": "media_library",
              "entityType": "media",
              "bundles": {
                "acquia_dam_image_asset": true
              }
            }
          },
          "jsonapi_link": "https://sitestudiodocs.acquia.com/jsonapi/media/acquia_dam_image_asset/79611cf8-0a54-4d6d-aebd-8f77a159acd5"
        }
      }
    }

In this example "value" object contains "jsonapi\_link" property as the "Entity browser" form field stores reference to a Media library entity. The value of "jsonapi\_link" property is an absolute url pointing to a JSON:API Resource for referenced media entity with uuid "79611cf8-0a54-4d6d-aebd-8f77a159acd5".