Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. If field allowMerge is false, return error. 
  2. If field allowMerge is true. The newly added item and the existing item will be merged into one. Regarding the 3 fields, the merging algorithm:
    1. For action, merge(MARK_BLOCKED, MARK_BLOCKED_AND_EVACUATE_TASKS) = MARK_BLOCKED_AND_EVACUATE_TASKS
    2. For endTimestamp, merge(endTimestampA, endTimestampB) = max(endTimestampA, endTimestampB)
    3. For cause, we will combine all causes, merge("causeA", "causeB") = "causeA,causeB". If these two causes are the same, we will keep only one.

Response

  1. If no conflict, the response code is 201(CREATED), the response body is the added items.
  2. If conflict occurs:
    1. If allowMerge is false, the response code is 409(CONFLICT), and returns error.
    2. if allowMerge is true, the response code is 202(ACCEPTED), the response body is the merged resultitems.

Remove

DELETE: http://{jm_rest_address:port}/blocklist/node/<id>

...