# Can I get the API response without the many-to-many junction table?

**URL:** <https://community.directus.com/t/can-i-get-the-api-response-without-the-many-to-many-junction-table/91>\
**Category:** Help\
**Tags:** data-modeling, api\
**Created:** [April 15, 2025, 2:16pm UTC](https://community.directus.com/t/can-i-get-the-api-response-without-the-many-to-many-junction-table/91 "2025-04-15T14:16:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![comfortablycoding](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/comfortablycoding/32/37_2.png) [@comfortablycoding](https://community.directus.com/u/comfortablycoding)\
**Post date:** [April 15, 2025, 2:16pm UTC](https://community.directus.com/t/can-i-get-the-api-response-without-the-many-to-many-junction-table/91/1 "2025-04-15T14:16:48Z")

</div>

I’ve set up my data model (details below), but when I query `teams`, I have to include the junction table in the query, and it also shows up in the response. Is there a way to hide the junction table so I don’t have to include or see it in the request and response?

### Sample Query

`/items/teams?fields=users.directus_users_id.first_name,users.directus_users_id.last_name`

### Sample Response

```js
{
  "data": [
    {
      "users": [
        {
          "directus_users_id": {
            "first_name": "Lorem",
            "last_name": "Ipsum"
          }
        }
      ]
    }
  ]
}

```

### Data Model

- teams table
  - id
  - users (many to many to `directus_users`)

- teams\_directus\_users table
  - id
  - teams\_id
  - directus\_users\_id

---

<div class="post-metadata">

**Author:** ![brainslug](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/brainslug/32/35_2.png) [@brainslug](https://community.directus.com/u/brainslug)\
**Post date:** [April 22, 2025, 2:00pm UTC](https://community.directus.com/t/can-i-get-the-api-response-without-the-many-to-many-junction-table/91/2 "2025-04-22T14:00:59Z")

</div>

Nope, the API output mirrors the structure in your database.

> The App and API dynamically _“mirror”_ your actual schema and content in real-time. This is similar to how technical database clients (like _phpMyAdmin_) work.

To return custom formatted data creating a [Custom Endpoint](https://directus.io/docs/guides/extensions/api-extensions/endpoints) extension is the recommended way.
