This module adds Services support to the community module called content_lock that will prevent two users from editing the same node concurrently. This module exposes the main operations of content_lock through Services as a resource, so that content locking can be done over a web service API such as REST for mobile applications or third party integrations. The main operations it currently implements are retrieve, create, and delete.


This module exposes the following operations of content_lock as a web service:

  • retrieve - Find out if a node is locked and get info about a lock e.g. who owns the lock and when it was created.
  • create - Create a new content lock on a node. Locks a node preventing other users from editing it.
  • delete - Deletes an existing lock on a node. Only the lock owner may delete the lock.


This module depends on the following modules:


  1. Watch the step-by-step video tutorial (Best viewed in HD 720p)

- or follow these steps -

  1. Install and enable the dependant modules: Services, content_lock.
  2. Enable the rest_server module which is a sub-module of Services
  3. Install and enable this module.
  4. Import the services endpoint.
    1. Navigate to: admin/structure/services
    2. Click the "Import" link
    3. Copy & paste the contents of this file into the box: services_content_lock/examples/endpoint_import.txt
    4. Click Continue then click Save
  5. Check out the example curl command bash scripts located in: services_content_lock/examples/
  6. Use the detailed documentation for usage and operation details.

NOTE: It is a good idea to delete the examples/ directory on production environments.


Services Content Lock Documentation

You might want to use this module if..

You want to use Drupal as a datastore, but edit content through a different interface, e.g. a mobile application, or a thrid party system like SFDC, and you want to prevent concurrent editing.

Project information