2

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

0

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 you have read our privacy policy.

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