Hi,

Do you have plans to join "WebformFieldsResource" and "WebformSubmissionResource" REST resources into a single resource (something like "WebformCompleteSubmissionResource") ? It would be nice !

Good morning.

CommentFileSizeAuthor
#6 webform_rest_3003437_1.patch3.33 KBjoaomarques736

Comments

joaomarques736 created an issue. See original summary.

joaomarques736’s picture

Assigned: joaomarques736 » Unassigned
Issue summary: View changes
imclean’s picture

I hadn't thought about it. What would be the benefit?

joaomarques736’s picture

I worked on that in my project because, in this case, i only need a single request to get all webform submission data(fields and values), instead of two requests. If you want, we can collaborate.

imclean’s picture

This would be useful. I'm trying to match responses to what webform provides rather than generating new formats so I'll need to check what webform's API supports.

joaomarques736’s picture

Status: Active » Needs review
StatusFileSize
new3.33 KB

Hello imclean,

Here i provide a patch with a new REST resource which returns webform submission data and corresponding fields structure.

Best regards!

imclean’s picture

Version: 8.x-2.0-beta1 » 8.x-3.x-dev

Thanks @joaomarques736, I'm happy for you to commit to the 3.x branch. I'll add you as a maintainer. It is probably the best way forward to return correct response codes and use UUIDs.

  • dgaspara committed 445b1d9 on 8.x-2.x
    Issue #3003437 by joaomarques736: Join "WebformFieldsResource" and "...

  • dgaspara committed 405a538 on 4.x
    Issue #3003437 by joaomarques736, dgaspara: Join "WebformFieldsResource...
dgaspara’s picture

Status: Needs review » Fixed

Hi, the patch looks good. I tested manually and it work as expected. Thank you for your contribution.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.