or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

administration.mdasset-management.mdbitbucket.mdconfluence.mddevelopment-tools.mdindex.mdjira.mdservice-management.mdstatuspage.md

statuspage.mddocs/

0

# StatusPage API

1

2

Comprehensive StatusPage REST API client providing incident management, status communication, subscriber management, and service reliability monitoring. Supports complete StatusPage functionality including components, metrics, incidents, subscribers, and postmortem management for transparent service communication.

3

4

## Initialization

5

6

```python { .api }

7

class StatusPage(AtlassianRestAPI):

8

def __init__(self, url: str, username: str = None, password: str = None,

9

token: str = None, **kwargs):

10

"""

11

Initialize StatusPage client.

12

13

Parameters:

14

- url (str): Base URL of StatusPage instance

15

- username (str, optional): Username for authentication

16

- password (str, optional): Password or API token

17

- token (str, optional): Bearer token for authentication

18

"""

19

```

20

21

## Capabilities

22

23

### Page Management

24

25

Core StatusPage administration and configuration for managing status pages and organizational access.

26

27

```python { .api }

28

def page_list_pages(self) -> List[dict]:

29

"""

30

Get all pages for authenticated user.

31

32

Returns:

33

List[dict]: Status pages with configuration and access permissions

34

"""

35

36

def get_page(self, page_id: str) -> T_resp_json:

37

"""

38

Get page details.

39

40

Parameters:

41

- page_id: Page ID

42

43

Returns:

44

dict: Page information with branding, domain, and settings

45

"""

46

47

def page_update(self, page_id: str, page: dict) -> T_resp_json:

48

"""

49

Update page configuration.

50

51

Parameters:

52

- page_id: Page ID

53

- page: Page configuration updates

54

55

Returns:

56

dict: Updated page data

57

"""

58

```

59

60

### Organization and User Management

61

62

User permission management and organizational access control for StatusPage administration.

63

64

```python { .api }

65

def organization_get_users(self, organization_id: str, page: int = 1,

66

per_page: int = 100) -> T_resp_json:

67

"""

68

Get organization users.

69

70

Parameters:

71

- organization_id: Organization ID

72

- page: Page number for pagination

73

- per_page: Results per page

74

75

Returns:

76

dict: Users list with roles and permissions

77

"""

78

79

def organization_get_user_permissions(self, organization_id: str,

80

user_id: str) -> T_resp_json:

81

"""

82

Get user permissions for organization.

83

84

Parameters:

85

- organization_id: Organization ID

86

- user_id: User ID

87

88

Returns:

89

dict: User permissions and page access

90

"""

91

92

def organization_set_user_permissions(self, organization_id: str, user_id: str,

93

pages: List[str]) -> T_resp_json:

94

"""

95

Set user permissions for pages.

96

97

Parameters:

98

- organization_id: Organization ID

99

- user_id: User ID

100

- pages: List of page IDs to grant access

101

102

Returns:

103

dict: Updated permissions

104

"""

105

```

106

107

### Access Control and Groups

108

109

Granular access control for components, metrics, and page visibility with group-based permissions.

110

111

```python { .api }

112

def page_access_users_list(self, page_id: str, email: str = None,

113

page: int = 1, per_page: int = 100) -> T_resp_json:

114

"""

115

Get page access users.

116

117

Parameters:

118

- page_id: Page ID

119

- email: Filter by email address

120

- page: Page number

121

- per_page: Results per page

122

123

Returns:

124

dict: Access users with component and metric permissions

125

"""

126

127

def page_set_access_user(self, page_id: str, page_access_user_id: str,

128

external_login: str, email: str,

129

page_access_group_ids: List[str]) -> T_resp_json:

130

"""

131

Set access user configuration.

132

133

Parameters:

134

- page_id: Page ID

135

- page_access_user_id: Access user ID

136

- external_login: External login identifier

137

- email: User email

138

- page_access_group_ids: Group IDs for access

139

140

Returns:

141

dict: Updated access user configuration

142

"""

143

144

def page_create_access_group(self, page_id: str, name: str,

145

page_access_user_ids: List[str],

146

component_ids: List[str] = None,

147

metric_ids: List[str] = None) -> T_resp_json:

148

"""

149

Create access group.

150

151

Parameters:

152

- page_id: Page ID

153

- name: Group name

154

- page_access_user_ids: User IDs to include

155

- component_ids: Component IDs for group access

156

- metric_ids: Metric IDs for group access

157

158

Returns:

159

dict: Created access group data

160

"""

161

```

162

163

### Incident Management

164

165

Comprehensive incident lifecycle management including creation, updates, status tracking, and resolution.

166

167

