---
title: "Status Report Service"
url: "https://www.openstatus.dev/docs/sdk/nodejs/status-report-service"
date: "2018-10-20"
author: "openstatus"
description: "Manage incident reports and status updates with the openstatus Node.js SDK"
category: "SDK"
agent:
  instructions: "Search openstatus docs, guides, blog and product pages. Replace {query} with URL-encoded keywords or a question. Returns markdown with links to matching pages, not a generated answer."
  endpoint: "https://www.openstatus.dev/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://www.openstatus.dev/.well-known/search"
---

Manage incident reports with update timelines. The Status Report Service provides 8 RPC methods.

## Create Status Report

```typescript

  createOpenStatusClient,
  StatusReportStatus,
} from "@openstatus/sdk-node";

const client = createOpenStatusClient({
  apiKey: process.env.OPENSTATUS_API_KEY,
});

const { statusReport } = await client.statusReport.v1.StatusReportService
  .createStatusReport({
    title: "API Degradation",
    status: StatusReportStatus.INVESTIGATING,
    message: "We are investigating reports of increased latency.",
    date: "2024-01-15T10:30:00Z",
    pageId: "1",
    pageComponentIds: ["12"],
    notify: true,
  });

console.log(`Status report created: ${statusReport?.id}`);
```

## Add Status Report Update

Add a new entry to a status report's timeline.

```typescript

const { statusReport } = await client.statusReport.v1.StatusReportService
  .addStatusReportUpdate({
    statusReportId: "123",
    status: StatusReportStatus.IDENTIFIED,
    message: "The issue has been identified as a database connection problem.",
    date: "2024-01-15T11:00:00Z",
    notify: true,
  });
```

## Edit / Delete Status Report Updates

Entries in the timeline can be corrected or removed. Editing never notifies subscribers; editing the latest entry's status re-derives the report's status.

### Update Status Report Update

```typescript

const { statusReportUpdate } = await client.statusReport.v1.StatusReportService
  .updateStatusReportUpdate({
    id: "456",
    status: StatusReportStatus.MONITORING,
    message: "A fix has been deployed and we are monitoring.",
  });
```

To replace the entry's component impacts, pass `componentImpacts` together with `updateComponentImpacts: true` (an empty list clears them). Without the flag the impacts stay untouched.

### Delete Status Report Update

A report always keeps at least one update. Deleting the last one fails with `invalid_argument`; delete the report instead.

```typescript
const { success } = await client.statusReport.v1.StatusReportService
  .deleteStatusReportUpdate({ id: "456" });
```

## List Status Reports

List status reports with optional status filtering and pagination.

```typescript

const { statusReports, totalSize } = await client.statusReport.v1
  .StatusReportService.listStatusReports({
    limit: 10,
    offset: 0,
    statuses: [StatusReportStatus.INVESTIGATING, StatusReportStatus.IDENTIFIED],
  });

console.log(`Found ${totalSize} status reports`);
```

## Get / Update / Delete Status Reports

### Get Status Report

Returns the full report including the updates timeline.

```typescript

const { statusReport } = await client.statusReport.v1.StatusReportService
  .getStatusReport({ id: "123" });

console.log(`Title: ${statusReport?.title}`);
console.log(`Status: ${StatusReportStatus[statusReport?.status ?? 0]}`);

for (const update of statusReport?.updates ?? []) {
  console.log(`  ${update.date}: [${StatusReportStatus[update.status]}] ${update.message}`);
}
```

### Update Status Report

```typescript
const { statusReport } = await client.statusReport.v1.StatusReportService
  .updateStatusReport({
    id: "123",
    title: "Updated Title",
    pageComponentIds: ["12", "13"],
  });
```

### Delete Status Report

```typescript
const { success } = await client.statusReport.v1.StatusReportService
  .deleteStatusReport({ id: "123" });
```