Lock Mechanism

The floLIVE Connectivity Management API utilizes a Lock mechanism to ensure reliable and orderly execution of operations. This mechanism is critical for preventing concurrent asynchronous actions that could lead to inconsistencies or errors.

Lock Functionality

By default all create, update and delete APIs (that is POST, PUT, PATCH and DELETE) possess a system defined lock state. This means that when an API call is made, it is essential to consider the current lock status to avoid operational conflicts. When an entity is locked, it prevents the execution of any additional API functions on that entity. Attempting to perform multiple actions on a locked entity will result in an error message as follows:

"The system is currently processing another action, please wait until the previous action is completed and then try again."

Unlocking Mechanism

When an action related to a locked entity is completed, the entity automatically becomes unlocked. If an API call generates an error message due to the lock status, the operation will not execute. In such instances, the user must initialize the API at a later time.

Types of Lock Entities

The Lock mechanism operates at three distinct levels:

  1. User ID Level: Locks are enforced at the level of the API username executing the actions.
  2. Action Type: This encompasses all API operations associated with a specific action.
  3. Entity Level: This includes individual entities such as Subscriber, Account and Plans etc.

The User ID and Action Type levels are applied as default to all Public APIs. In contrast, the Entity Level locking mechanism is applicable for these APIs:

  • Attach Subscriber Offer | Bulk Attach Subscriber Offer
  • Detach Subscriber Offer | Bulk Detach Subscriber Offer
  • Modify Subscriber SIM Status | Bulk Modify Subscriber SIM Status
  • Create Customer External Params
  • Modify Customer External Params API
  • Delete Customer External Params Instance

Bulk Operation APIs

To enhance operational efficiency, floLIVE provides Bulk Operation APIs. These APIs allow users to perform specific actions that override the standard lock mechanism. However, it is important to note that you cannot initiate a new bulk operation of the same type until the previous bulk operation has been fully completed.

Example

PUT /api/v2/customer/{id-1}/external-params/{instanceId-1} – modify customer external parameter

GET /api/v2/global/call/{id} – wait for succeses error code

PUT /api/v2/customer/{id-2}/external-params/{instanceId-2} - modify customer external parameter