# LeasableLock

(Zeitlich begrenzbare) Sperren für Entitäten/Vorgänge

## PUT /cmn/leasable-locks/{token}

> Verlängert eine Sperre

```json
{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"2026.14.3"},"tags":[{"name":"LeasableLock","description":"(Zeitlich begrenzbare) Sperren für Entitäten/Vorgänge"}],"servers":[{"url":"http://localhost:52177/api","description":"Generated server url"}],"paths":{"/cmn/leasable-locks/{token}":{"put":{"tags":["LeasableLock"],"summary":"Verlängert eine Sperre","operationId":"refreshLeasableLock_3","parameters":[{"name":"token","in":"path","description":"Token einer Sperre","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"leasePeriod","in":"query","description":"Lease-Dauer in Sekunden","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/common-locknlease-LeasableLockDto"}}}}}}}},"components":{"schemas":{"common-locknlease-LeasableLockDto":{"properties":{"key":{"type":"string","description":"Key des Locks","readOnly":true},"token":{"type":"integer","format":"int64","description":"Token des Locks","readOnly":true},"user":{"$ref":"#/components/schemas/core-api-ApiObjectReference"},"lockedBySystem":{"type":"boolean","default":false,"description":"Wurde diese Sperre vom System erzeugt?","readOnly":true},"validUntil":{"type":"string","format":"date-time","description":"Ablaufuhrzeit","readOnly":true}}},"core-api-ApiObjectReference":{"description":"Related account","properties":{"id":{"type":"string","description":"Identifier"},"label":{"type":"string","description":"a label","readOnly":true},"description":{"type":"string","description":"a short description","readOnly":true},"active":{"type":"boolean","description":"Activ","readOnly":true}},"required":["id"]}}}}
```

## DELETE /cmn/leasable-locks/{token}

> Gibt eine Sperre automatisch frei, gesteuert vom Frontend

```json
{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"2026.14.3"},"tags":[{"name":"LeasableLock","description":"(Zeitlich begrenzbare) Sperren für Entitäten/Vorgänge"}],"servers":[{"url":"http://localhost:52177/api","description":"Generated server url"}],"paths":{"/cmn/leasable-locks/{token}":{"delete":{"tags":["LeasableLock"],"summary":"Gibt eine Sperre automatisch frei, gesteuert vom Frontend","operationId":"removeLock","parameters":[{"name":"token","in":"path","description":"Token einer Sperre","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/core-api-OperationMessage"}}}}}}}},"components":{"schemas":{"core-api-OperationMessage":{"properties":{"context":{"type":"string","description":"message context"},"messageValue":{"type":"string","description":" message"}}}}}}
```

## GET /cmn/leasable-locks

>

```json
{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"2026.14.3"},"tags":[{"name":"LeasableLock","description":"(Zeitlich begrenzbare) Sperren für Entitäten/Vorgänge"}],"servers":[{"url":"http://localhost:52177/api","description":"Generated server url"}],"paths":{"/cmn/leasable-locks":{"get":{"tags":["LeasableLock"],"operationId":"getAllActiveLocks","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/common-locknlease-LeasableLockDto"}}}}}}}}},"components":{"schemas":{"common-locknlease-LeasableLockDto":{"properties":{"key":{"type":"string","description":"Key des Locks","readOnly":true},"token":{"type":"integer","format":"int64","description":"Token des Locks","readOnly":true},"user":{"$ref":"#/components/schemas/core-api-ApiObjectReference"},"lockedBySystem":{"type":"boolean","default":false,"description":"Wurde diese Sperre vom System erzeugt?","readOnly":true},"validUntil":{"type":"string","format":"date-time","description":"Ablaufuhrzeit","readOnly":true}}},"core-api-ApiObjectReference":{"description":"Related account","properties":{"id":{"type":"string","description":"Identifier"},"label":{"type":"string","description":"a label","readOnly":true},"description":{"type":"string","description":"a short description","readOnly":true},"active":{"type":"boolean","description":"Activ","readOnly":true}},"required":["id"]}}}}
```

## DELETE /cmn/leasable-locks/custom/{token}

> Gibt eine Sperre manuell frei, z.B. über Systemeinstellungen

```json
{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"2026.14.3"},"tags":[{"name":"LeasableLock","description":"(Zeitlich begrenzbare) Sperren für Entitäten/Vorgänge"}],"servers":[{"url":"http://localhost:52177/api","description":"Generated server url"}],"paths":{"/cmn/leasable-locks/custom/{token}":{"delete":{"tags":["LeasableLock"],"summary":"Gibt eine Sperre manuell frei, z.B. über Systemeinstellungen","operationId":"customRemoveLock","parameters":[{"name":"token","in":"path","description":"Token einer Sperre","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/core-api-OperationMessage"}}}}}}}},"components":{"schemas":{"core-api-OperationMessage":{"properties":{"context":{"type":"string","description":"message context"},"messageValue":{"type":"string","description":" message"}}}}}}
```
