You are here

README.txt in Webform REST 4.x

Same filename and directory in other branches
  1. 8.3 README.txt
  2. 8 README.txt
  3. 8.2 README.txt
CONTENTS OF THIS FILE
---------------------

 * Introduction
 * Requirements
 * Installation
 * Configuration
 * Maintainers


INTRODUCTION
------------

Retrieve and submit webforms via REST.

1. Enable module
2. Enable REST resource "Webform Submit"
3. Enable REST resource "Webform Elements"
4. Enable REST resource "Webform Fields"
5. Enable REST resource "Webform Submission"

Note: This module does not provide UI to enable
REST resources. Use restui: https://www.drupal.org/project/restui
module, for example, to enable resource "Webform Submit",
"Webform Elements", etc.


REQUIREMENTS
------------

This module requires:
- webform
- restui


INSTALLATION
------------

 * Install as you would normally install a contributed Drupal module. Visit
   https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules
   for further information.


CONFIGURATION
-------------

- Retrieve Webform Elements

Returns all form elements including render array.
GET /webform_rest/{webform_id}/elements?_format=json

- Retrieve Webform Fields

Returns form fields.
GET /webform_rest/{webform_id}/fields?_format=json

- Submit Webform

POST /webform_rest/submit
Example POST data:
{
  "webform_id": "my_webform",
  "checkboxes_field": [
    "Option 3",
    "Option 5"
   ],
   "integer_field": 3,
   "radio_field": "Mail",
   "email": "myemail@mydomain.com.au"
}

- Update Webform Submission

PATCH /webform_rest/{webform_id}/submission/{uuid}?_format=json
Example PATCH data:
{
  "checkboxes_field": [
    "Option 3",
    "Option 5"
   ],
   "integer_field": 3,
   "radio_field": "Mail",
   "email": "myemail@mydomain.com.au"
}

- Retrieve Webform Submission

GET /webform_rest/{webform_id}/submission/{uuid}?_format=json


MAINTAINERS
-----------

Current maintainers:
* Ian McLean (imclean) - https://www.drupal.org/u/imclean
 * Debora Antunes (dgaspara) - https://www.drupal.org/u/dgaspara
 * João Marques (joaomarques736) - https://www.drupal.org/u/joaomarques736

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. * Introduction
  4. * Requirements
  5. * Installation
  6. * Configuration
  7. * Maintainers
  8. INTRODUCTION
  9. ------------
  10. Retrieve and submit webforms via REST.
  11. 1. Enable module
  12. 2. Enable REST resource "Webform Submit"
  13. 3. Enable REST resource "Webform Elements"
  14. 4. Enable REST resource "Webform Fields"
  15. 5. Enable REST resource "Webform Submission"
  16. Note: This module does not provide UI to enable
  17. REST resources. Use restui: https://www.drupal.org/project/restui
  18. module, for example, to enable resource "Webform Submit",
  19. "Webform Elements", etc.
  20. REQUIREMENTS
  21. ------------
  22. This module requires:
  23. - webform
  24. - restui
  25. INSTALLATION
  26. ------------
  27. * Install as you would normally install a contributed Drupal module. Visit
  28. https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules
  29. for further information.
  30. CONFIGURATION
  31. -------------
  32. - Retrieve Webform Elements
  33. Returns all form elements including render array.
  34. GET /webform_rest/{webform_id}/elements?_format=json
  35. - Retrieve Webform Fields
  36. Returns form fields.
  37. GET /webform_rest/{webform_id}/fields?_format=json
  38. - Submit Webform
  39. POST /webform_rest/submit
  40. Example POST data:
  41. {
  42. "webform_id": "my_webform",
  43. "checkboxes_field": [
  44. "Option 3",
  45. "Option 5"
  46. ],
  47. "integer_field": 3,
  48. "radio_field": "Mail",
  49. "email": "myemail@mydomain.com.au"
  50. }
  51. - Update Webform Submission
  52. PATCH /webform_rest/{webform_id}/submission/{uuid}?_format=json
  53. Example PATCH data:
  54. {
  55. "checkboxes_field": [
  56. "Option 3",
  57. "Option 5"
  58. ],
  59. "integer_field": 3,
  60. "radio_field": "Mail",
  61. "email": "myemail@mydomain.com.au"
  62. }
  63. - Retrieve Webform Submission
  64. GET /webform_rest/{webform_id}/submission/{uuid}?_format=json
  65. MAINTAINERS
  66. -----------
  67. Current maintainers:
  68. * Ian McLean (imclean) - https://www.drupal.org/u/imclean
  69. * Debora Antunes (dgaspara) - https://www.drupal.org/u/dgaspara
  70. * João Marques (joaomarques736) - https://www.drupal.org/u/joaomarques736