Getting list of inverse relationships for model/block

In the DatoCMS UI when editing a Model or Block, I can see “Used in X fields” and get a reference to the inverse relationships where this is used.

How can I retrieve this same information via the API?

It’s an undocumented API call, so it might change in the future without notice, but here it is!

curl 'https://site-api.datocms.com/item-types/<ITEM_TYPE_OR_BLOCK_MODEL_ID>/fields/referencing'  \
  -H 'Accept: application/vnd.api+json' \
  -H 'X-Api-Version: 3' \
  -H 'Authorization: Bearer YOUR TOKEN'
2 Likes