---
title: "Update an SLO"
method: PATCH
path: "/slos/{sloId}"
tags: ["SLOs"]
---

# Update an SLO

`PATCH /slos/{sloId}`

## Request

- Base URL: `https://api.marboba.com/v1`
- URL: `https://api.marboba.com/v1/slos/{sloId}`
- Auth: HTTP bearer

Mutable fields: `name`, `target`, `type`, `window`, `unit`, `dataSource`, `currentValue`. Changing `type`, `target`, or `window` resets the error budget — the sloCalculator will refine the next recalculation.

## Request body

- SloInput
  - `name` string, required
  - `appId` string, required
  - `type` 'availability' | 'latency' | 'errorRate' | 'throughput' | 'custom', required
  - `target` number, required
  - `unit` string, nullable
  - `window` 'rolling7d' | 'rolling30d' | 'rolling90d' | 'calendarMonth' | 'calendarQuarter', required
  - `dataSource` string, nullable

## Response `200`

Updated

- object
  - `slo` Slo: A Service Level Objective bound to a single component (project). Error budget fields are server-managed — write-paths only validate type / target / window / unit / dataSource. The sloCalculator function recalculates `errorBudget*` and `status` every 15 minutes.
    - `id` string, required
    - `name` string, required
    - `appId` string, required: Component the SLO applies to.
    - `type` 'availability' | 'latency' | 'errorRate' | 'throughput' | 'custom', required
    - `target` number, required: For availability/errorRate: percentage 0-100. For latency: percentile (e.g. 99 for p99). For throughput/custom: caller-defined units.
    - `unit` string, nullable
    - `window` 'rolling7d' | 'rolling30d' | 'rolling90d' | 'calendarMonth' | 'calendarQuarter', required
    - `currentValue` number, nullable
    - `errorBudgetTotal` number, nullable
    - `errorBudgetRemaining` number, nullable
    - `errorBudgetPercentUsed` number, nullable
    - `status` 'met' | 'atRisk' | 'breached', nullable
    - `dataSource` string, nullable
    - `lastUpdatedAt` string, date-time, nullable
    - `createdAt` string, date-time, nullable
    - `updatedAt` string, date-time, nullable

## Other responses

- `400` (unresolved $ref)
- `404` (unresolved $ref)

---

[API](https://skmtc.dev/marboba/apis/marboba-public-rest-api.md) · [All operations](https://skmtc.dev/marboba/apis/marboba-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/marboba/apis/marboba-public-rest-api/revisions/5b96d525d88d?raw)