```python { .api }

168

def page_create_incident(self, page_id: str, incident: dict) -> T_resp_json:

169

"""

170

Create incident.

171

172

Parameters:

173

- page_id: Page ID

174

- incident: Incident data (name, status, impact, component_ids, etc.)

175

176

Returns:

177

dict: Created incident with ID and initial status

178

"""

179

180

def page_list_incidents(self, page_id: str, q: str = None,

181

page: int = 1, per_page: int = 100) -> T_resp_json:

182

"""

183

List incidents with search and filtering.

184

185

Parameters:

186

- page_id: Page ID

187

- q: Search query for incident names/descriptions

188

- page: Page number

189

- per_page: Results per page

190

191

Returns:

192

dict: Incidents list with status and impact information

193

"""

194

195

def page_update_incident(self, page_id: str, incident_id: str,

196

incident: dict) -> T_resp_json:

197

"""

198

Update incident.

199

200

Parameters:

201

- page_id: Page ID

202

- incident_id: Incident ID

203

- incident: Incident updates (status, component_ids, incident_updates, etc.)

204

205

Returns:

206

dict: Updated incident data

207

"""

208

209

def page_list_unresolved_incidents(self, page_id: str, page: int = 1,

210

per_page: int = 100) -> T_resp_json:

211

"""

212

Get unresolved incidents.

213

214

Parameters:

215

- page_id: Page ID

216

- page: Page number

217

- per_page: Results per page

218

219

Returns:

220

dict: Active incidents requiring attention

221

"""

222

223

def page_list_scheduled_incidents(self, page_id: str, page: int = 1,

224

per_page: int = 100) -> T_resp_json:

225

"""

226

Get scheduled maintenance incidents.

227

228

Parameters:

229

- page_id: Page ID

230

- page: Page number

231

- per_page: Results per page

232

233

Returns:

234

dict: Upcoming scheduled maintenance events

235

"""

236

```

237

238

### Postmortem Management

239

240

Incident analysis and postmortem documentation for service reliability improvement.

241

242

```python { .api }

243

def page_create_postmortem(self, page_id: str, incident_id: str,

244

postmortem: dict) -> T_resp_json:

245

"""

246

Create incident postmortem.

247

248

Parameters:

249

- page_id: Page ID

250

- incident_id: Incident ID

251

- postmortem: Postmortem content and analysis

252

253

Returns:

254

dict: Created postmortem data

255

"""

256

257

def page_publish_postmortem(self, page_id: str, incident_id: str,

258

postmortem: dict) -> T_resp_json:

259

"""

260

Publish postmortem for public viewing.

261

262

Parameters:

263

- page_id: Page ID

264

- incident_id: Incident ID

265

- postmortem: Final postmortem content

266

267

Returns:

268

dict: Published postmortem with public URL

269

"""

270

271

def page_get_postmortem(self, page_id: str, incident_id: str) -> T_resp_json:

272

"""

273

Get incident postmortem.

274

275

Parameters:

276

- page_id: Page ID

277

- incident_id: Incident ID

278

279

Returns:

280

dict: Postmortem content and status

281

"""

282

```

283

284

### Component Management

285

286

Service component tracking and status management for granular service visibility.

287

288

```python { .api }

289

def page_create_component(self, page_id: str, component: dict) -> T_resp_json:

290

"""

291

Create service component.

292

293

Parameters:

294

- page_id: Page ID

295

- component: Component data (name, description, status, group_id, etc.)

296

297

Returns:

298

dict: Created component with ID and configuration

299

"""

300

301

def page_get_components(self, page_id: str, per_page: int = 100,

302

page: int = 1) -> T_resp_json:

303

"""

304

Get page components.

305

306

Parameters:

307

- page_id: Page ID

308

- per_page: Results per page

309

- page: Page number

310

311

Returns:

312

dict: Components list with status and uptime data

313

"""

314

315

def page_update_component(self, page_id: str, component_id: str,

316

component: dict) -> T_resp_json:

317

"""

318

Update component.

319

320

Parameters:

321

- page_id: Page ID

322

- component_id: Component ID

323

- component: Component updates (status, name, description, etc.)

324

325

Returns:

326

dict: Updated component data

327

"""

328

329

def page_get_uptime_component(self, page_id: str, component_id: str,

330

start: str = None, end: str = None) -> T_resp_json:

331

"""

332

Get component uptime data.

333

334

Parameters:

335

- page_id: Page ID

336

- component_id: Component ID

337

- start: Start date (ISO format)

338

- end: End date (ISO format)

339

340

Returns:

341

dict: Uptime statistics and availability data

342

"""

343

344

def page_create_component_group(self, page_id: str, description: str,

345

components_group: dict) -> T_resp_json:

346

"""

347

Create component group.

348

349

Parameters:

350

- page_id: Page ID

351

- description: Group description

352

- components_group: Group configuration (name, component_ids, etc.)

353

354

Returns:

355

dict: Created component group

356

"""

357

```

