Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Rules API POST

No security coverage

Part of the Rules ecosystem · 6 projects

View on drupal.org

"Rules API Post" is a working example, with documentation, for replicating Drupal content to external systems. This module adds a Rules action plugin for POSTing content to a REST API, using the hal_json format.

Use this module to explore methods of working with REST. This code can be used as a starting point for building integrations between Drupal and other REST APIs.
(Fresh Service Data API)

Along with a simple Rules action plugin (API POST), two content types and a Rule Configuration are also included.

Our method uses Rest Services on Drupal, setup for the hal_json format. While still available and supported, hal_json has been moved out of Drupal Core.

We are planning to adopt jsonapi for the next (3.x) version of this module.
www.drupal.org/project/jsonap
Jsonapi has been moved into Drupal Core. One selling point is the support for file uploads.

See our module documentation for additional details.


Documentation & Guide

Required & Enabled Modules

Rules: Rules, Rules API Post
Web Services: HAL, HTTP Basic Authentication, REST UI, RESTful Web Services, Serialization

To Do

  • Migrate the module to use /jsonapi with ?_format=api_json
  • Include file attachment support
  • Expand the documentation
  • Add working sample Rule export, rules.reaction.rules_api_post.yml
  • Add a sample date field
  • Set the default value of "Content Author" form field to use the current user's email
  • Capture REST response into API Post Transaction fields.

Open Source Historic Shout Out & Credits:

The base of this module was borrowed from the "Rules HTTP Client" project.
See: https://www.drupal.org/project/rules_http_client

Thanks to all those who have helped along the way.

Rules HTTP Client was originally created by Mitchell Tannenbaum (mitchell) and
co-maintained by Stuart Clark (Deciphered) and Benjamin Melançon
(mlncn). The Drupal 8 porting was done by Ajay Nimbolkar (ajayNimbolkar).

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Apr 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.1 Stable Apr 20, 2023