title: Is it possible to fully disable IRI in API Platform?
body: <p>I wan't to make a "classic" API without IRI. I just want the ID in return, not an IRI nor the object/entity.</p>
  
  <p>I already allow plain identifiers:</p>
  
  <pre><code>// config/packages/api_platform.yml
  api_platform:
  allow_plain_identifiers: true
  </code></pre>
  
  <p>If I make any request with Header Accept: application/json, it's still the same.</p>
  
  <p>I I try to cheat and replace my getter of my linked entity by a getId()</p>
  
  <pre class="lang-php prettyprint-override"><code>    public function getStatus(): AngelRelationshipStatus
      {
          return $this-&gt;status;
      }
  </code></pre>
  
  <p>by </p>
  
  <pre class="lang-php prettyprint-override"><code>    public function getStatus(): int
      {
          return $this-&gt;status-&gt;getId();
      }
  </code></pre>
  
  <p>I'm getting the Following error : "Warning: get_class() expects parameter 1 to be object, integer given"</p>
  
  <p>Why can't I just get a simple ID?</p>
  
  <p>Environment:</p>
  
  <ul>
  <li>PHP 7.2</li>
  <li>API Platform 2.3</li>
  </ul>