358

359

### Metrics and Monitoring

360

361

Performance metrics collection, visualization, and monitoring for service health tracking.

362

363

```python { .api }

364

def page_get_list_of_metrics(self, page_id: str, per_page: int = 100,

365

page: int = 1) -> T_resp_json:

366

"""

367

Get page metrics.

368

369

Parameters:

370

- page_id: Page ID

371

- per_page: Results per page

372

- page: Page number

373

374

Returns:

375

dict: Metrics list with data points and configuration

376

"""

377

378

def page_add_data_to_metric(self, page_id: str, metric_id: str,

379

data: dict) -> T_resp_json:

380

"""

381

Add data points to metric.

382

383

Parameters:

384

- page_id: Page ID

385

- metric_id: Metric ID

386

- data: Data points with timestamps and values

387

388

Returns:

389

dict: Confirmation of data ingestion

390

"""

391

392

def page_create_metric_provider(self, page_id: str,

393

metric_provider: dict) -> T_resp_json:

394

"""

395

Create metric provider for automated data collection.

396

397

Parameters:

398

- page_id: Page ID

399

- metric_provider: Provider configuration (type, settings, etc.)

400

401

Returns:

402

dict: Created metric provider with authentication details

403

"""

404

405

def page_update_metric(self, page_id: str, metric_id: str,

406

metric: dict) -> T_resp_json:

407

"""

408

Update metric configuration.

409

410

Parameters:

411

- page_id: Page ID

412

- metric_id: Metric ID

413

- metric: Metric updates (name, suffix, y_axis_min, etc.)

414

415

Returns:

416

dict: Updated metric configuration

417

"""

418

```

419

420

### Subscriber Management

421

422

Comprehensive subscriber management for notifications, confirmations, and communication preferences.

423

424

```python { .api }

425

def page_get_subscribers(self, page_id: str, search_by: str = None,

426

sort_direction: str = "asc", page: int = 1,

427

per_page: int = 100) -> T_resp_json:

428

"""

429

Get page subscribers.

430

431

Parameters:

432

- page_id: Page ID

433

- search_by: Search term for filtering

434

- sort_direction: Sort order ("asc", "desc")

435

- page: Page number

436

- per_page: Results per page

437

438

Returns:

439

dict: Subscribers with contact information and preferences

440

"""

441

442

def page_create_subscriber(self, page_id: str, subscriber: dict) -> T_resp_json:

443

"""

444

Create subscriber.

445

446

Parameters:

447

- page_id: Page ID

448

- subscriber: Subscriber data (email, sms, components, etc.)

449

450

Returns:

451

dict: Created subscriber with confirmation details

452

"""

453

454

def page_count_subscribers_by_type(self, page_id: str, subscriber_type: str,

455

subscriber_state: str) -> T_resp_json:

456

"""

457

Count subscribers by type and state.

458

459

Parameters:

460

- page_id: Page ID

461

- subscriber_type: Type filter ("email", "sms", "webhook", etc.)

462

- subscriber_state: State filter ("active", "pending", "quarantined")

463

464

Returns:

465

dict: Subscriber counts and statistics

466

"""

467

468

def page_unsubscribe_subscribers(self, page_id: str, subscriber_ids: List[str],

469

subscriber_type: str,

470

skip_unsubscription_notifications: bool = False) -> T_resp_json:

471

"""

472

Bulk unsubscribe subscribers.

473

474

Parameters:

475

- page_id: Page ID

476

- subscriber_ids: List of subscriber IDs

477

- subscriber_type: Subscriber type

478

- skip_unsubscription_notifications: Skip notification emails

479

480

Returns:

481

dict: Unsubscription results

482

"""

483

```

484

485

### Templates and Communication

486

487

Template management for standardized incident communications and status updates.

488

489

```python { .api }

490

def page_create_template(self, page_id: str, template: dict) -> T_resp_json:

491

"""

492

Create incident template.

493

494

Parameters:

495

- page_id: Page ID

496

- template: Template data (name, title, body, etc.)

497

498

Returns:

499

dict: Created template for incident communications

500

"""

501

502

def page_get_templates(self, page_id: str, page: int = 1,

503

per_page: int = 100) -> T_resp_json:

504

"""

505

Get incident templates.

506

507

Parameters:

508

- page_id: Page ID

509

- page: Page number

510

- per_page: Results per page

511

512

Returns:

513

dict: Templates list for reusable incident content

514

"""

515

```

516

517

## Enums and Constants

518

519

