Returns all fields in the project that reference a specific model (works both for Models and Block Models)
Returns an array of resource objects of type field.
1GET https://site-api.datocms.com/item-types/:model_id_or_api_key/fields/referencing HTTP/1.12Authorization: Bearer YOUR-API-TOKEN3Accept: application/json4X-Api-Version: 3
1curl -g 'https://site-api.datocms.com/item-types/:model_id_or_api_key/fields/referencing' \2 \3 -H "Authorization: Bearer YOUR-API-TOKEN" \4 -H "Accept: application/json" \5 -H "X-Api-Version: 3"
1await fetch(2 "https://site-api.datocms.com/item-types/:model_id_or_api_key/fields/referencing",3 {4 headers: {5 Authorization: "Bearer YOUR-API-TOKEN",6 Accept: "application/json",7 "X-Api-Version": "3",8 },9 },10);
1HTTP/1.1 200 OK2Content-Type: application/json3Cache-Control: cache-control: max-age=0, private, must-revalidate4X-RateLimit-Limit: 305X-RateLimit-Remaining: 286 7{8 "data": [9 {10 "type": "field",11 "id": "Pkg-oztERp6o-Rj76nYKJg",12 "attributes": {13 "label": "Title",14 "field_type": "string",15 "api_key": "title",16 "localized": true,17 "validators": {18 "required": {}19 },20 "position": 1,21 "hint": "This field will be used as post title",22 "default_value": {23 "en": "A default value",24 "it": "Un valore di default"25 },26 "appearance": {27 "editor": "single_line",28 "parameters": {29 "heading": false30 },31 "addons": [32 {33 "id": "1234",34 "field_extension": "lorem_ipsum",35 "parameters": {}36 }37 ]38 },39 "deep_filtering_enabled": true40 },41 "relationships": {42 "item_type": {43 "data": {44 "type": "item_type",45 "id": "DxMaW10UQiCmZcuuA-IkkA"46 }47 },48 "fieldset": {49 "data": null50 }51 }52 }53 ]54}