> For the complete documentation index, see [llms.txt](https://docs.enlyze.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enlyze.com/enlyze-api/api-referenz/downtime-reasons.md).

# Downtime Reasons

⚠️ **Experimental** — this resource is under active development and may change without notice.

## Get Downtime Reasons

> Returns a list of downtime reasons in your organization.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Downtime Reasons","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"DowntimeCategory":{"type":"string","enum":["PLANNED","UNPLANNED","NOT_SCHEDULED","INVALID"],"title":"DowntimeCategory"},"DowntimeReasonState":{"type":"string","enum":["active","archived"],"title":"DowntimeReasonState"},"PaginatedDowntimeReasons":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DowntimeReason"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedDowntimeReasons"},"DowntimeReason":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Downtime Reason UUID","description":"The UUID of the downtime reason."},"name":{"type":"string","title":"Downtime Reason Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Description","description":"Free-text description of the downtime reason."},"category":{"$ref":"#/components/schemas/DowntimeCategory","title":"Downtime Reason Category","description":"Category of the downtime reason."},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Group"},"state":{"$ref":"#/components/schemas/DowntimeReasonState","title":"Downtime Reason State","description":"Lifecycle state of the downtime reason."},"catalog":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Downtime Catalog","description":"UUID of the catalog this reason belongs to. Resolve it via `GET /api/v2/downtime-catalogs/{uuid}`. `null` for legacy reasons not yet migrated to a catalog (only reachable as an embedded reason on `GET /api/v2/downtimes`)."}},"type":"object","required":["uuid","name","category","group","state"],"title":"DowntimeReason"},"Metadata":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pagination continuation point. Specify its value as the `cursor` parameter in a request with otherwise the same parameters to fetch the next page. `None`, if there is no more data to be fetched from the server."}},"additionalProperties":false,"type":"object","required":["next_cursor"],"title":"Metadata"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/downtime-reasons":{"get":{"tags":["Downtime Reasons"],"summary":"Get Downtime Reasons","description":"Returns a list of downtime reasons in your organization.","operationId":"get_downtime_reasons_v2_downtime_reasons_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"name":"uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more downtime reason UUIDs.","description":"If not set, all downtime reasons will be considered."},"description":"If not set, all downtime reasons will be considered."},{"name":"catalog","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more downtime catalog UUIDs.","description":"Only return reasons belonging to any of the given catalogs."},"description":"Only return reasons belonging to any of the given catalogs."},{"name":"machine","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more machine UUIDs.","description":"Only return reasons whose catalog is assigned to any of the given machines. If not set, reasons for all machines will be considered."},"description":"Only return reasons whose catalog is assigned to any of the given machines. If not set, reasons for all machines will be considered."},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/DowntimeCategory"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more downtime categories.","description":"If not set, all categories will be considered."},"description":"If not set, all categories will be considered."},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DowntimeReasonState"},{"type":"null"}],"title":"Filter by lifecycle state.","description":"If not set, both active and archived reasons will be returned."},"description":"If not set, both active and archived reasons will be returned."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDowntimeReasons"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Create Downtime Reason