```python { .api }

520

from enum import Enum

521

522

class Status(Enum):

523

"""Incident status values"""

524

INVESTIGATING = "investigating"

525

IDENTIFIED = "identified"

526

MONITORING = "monitoring"

527

RESOLVED = "resolved"

528

SCHEDULED = "scheduled"

529

IN_PROGRESS = "in_progress"

530

VERIFYING = "verifying"

531

COMPLETED = "completed"

532

533

class Impact(Enum):

534

"""Incident impact levels"""

535

CRITICAL = "critical"

536

MAJOR = "major"

537

MINOR = "minor"

538

MAINTENANCE = "maintenance"

539

NONE = "none"

540

541

class SubscriberType(Enum):

542

"""Subscriber notification types"""

543

EMAIL = "email"

544

SMS = "sms"

545

WEBHOOK = "webhook"

546

SLACK = "slack"

547

INTEGRATION_PARTNER = "integration_partner"

548

549

class SubscriberState(Enum):

550

"""Subscriber states"""

551

ACTIVE = "active"

552

PENDING = "pending"

553

QUARANTINED = "quarantined"

554

ALL = "all"

555

```

556

557

## Usage Examples

558

559

### Basic StatusPage Operations

560

561

```python

562

from atlassian import StatusPage

563

564

statuspage = StatusPage(

565

url="https://api.statuspage.io",

566

token="your-api-token"

567

)

568

569

# Get all pages

570

pages = statuspage.page_list_pages()

571

572

# Create incident

573

incident_data = {

574

"name": "Database Performance Issues",

575

"status": "investigating",

576

"impact": "major",

577

"component_ids": ["component-123"],

578

"incident_updates": [{

579

"body": "We are investigating reports of slow database queries.",

580

"status": "investigating"

581

}]

582

}

583

incident = statuspage.page_create_incident(page_id, incident_data)

584

585

# Update component status

586

component_update = {

587

"status": "partial_outage"

588

}

589

statuspage.page_update_component(page_id, component_id, component_update)

590

```

591

592

### Subscriber Management

593

594

```python

595

# Add subscriber

596

subscriber_data = {

597

"email": "user@example.com",

598

"component_ids": ["comp-1", "comp-2"],

599

"skip_confirmation": False

600

}

601

subscriber = statuspage.page_create_subscriber(page_id, subscriber_data)

602

603

# Get subscriber statistics

604

email_stats = statuspage.page_count_subscribers_by_type(

605

page_id, "email", "active"

606

)

607

608

# Get all subscribers

609

subscribers = statuspage.page_get_subscribers(

610

page_id,

611

search_by="@company.com",

612

sort_direction="desc"

613

)

614

```

615

616

### Metrics and Monitoring

617

618

```python

619

# Create metric

620

metric_data = {

621

"name": "Response Time",

622

"suffix": "ms",

623

"y_axis_min": 0,

624

"y_axis_max": 1000

625

}

626

metric = statuspage.page_create_metric(page_id, metric_data)

627

628

# Add data points

629

data_points = {

630

"data": [

631

{"timestamp": 1609459200, "value": 250},

632

{"timestamp": 1609462800, "value": 275}

633

]

634

}

635

statuspage.page_add_data_to_metric(page_id, metric_id, data_points)

636

637

# Get uptime data

638

uptime = statuspage.page_get_uptime_component(

639

page_id,

640

component_id,

641

start="2024-01-01",

642

end="2024-01-31"

643

)

644

```

645

646

### Incident Lifecycle

647

648

```python

649

# Create scheduled maintenance

650

maintenance = {

651

"name": "Database Maintenance",

652

"status": "scheduled",

653

"impact": "maintenance",

654

"scheduled_for": "2024-02-15T02:00:00Z",

655

"scheduled_until": "2024-02-15T04:00:00Z",

656

"component_ids": ["database-component"]

657

}

658

scheduled = statuspage.page_create_incident(page_id, maintenance)

659

660

# Update incident with progress

661

update_data = {

662

"incident_updates": [{

663

"body": "Maintenance is proceeding as planned.",

664

"status": "in_progress"

665

}],

666

"status": "in_progress"

667

}

668

statuspage.page_update_incident(page_id, incident_id, update_data)

669

670

# Create postmortem

671

postmortem_data = {

672

"body": "## Root Cause Analysis\n\nThe incident was caused by..."

673

}

674

postmortem = statuspage.page_create_postmortem(page_id, incident_id, postmortem_data)

675

```

676

677

## Types

678

679

```python { .api }

680

from atlassian.typehints import T_resp_json

681

from typing import List, Dict, Optional

682

683

# Common parameter types

684

PageId = str

685

ComponentId = str

686

IncidentId = str

687

MetricId = str

688

SubscriberId = str

689

TemplateId = str

690

```