---
title: Get field
slug: data-platform/api/get-field
docTags: 
createdAt: 2026-09-02T14:41:00.110Z
---

{
  "id": "uXZgQGL55rRBuYEUGmCk4",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.us1.odp.optimizely.com/v3/schema/objects/{object_name}/fields/{field_name}",
    "servers": [
      {
        "url": "https://api.us1.odp.optimizely.com/v3/schema/objects/{object_name}/fields/{field_name}",
        "description": "United States"
      },
      {
        "url": "https://api.eu1.odp.optimizely.com/v3/schema/objects/{object_name}/fields/{field_name}",
        "description": "Europe"
      },
      {
        "url": "https://api.au1.odp.optimizely.com/v3/schema/objects/{object_name}/fields/{field_name}",
        "description": "Asia-Pacific"
      }
    ],
    "name": "Get field",
    "description": "List the details of a single field for a specific object.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "field_name",
          "type": "string",
          "description": "The name of the field."
        },
        {
          "kind": "required",
          "name": "object_name",
          "type": "string",
          "description": "The name of the object."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "x-api-key",
          "name": "x-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"tickets\",\"display_name\":\"Tickets\",\"alias\":\"ticket\",\"fields\":[{\"name\":\"field_name\",\"type\":\"number\",\"display_name\":\"Display Name\",\"primary\":true}],\"relations\":[{\"name\":\"my_relation\",\"display_name\":\"My Relationship\",\"child_object\":\"target_object_name\",\"join_fields\":[{\"parent\":\"child_id\",\"child\":\"child_id\"}]}]}",
            "description": "",
            "customType": "Field",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The name of the field (for example, <code>ticket_id</code>).</p>"
              },
              {
                "name": "display_name",
                "kind": "required",
                "type": "string",
                "description": "<p>The human-readable name of the field (for example, Ticket ID).</p>"
              },
              {
                "name": "public_read",
                "kind": "optional",
                "type": "boolean",
                "description": "Enable access with the API public key.",
                "default": false
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "array",
                "description": "Detailed description of the field's purpose.",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "type",
                "kind": "required",
                "type": "string<number | timestamp | string | boolean>",
                "description": "<p>An array of relations field data type. Options are <code>number</code>, <code>timestamp</code>, <code>string</code>, <code>boolean</code>.</p>",
                "enum": [
                  "number",
                  "timestamp",
                  "string",
                  "boolean"
                ]
              },
              {
                "name": "access_policies",
                "kind": "optional",
                "type": "object",
                "description": "<p>Set access policies, like PII, for the field.</p>",
                "example": "",
                "schema": [
                  {
                    "name": "PII",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Mark the field as Personally Identifiable Information (PII).</p>",
                    "example": "",
                    "schema": [
                      {
                        "name": "enable",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "<p>Set to <code>true</code> to mark the field as Personally Identifiable Information (PII); <code>false</code> to indicate the field is not PII. Default is <code>true</code>.</p>"
                      },
                      {
                        "name": "suggestible",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "<p>Set to <code>true</code> to enable autosuggestions for the field; <code>false</code> to disable autosuggestions. Default is <code>false</code>.</p>"
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Field",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "S3u_iBkH6c5Edu_wHOVPj",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.us1.odp.optimizely.com/v3/schema/objects/{object_name}/fields/{field_name} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "spTzwCmR13YZWbzJ1qbWz",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.us1.odp.optimizely.com/v3/schema/objects/{object_name}/fields/{field_name}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "VIg0rKiCnQNoFgvhg0w-X",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.us1.odp.optimizely.com/v3/schema/objects/{object_name}/fields/{field_name}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "kiuaZavIQbv-_OQwZ48rz",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.us1.odp.optimizely.com/v3/schema/objects/{object_name}/fields/{field_name}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "S3u_iBkH6c5Edu_wHOVPj"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"name\": \"\",\n  \"display_name\": \"\",\n  \"public_read\": false,\n  \"description\": [\n    \"\"\n  ],\n  \"type\": \"\",\n  \"access_policies\": {\n    \"PII\": {\n      \"enable\": false,\n      \"suggestible\": false\n    }\n  }\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n{}"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}