> Create a downtime reason within a catalog.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Downtime Reasons","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"CreateDowntimeReason":{"properties":{"catalog":{"type":"string","format":"uuid","title":"Downtime Catalog","description":"UUID of the active catalog to create the reason in."},"name":{"type":"string","minLength":1,"title":"Downtime Reason Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Description","description":"Free-text description of the downtime reason."},"category":{"$ref":"#/components/schemas/DowntimeCategory","title":"Downtime Reason Category","description":"One of: PLANNED, UNPLANNED, NOT_SCHEDULED, INVALID"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Group","description":"Single-level, free-text group the reason belongs to."}},"type":"object","required":["catalog","name","category"],"title":"CreateDowntimeReason"},"DowntimeCategory":{"type":"string","enum":["PLANNED","UNPLANNED","NOT_SCHEDULED","INVALID"],"title":"DowntimeCategory"},"DowntimeReason":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Downtime Reason UUID","description":"The UUID of the downtime reason."},"name":{"type":"string","title":"Downtime Reason Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Description","description":"Free-text description of the downtime reason."},"category":{"$ref":"#/components/schemas/DowntimeCategory","title":"Downtime Reason Category","description":"Category of the downtime reason."},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Group"},"state":{"$ref":"#/components/schemas/DowntimeReasonState","title":"Downtime Reason State","description":"Lifecycle state of the downtime reason."},"catalog":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Downtime Catalog","description":"UUID of the catalog this reason belongs to. Resolve it via `GET /api/v2/downtime-catalogs/{uuid}`. `null` for legacy reasons not yet migrated to a catalog (only reachable as an embedded reason on `GET /api/v2/downtimes`)."}},"type":"object","required":["uuid","name","category","group","state"],"title":"DowntimeReason"},"DowntimeReasonState":{"type":"string","enum":["active","archived"],"title":"DowntimeReasonState"},"CatalogNotFoundError":{"properties":{"type":{"type":"string","const":"catalog_not_found","title":"Type","default":"catalog_not_found"}},"type":"object","title":"CatalogNotFoundError"},"CatalogArchivedError":{"properties":{"type":{"type":"string","const":"archived_catalog","title":"Type","default":"archived_catalog"}},"type":"object","title":"CatalogArchivedError"},"ReasonNameCollisionError":{"properties":{"type":{"type":"string","const":"name_collision","title":"Type","default":"name_collision"},"conflict":{"$ref":"#/components/schemas/ConflictingReason","title":"Conflicting Reason","description":"The reason already occupying the slot; when its `state` is `archived`, restoring it is an alternative to creating a new one."}},"type":"object","required":["conflict"],"title":"ReasonNameCollisionError"},"ConflictingReason":{"properties":{"reason":{"type":"string","format":"uuid","title":"Conflicting Reason UUID"},"state":{"$ref":"#/components/schemas/DowntimeReasonState","title":"Conflicting Reason State","description":"Lifecycle state of the conflicting reason."}},"type":"object","required":["reason","state"],"title":"ConflictingReason"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/downtime-reasons":{"post":{"tags":["Downtime Reasons"],"summary":"Create Downtime Reason","description":"Create a downtime reason within a catalog.","operationId":"create_downtime_reason_v2_downtime_reasons_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDowntimeReason"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimeReason"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CatalogNotFoundError"}],"discriminator":{"propertyName":"type","mapping":{"catalog_not_found":"#/components/schemas/CatalogNotFoundError"}},"title":"Response 404 Create Downtime Reason V2 Downtime Reasons Post"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CatalogArchivedError"},{"$ref":"#/components/schemas/ReasonNameCollisionError"}],"discriminator":{"propertyName":"type","mapping":{"archived_catalog":"#/components/schemas/CatalogArchivedError","name_collision":"#/components/schemas/ReasonNameCollisionError"}},"title":"Response 409 Create Downtime Reason V2 Downtime Reasons Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get Downtime Reason

> Returns details for a specific downtime reason.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Downtime Reasons","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"DowntimeReason":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Downtime Reason UUID","description":"The UUID of the downtime reason."},"name":{"type":"string","title":"Downtime Reason Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Description","description":"Free-text description of the downtime reason."},"category":{"$ref":"#/components/schemas/DowntimeCategory","title":"Downtime Reason Category","description":"Category of the downtime reason."},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Group"},"state":{"$ref":"#/components/schemas/DowntimeReasonState","title":"Downtime Reason State","description":"Lifecycle state of the downtime reason."},"catalog":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Downtime Catalog","description":"UUID of the catalog this reason belongs to. Resolve it via `GET /api/v2/downtime-catalogs/{uuid}`. `null` for legacy reasons not yet migrated to a catalog (only reachable as an embedded reason on `GET /api/v2/downtimes`)."}},"type":"object","required":["uuid","name","category","group","state"],"title":"DowntimeReason"},"DowntimeCategory":{"type":"string","enum":["PLANNED","UNPLANNED","NOT_SCHEDULED","INVALID"],"title":"DowntimeCategory"},"DowntimeReasonState":{"type":"string","enum":["active","archived"],"title":"DowntimeReasonState"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/downtime-reasons/{uuid}":{"get":{"tags":["Downtime Reasons"],"summary":"Get Downtime Reason","description":"Returns details for a specific downtime reason.","operationId":"get_downtime_reason_v2_downtime_reasons__uuid__get","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the downtime reason."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimeReason"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Update Downtime Reason

> Update a downtime reason's name, description, or group.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Downtime Reasons","description":"⚠️ **Experimental** — this resource is under active development and may change without notice."}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"UpdateDowntimeReason":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"}},"type":"object","title":"UpdateDowntimeReason"},"DowntimeReason":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Downtime Reason UUID","description":"The UUID of the downtime reason."},"name":{"type":"string","title":"Downtime Reason Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Description","description":"Free-text description of the downtime reason."},"category":{"$ref":"#/components/schemas/DowntimeCategory","title":"Downtime Reason Category","description":"Category of the downtime reason."},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downtime Reason Group"},"state":{"$ref":"#/components/schemas/DowntimeReasonState","title":"Downtime Reason State","description":"Lifecycle state of the downtime reason."},"catalog":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Downtime Catalog","description":"UUID of the catalog this reason belongs to. Resolve it via `GET /api/v2/downtime-catalogs/{uuid}`. `null` for legacy reasons not yet migrated to a catalog (only reachable as an embedded reason on `GET /api/v2/downtimes`)."}},"type":"object","required":["uuid","name","category","group","state"],"title":"DowntimeReason"},"DowntimeCategory":{"type":"string","enum":["PLANNED","UNPLANNED","NOT_SCHEDULED","INVALID"],"title":"DowntimeCategory"},"DowntimeReasonState":{"type":"string","enum":["active","archived"],"title":"DowntimeReasonState"},"ReasonNotFoundError":{"properties":{"type":{"type":"string","const":"reason_not_found","title":"Type","default":"reason_not_found"}},"type":"object","title":"ReasonNotFoundError"},"ReasonArchivedError":{"properties":{"type":{"type":"string","const":"archived_reason","title":"Type","default":"archived_reason"}},"type":"object","title":"ReasonArchivedError"},"ReasonNameCollisionError":{"properties":{"type":{"type":"string","const":"name_collision","title":"Type","default":"name_collision"},"conflict":{"$ref":"#/components/schemas/ConflictingReason","title":"Conflicting Reason","description":"The reason already occupying the slot; when its `state` is `archived`, restoring it is an alternative to creating a new one."}},"type":"object","required":["conflict"],"title":"ReasonNameCollisionError"},"ConflictingReason":{"properties":{"reason":{"type":"string","format":"uuid","title":"Conflicting Reason UUID"},"state":{"$ref":"#/components/schemas/DowntimeReasonState","title":"Conflicting Reason State","description":"Lifecycle state of the conflicting reason."}},"type":"object","required":["reason","state"],"title":"ConflictingReason"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/downtime-reasons/{uuid}":{"patch":{"tags":["Downtime Reasons"],"summary":"Update Downtime Reason","description":"Update a downtime reason's name, description, or group.","operationId":"update_downtime_reason_v2_downtime_reasons__uuid__patch","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the downtime reason."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDowntimeReason"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowntimeReason"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReasonNotFoundError"}],"discriminator":{"propertyName":"type","mapping":{"reason_not_found":"#/components/schemas/ReasonNotFoundError"}},"title":"Response 404 Update Downtime Reason V2 Downtime Reasons  Uuid  Patch"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ReasonArchivedError"},{"$ref":"#/components/schemas/ReasonNameCollisionError"}],"discriminator":{"propertyName":"type","mapping":{"archived_reason":"#/components/schemas/ReasonArchivedError","name_collision":"#/components/schemas/ReasonNameCollisionError"}},"title":"Response 409 Update Downtime Reason V2 Downtime Reasons  Uuid  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```
