Answers.Body: <p>Not cleanly... the <a href="https://github.com/thephpleague/fractal" rel="nofollow noreferrer">Fractal</a> library that the Element API plugin uses to serialize that data has <code>'data'</code> hard-coded as the root element if no other resource key is passed in.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-14T20:24:49.643Z
Answers.LastActivityDate: 2017-09-14T20:24:49.643Z
Answers.UserDisplayName: Brad Bell
Body: <p>The output of a Element API endpoint allows you to change the resourceKey which contains the json data. Is it possible to return <em>just</em> the data without a resourceKey at all?</p>
  
  <p>Values such as null, false and empty string just default to data. </p>
  
Tags: <plugin-elementapi>
Title: Element API endpoint without a resourceKey
ThreadText: # Element API endpoint without a resourceKey
  
  (Asked by: username_0 on 2017-09-14)
  
  The output of a Element API endpoint allows you to change the resourceKey which contains the json data. Is it possible to return *just* the data without a resourceKey at all?
  
  Values such as null, false and empty string just default to data.
  
  **Tags:** plugin-elementapi
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-09-14. Score: 0 | Accepted answer
  
  Not cleanly... the [Fractal](https://github.com/thephpleague/fractal) library that the Element API plugin uses to serialize that data has `'data'` hard-coded as the root element if no other resource key is passed in.
  
  
  ---
  
  