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.

1 Answer 1


Not cleanly... the 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.