Skip to content

statuspage

Statuspage API wrapper.

Branding

Bases: Enum

The main template your statuspage will use

Source code in server/vendor/atlassian/statuspage.py
11
12
13
14
15
class Branding(Enum):
    """The main template your statuspage will use"""

    PREMIUM = "premium"
    BASIC = "basic"

Impact

Bases: Enum

The impact of the incident

Source code in server/vendor/atlassian/statuspage.py
78
79
80
81
82
83
84
85
class Impact(Enum):
    """The impact of the incident"""

    CRITICAL = "critical"
    MAJOR = "major"
    MINOR = "minor"
    MAINTENANCE = "maintenance"
    NONE = "none"

MetricProviderType

Bases: Enum

The type of metric provider

Source code in server/vendor/atlassian/statuspage.py
 98
 99
100
101
102
103
104
105
class MetricProviderType(Enum):
    """The type of metric provider"""

    PINGDOM = "Pingdom"
    NEW_RELIC = "NewRelic"
    LIBRATO = "Librato"
    DATADOG = "Datadog"
    SELF = "Self"

SortField

Bases: Enum

The field to sort by

Attributes

PRIMARY : str to indicate sorting by the identifying field CREATED_AT : str for sorting by creation timestamp QUARANTINED_AT : str for sorting by quarantine timestamp RELEVANCE : str which sorts by the relevancy of the search text

Source code in server/vendor/atlassian/statuspage.py
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
class SortField(Enum):
    """The field to sort by

    Attributes
    ----------
    PRIMARY : str
        to indicate sorting by the identifying field
    CREATED_AT : str
        for sorting by creation timestamp
    QUARANTINED_AT : str
        for sorting by quarantine timestamp
    RELEVANCE : str
        which sorts by the relevancy of the search text
    """

    PRIMARY = "primary"
    CREATED_AT = "created_at"
    QUARANTINED_AT = "quarantined_at"
    RELEVANCE = "relevance"

SortOrder

Bases: Enum

The order to sort by

Source code in server/vendor/atlassian/statuspage.py
58
59
60
61
62
class SortOrder(Enum):
    """The order to sort by"""

    ASC = "asc"
    DESC = "desc"

Status

Bases: Enum

The status of the incident

Source code in server/vendor/atlassian/statuspage.py
65
66
67
68
69
70
71
72
73
74
75
class Status(Enum):
    """The status of the incident"""

    INVESTIGATING = "investigating"
    IDENTIFIED = "identified"
    MONITORING = "monitoring"
    RESOLVED = "resolved"
    SCHEDULED = "scheduled"
    IN_PROGRESS = "in_progress"
    VERIFYING = "verifying"
    COMPLETED = "completed"

StatusPage

Bases: AtlassianRestAPI

StatusPage API wrapper.

Source code in server/vendor/atlassian/statuspage.py
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
class StatusPage(AtlassianRestAPI):
    """StatusPage API wrapper."""

    def __init__(self, *args, **kwargs):
        super(StatusPage, self).__init__(*args, **kwargs)

    def page_list_pages(self):
        """
        Get a list of pages

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exception.response.content)` to get API error info


        Notes
        -----
        Available fields: https://developer.statuspage.io/#operation/getPages

        Returns
        -------
        any
        """
        url = "v1/pages"
        return self.get(url)

    def get_page(self, page_id):
        """
        Get page information

        Parameters
        ----------
        page_id : str
            Your page unique ID

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exception.response.content)` to get API error info

        Notes
        -----
        Available fields: https://developer.statuspage.io/#operation/getPagesPageId

        Returns
        -------
        any
        """
        url = "v1/pages/{}".format(page_id)
        return self.get(url)

    def page_update(self, page_id, page):
        """
        Update a page

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page : dict[str,any]
            Your page values that you want to change

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exception.response.content)` to get API error info

        Notes
        -----
        Available fields: https://developer.statuspage.io/#operation/patchPagesPageId

        Description of fields:

        name : str
            The name of your page

        Returns
        -------
        any
        """
        url = "v1/pages/{}".format(page_id)
        return self.patch(url, data={"page": page})

    def organization_get_users(self, organization_id, page=1, per_page=100):
        """
        Get a list of users

        Notes
        -----
        Available fields: https://developer.statuspage.io/#operation/getOrganizationsOrganizationIdUsers

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exception.response.content)` to get API error info

        Parameters
        ----------
        organization_id : str
            Unique organization ID
        page : int
            Page offset to fetch. Defaults to 1.
        per_page : int
            Number of results to return per page. Defaults to 100.
        Returns
        -------
        any
        """
        url = "v1/organizations/{}/users".format(organization_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def organization_get_user_permissions(self, organization_id, user_id):
        """
        Get a user's permissions in organization

        Parameters
        ----------
        organization_id : str
            Unique organization ID
        user_id : str
            Unique user ID

        Notes
        -----
        Available fields: https://developer.statuspage.io/#operation/getOrganizationsOrganizationIdPermissionsUserId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exception.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/organizations/{}/permissions/{}".format(organization_id, user_id)
        return self.get(url)

    def organization_set_user_permissions(self, organization_id, user_id, pages):
        """
        Update a user's role permissions. Payload should contain a mapping of pages to a set of the desired roles,
        if the page has Role Based Access Control. Otherwise, the pages should map to an empty hash.
        User will lose access to any pages omitted from the payload.

        Parameters
        ----------
        organization_id : str
            Unique organization ID
        user_id : str
            Unique user ID
        pages : dict[str, any]
            You can specify "page_configuration", "incident_manager" and "maintenance_manager" booleans here

        Notes
        -----
        Available fields: https://developer.statuspage.io/#operation/putOrganizationsOrganizationIdPermissionsUserId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exception.response.content)` to get API error info

        Examples
        --------
        >>> client = StatusPage(url="https://api.statuspage.io", token="YOUR-TOKEN")
        >>> client.organization_set_user_permissions(
        ...    "ORGANIZATION-ID",
        ...    "USER-ID",
        ...     {
        ...         "PAGE-ID": {
        ...             "page_configuration": True,
        ...             "incident_manager": True,
        ...             "maintenance_manager": True
        ...         }
        ...     }
        ... )

        Returns
        -------
        any
        """
        url = "v1/organizations/{}/permissions/{}".format(organization_id, user_id)
        return self.patch(url, data={"pages": pages})

    def page_get_embed_config_settings(self, page_id):
        """
        Get status embed config settings

        Parameters
        ----------
        page_id : str
            Your page unique ID

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exception.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdStatusEmbedConfig

        Returns
        -------
        any
        """
        url = "v1/pages/{}/status_embed_config".format(page_id)
        return self.get(url)

    def page_update_embed_config_settings(self, page_id, status_embed_config):
        """
        Update status embed config settings

        Parameters
        ----------
        page_id : str
            Your page unique ID
        status_embed_config : dict[str, any]

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Examples
        --------
        >>> client = StatusPage(url="https://api.statuspage.io", token="YOUR-TOKEN")
        >>> client.page_update_embed_config_settings(
        ...    "PAGE-ID",
        ...     {
        ...         "position": "string",
        ...         "incident_background_color": "string",
        ...         "incident_text_color": "string",
        ...         "maintenance_background_color": "string",
        ...         "maintenance_text_color": "string"
        ...     }
        ... )

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/putPagesPageIdStatusEmbedConfig

        Returns
        -------
        any
        """
        url = "v1/pages/{}/status_embed_config".format(page_id)
        return self.patch(url, status_embed_config)

    def page_access_users_list(self, page_id, email, page=1, per_page=100):
        """
        Get a list of page access users

        Parameters
        ----------
        page_id : str
            Your page unique ID
        email : str
            Email address to search for
        page : int
            Page offset to fetch. Defaults to 1.
        per_page : int
            Number of results to return per page. Defaults to 100.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsers

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users".format(page_id)
        return self.get(url, params={"email": email, "page": page, "per_page": per_page})

    def page_get_access_user(self, page_id, page_access_user_id):
        """
        Get page access user

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsersPageAccessUserId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}".format(page_id, page_access_user_id)
        return self.get(url)

    def page_set_access_user(self, page_id, page_access_user_id, external_login, email, page_access_group_ids):
        """
        Update page access user

        Warnings
        --------
        TODO: Fields that can be updated are undocumented as well as their descriptions.

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier
        external_login : str
            IDP login user id. Key is typically "uid".
        email : str
            Email address
        page_access_group_ids : list[str]
            Group IDs

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdPageAccessUsersPageAccessUserId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}".format(page_id, page_access_user_id)
        return self.patch(
            url, data={"external_login": external_login, "email": email, "page_access_group_ids": page_access_group_ids}
        )

    def page_delete_access_user(self, page_id, page_access_user_id):
        """
        Delete page access user

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier

        Notes
        -----
        See available fields:
        https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}".format(page_id, page_access_user_id)
        return self.delete(url)

    def page_get_components_access_user(self, page_id, page_access_user_id, page=1, per_page=100):
        """
        Get components for page access user

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier
        page : int
            Page offset to fetch. Defaults to 1.
        per_page : int
            Number of results to return per page. Defaults to 100.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsersPageAccessUserIdComponents
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}/components".format(page_id, page_access_user_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def page_add_components_access_user(self, page_id, page_access_user_id, component_ids):
        """
        Add components for page access user

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier
        component_ids : list[str]
            List of component codes to allow access to

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/putPagesPageIdPageAccessUsersPageAccessUserIdComponents
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}/components".format(page_id, page_access_user_id)
        return self.patch(url, data={"component_ids": component_ids})

    def page_replace_components_access_user(self, page_id, page_access_user_id, component_ids):
        """
        Replace components for page access user

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier
        component_ids : list[str]
            List of component codes to allow access to

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessUsersPageAccessUserIdComponents
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}/components".format(page_id, page_access_user_id)
        return self.post(url, data={"component_ids": component_ids})

    def page_delete_components_access_user(self, page_id, page_access_user_id, component_ids):
        """
        Delete components for page access user.

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier
        component_ids : list[str]
            List of components codes to remove. **If omitted, all components will be removed.**

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdComponents
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}/components".format(page_id, page_access_user_id)
        return self.delete(url, data={"component_ids": component_ids})

    def page_delete_component_access_user(self, page_id, page_access_user_id, component_id):
        """
        Delete components for page access user.

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier
        component_id : str
            Component identifier

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdComponentsComponentId
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}/components/{}".format(page_id, page_access_user_id, component_id)
        return self.delete(url)

    def page_get_metrics_access_user(self, page_id, page_access_user_id):
        """
        Get metrics for page access user

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsersPageAccessUserIdMetrics
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}/metrics".format(page_id, page_access_user_id)
        return self.get(url)

    def page_add_metrics_access_user(self, page_id, page_access_user_id, metric_ids):
        """
        Add metrics for page access user

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier
        metric_ids : list[str]
            List of metrics to add

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/putPagesPageIdPageAccessUsersPageAccessUserIdMetrics
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}/metrics".format(page_id, page_access_user_id)
        return self.patch(url, data={"metric_ids": metric_ids})

    def page_replace_metrics_access_user(self, page_id, page_access_user_id, metric_ids):
        """
        Replace metrics for page access user

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier
        metric_ids : list[str]
            List of metrics to replace

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessUsersPageAccessUserIdMetrics
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}/metrics".format(page_id, page_access_user_id)
        return self.post(url, data={"metric_ids": metric_ids})

    def page_delete_metrics_access_user(self, page_id, page_access_user_id, metric_ids):
        """
        Delete metrics for page access user

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier
        metric_ids : list[str]
            List of metrics to remove

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdMetrics
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}/metrics".format(page_id, page_access_user_id)
        return self.delete(url, data={"metric_ids": metric_ids})

    def page_delete_metric_access_user(self, page_id, page_access_user_id, metric_id):
        """
        Delete metric for page access user

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_user_id : str
            Page Access User Identifier
        metric_id : str
            Identifier of metric requested

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdMetricsMetricId
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_users/{}/metrics/{}".format(page_id, page_access_user_id, metric_id)
        return self.delete(url)

    def page_get_access_groups(self, page_id, page=1, per_page=100):
        """
        Get a list of page access groups

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page : int
            Page offset to fetch. Defaults to 1.
        per_page : int
            Number of results to return per page. Defaults to 100.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessGroups

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_groups".format(page_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def page_get_access_group(self, page_id, page_access_group_id):
        """
        Get a page access group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_group_id : str
            Page Access Group Identifier

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessGroupsPageAccessGroupId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_groups/{}".format(page_id, page_access_group_id)
        return self.get(url)

    def page_create_access_group(
        self, page_id, name, external_identifier, component_ids, metric_ids, page_access_user_ids
    ):
        """
        Create a page access group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        name : str
            Name for this Group
        external_identifier : str
            Associates group with external group
        component_ids : list[str]
        metric_ids : list[str]
        page_access_user_ids : list[str]

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessGroups

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_groups".format(page_id)
        return self.post(
            url,
            data={
                "page_access_group": {
                    "name": name,
                    "external_identifier": external_identifier,
                    "component_ids": component_ids,
                    "metric_ids": metric_ids,
                    "page_access_user_ids": page_access_user_ids,
                }
            },
        )

    def page_replace_access_group(
        self, page_id, page_access_group_id, name, external_identifier, component_ids, metric_ids, page_access_user_ids
    ):
        """
        Update a page access group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_group_id : str
            Page Access Group Identifier
        name : str
            Name for this Group
        external_identifier : str
            Associates group with external group
        component_ids : list[str]
        metric_ids : list[str]
        page_access_user_ids : list[str]

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/putPagesPageIdPageAccessGroupsPageAccessGroupId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_groups/{}".format(page_id, page_access_group_id)
        return self.patch(
            url,
            data={
                "page_access_group": {
                    "name": name,
                    "external_identifier": external_identifier,
                    "component_ids": component_ids,
                    "metric_ids": metric_ids,
                    "page_access_user_ids": page_access_user_ids,
                }
            },
        )

    def page_delete_access_group(self, page_id, page_access_group_id):
        """
        Remove a page access group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_group_id : str
            Page Access Group Identifier

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessGroupsPageAccessGroupId
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_groups/{}".format(page_id, page_access_group_id)
        return self.delete(url)

    def page_add_components_to_access_group(self, page_id, page_access_group_id, component_ids):
        """
        Add components to page access group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_group_id : str
            Page Access Group Identifier
        component_ids : list[str]
            List of Component identifiers

        Notes
        -----
        See available fields: https://developer.statuspage.io/#tag/page-access-group-components

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_groups/{}/components".format(page_id, page_access_group_id)
        return self.patch(url, data={"component_ids": component_ids})

    def page_replace_components_for_access_page(self, page_id, page_access_group_id, component_ids):
        """
        Replace components for a page access group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_group_id : str
            Page Access Group Identifier
        component_ids : list[str]
            List of components codes to set on the page access group

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessGroupsPageAccessGroupIdComponents
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_groups/{}/components".format(page_id, page_access_group_id)
        return self.post(url, data={"component_ids": component_ids})

    def page_delete_components_for_access_page(self, page_id, page_access_group_id, component_ids):
        """
        Delete components for a page access group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_group_id : str
            Page Access Group Identifier
        component_ids : list[str]
            List of Component identifiers

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessGroupsPageAccessGroupIdComponents
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_groups/{}/components".format(page_id, page_access_group_id)
        return self.delete(url, data={"component_ids": component_ids})

    def page_delete_component_for_access_page(self, page_id, page_access_group_id, component_id):
        """
        Remove a component from a page access group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_group_id : str
            Page Access Group Identifier
        component_id : str
            Component identifier

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessGroupsPageAccessGroupIdComponentsComponentId
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_groups/{}/components/{}".format(page_id, page_access_group_id, component_id)
        return self.delete(url)

    def page_get_components_for_access_group(self, page_id, page_access_group_id, page=1, per_page=100):
        """
        Add components to page access group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page_access_group_id : str
            Page Access Group Identifier
        page : int
            Page offset to fetch. Defaults to 1.
        per_page : int
            Number of results to return per page. Defaults to 100.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessGroupsPageAccessGroupIdComponents
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/page_access_groups/{}/components".format(page_id, page_access_group_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def page_get_subscriber(self, page_id, subscriber_id):
        """
        Get a subscriber

        Parameters
        ----------
        page_id : str
            Your page unique ID
        subscriber_id : str
            Subscriber identifier

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersSubscriberId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers/{}".format(page_id, subscriber_id)
        return self.get(url)

    def page_get_subscribers(self, page_id, search_by=None, sort_direction="asc", page=1, per_page=100):
        """
        Get all subscribers

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page : int
            Page offset to fetch. Defaults to 1.
        per_page : int
            Number of results to return per page. Defaults to 100.
        search_by : dict[str, any]
            What to search by.

            "q" : str
            If this is specified, search the contact information (email, endpoint, or phone number)
            for the provided value. This parameter doesn't support searching for Slack subscribers.

            "subscriber_type" : SubscriberType
            If this is specified, only return subscribers of the specified type.

            "subscriber_state" : SubscriberState
            If this is specified, only return subscribers of the specified state.
            Specify state "all" to find subscribers in any states.

            "sort_field" : SortField
            The field on which to sort the results.

        sort_direction : SortOrder
            The direction in which to sort the results.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribers

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers".format(page_id)

        params = {}

        if search_by:
            if "q" in search_by:
                params["q"] = search_by["q"]
            if "subscriber_type" in search_by:
                params["type"] = search_by["subscriber_type"]
            if "subscriber_state" in search_by:
                params["state"] = search_by["subscriber_state"]
            if "sort_field" in search_by:
                params["sort_field"] = search_by["sort_field"]

        params["sort_direction"] = sort_direction
        params["page"] = page
        params["per_page"] = per_page

        return self.get(url, params=params)

    def page_update_subscriber(self, page_id, subscriber_id, component_ids):
        """
        Update a subscriber

        Parameters
        ----------
        page_id : str
            Your page unique ID
        subscriber_id : str
            Subscriber identifier
        component_ids : list[str]
            A list of component ids for which the subscriber should receive updates for.
            Components must be an array with at least one element if it is passed at all.
            Each component must belong to the page indicated in the path.
            To set the subscriber to be subscribed to all components on the page, exclude this parameter.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdSubscribersSubscriberId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers/{}".format(page_id, subscriber_id)
        return self.patch(url, data={"component_ids": component_ids})

    def page_unsubscribe_subscriber(self, page_id, subscriber_id, skip_unsubscription_notifications=False):
        """
        Unsubscribe a subscriber

        Parameters
        ----------
        page_id : str
            Your page unique ID
        subscriber_id : str
            Subscriber identifier
        skip_unsubscription_notifications : bool
            If true, the subscriber will not receive an email notification when they are unsubscribed.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdSubscribersSubscriberId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers/{}".format(page_id, subscriber_id)
        return self.delete(url, params={"skip_unsubscription_notifications": skip_unsubscription_notifications})

    def page_resend_confirmation_subscribers(self, page_id, subscriber_id):
        """
        Resend confirmation email to a subscriber

        Parameters
        ----------
        page_id : str
            Your page unique ID
        subscriber_id : str
            Subscriber identifier

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersSubscriberIdResendConfirmation
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers/{}/resend_confirmation".format(page_id, subscriber_id)
        return self.post(url)

    def page_create_subscriber(self, page_id, subscriber):
        """
        Create a subscriber

        Parameters
        ----------
        page_id : str
            Your page unique ID
        subscriber : dict[str, any]
            Subscriber object. You can specify email, endpoint, phone_country, phone_number,
            skip_confirmation_notification, page_access_user and component_ids. Check notes for all available fields.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribers

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers".format(page_id)
        return self.post(url, data={"subscriber": subscriber})

    def page_get_list_unsubscribed(self, page_id, page=1, per_page=100):
        """
        Get a list of unsubscribed subscribers

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page : int
            Page offset to fetch. Defaults to 1.
        per_page : int
            Number of results to return per page. Defaults to 100.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersUnsubscribed

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/unsubscribed".format(page_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def page_count_subscribers_by_type(self, page_id, subscriber_type, subscriber_state):
        """
        Count subscribers by type

        Parameters
        ----------
        page_id : str
            Your page unique ID
        subscriber_type : SubscriberType
            If this is specified, only return subscribers of the specified type.
        subscriber_state : SubscriberState
            If this is specified, only return subscribers of the specified state.
            Specify state "all" to find subscribers in any states.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersCount

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers/count".format(page_id)
        return self.get(url, params={"type": subscriber_type, "state": subscriber_state})

    def page_get_histogram_of_subscribers_with_state(self, page_id):
        """
        Get a histogram of subscribers with state

        Parameters
        ----------
        page_id : str
            Your page unique ID

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersHistogramByState

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers/histogram".format(page_id)
        return self.get(url)

    def page_reactivate_subscribers(self, page_id, subscriber_ids, subscriber_type):
        """
        Reactivate a list of quarantined subscribers

        Parameters
        ----------
        page_id : str
            Your page unique ID
        subscriber_ids : list[str]
            A list of subscriber ids to reactivate.
        subscriber_type : SubscriberType
            If this is present, only reactivate subscribers of this type.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersReactivate

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers/reactivate".format(page_id)
        return self.post(url, data={"subscribers": subscriber_ids, "type": subscriber_type})

    def page_unsubscribe_subscribers(
        self, page_id, subscriber_ids, subscriber_type, skip_unsubscription_notification=False
    ):
        """
        Unsubscribe a list of subscribers

        Parameters
        ----------
        page_id : str
            Your page unique ID
        subscriber_ids : str | list[str]
            The array of subscriber codes to unsubscribe (limited to 100),
            or "all" to unsubscribe all subscribers if the number of subscribers is less than 100.
        subscriber_type : SubscriberType
            If this is present, only unsubscribe subscribers of this type.
        skip_unsubscription_notification : bool
            If this is true, do not send an unsubscription notification to the subscriber.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersUnsubscribe

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers/unsubscribe".format(page_id)
        return self.post(
            url,
            data={
                "subscribers": subscriber_ids,
                "type": subscriber_type,
                "skip_unsubscription_notification": skip_unsubscription_notification,
            },
        )

    def page_resend_confirmations_to_subscribers(self, page_id, subscriber_ids):
        """
        Resend confirmation emails to a list of subscribers

        Parameters
        ----------
        page_id : str
            Your page unique ID
        subscriber_ids : str | list[str]
            The array of subscriber codes to resend confirmations for,
            or "all" to resend confirmations to all subscribers.
            Only unconfirmed email subscribers will receive this notification.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersResendConfirmation

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/subscribers/resend_confirmation".format(page_id)
        return self.post(url, data={"subscribers": subscriber_ids})

    def page_create_template(self, page_id, template):
        """
        Create a template. "name", "title" and "body" is required in the template.

        Parameters
        ----------
        page_id : str
            Your page unique ID
        template : dict[str, any]
            The template to create

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdIncidentTemplates


        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incident_templates".format(page_id)
        return self.post(url, data={"template": template})

    def page_get_templates(self, page_id, page=1, per_page=100):
        """
        Get a list of templates

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page : int
            The page offset to return. Defaults to 1.
        per_page : int
            The number of templates to return per page. Defaults to 100.
            If this is set to 0, a default and maximum limit of 100
            will be imposed and this endpoint will return paginated data
            even if this query parameter is not provided.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentTemplates

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incident_templates".format(page_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def page_create_incident(self, page_id, incident):
        """
        Create an incident. "name" is required in the incident.

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident : dict[str, any]
            The incident to create

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdIncidents

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents".format(page_id)
        return self.post(url, data={"incident": incident})

    def page_list_incidents(self, page_id, q, page=1, per_page=100):
        """
        Get a list of incidents

        Parameters
        ----------
        page_id : str
            Your page unique ID
        q : str
            The search query to filter incidents by. If this is specified, search for the text query string in
            the incident's name, status, postmortem_body, and incident_updates fields.
        page : int
            The page offset to return. Defaults to 1.
        per_page : int
            The number of incidents to return per page. Defaults to 100.
            If this is set to 0, a default and maximum limit of 100
            will be imposed and this endpoint will return paginated data
            even if this query parameter is not provided.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidents

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents".format(page_id)
        return self.get(url, params={"q": q, "page": page, "per_page": per_page})

    def page_list_active_maintenances(self, page_id, page=1, per_page=100):
        """
        Get a list of active maintenances

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page : int
            The page offset to return. Defaults to 1.
        per_page : int
            The number of maintenances to return per page. Defaults to 100.
            If this is set to 0, a default and maximum limit of 100
            will be imposed and this endpoint will return paginated data
            even if this query parameter is not provided.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsActiveMaintenance

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/active_maintenance".format(page_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def page_list_upcoming_incidents(self, page_id, page=1, per_page=100):
        """
        Get a list of upcoming incidents

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page : int
            The page offset to return. Defaults to 1.
        per_page : int
            The number of incidents to return per page. Defaults to 100.
            If this is set to 0, a default and maximum limit of 100
            will be imposed and this endpoint will return paginated data
            even if this query parameter is not provided.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsUpcoming

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/upcoming".format(page_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def page_list_scheduled_incidents(self, page_id, page=1, per_page=100):
        """
        Get a list of scheduled incidents

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page : int
            The page offset to return. Defaults to 1.
        per_page : int
            The number of incidents to return per page. Defaults to 100.
            If this is set to 0, a default and maximum limit of 100
            will be imposed and this endpoint will return paginated data
            even if this query parameter is not provided.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsScheduled

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/scheduled".format(page_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def page_list_unresolved_incidents(self, page_id, page=1, per_page=100):
        """
        Get a list of unresolved incidents

        Parameters
        ----------
        page_id : str
            Your page unique ID
        page : int
            The page offset to return. Defaults to 1.
        per_page : int
            The number of incidents to return per page. Defaults to 100.
            If this is set to 0, a default and maximum limit of 100
            will be imposed and this endpoint will return paginated data
            even if this query parameter is not provided.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsUnresolved

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/unresolved".format(page_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def page_delete_incident(self, page_id, incident_id):
        """
        Delete an incident

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}".format(page_id, incident_id)
        return self.delete(url)

    def page_update_incident(self, page_id, incident_id, incident):
        """
        Update an incident

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID
        incident : dict[str, any]
            The incident data to update

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdIncidentsIncidentId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}".format(page_id, incident_id)
        return self.patch(url, data={"incident": incident})

    def page_get_incident(self, page_id, incident_id):
        """
        Get an incident

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentId

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}".format(page_id, incident_id)
        return self.get(url)

    def page_update_incident_updates(self, page_id, incident_id, incident_update_id, incident_update):
        """
        Update a previous incident update

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID
        incident_update_id : str
            The incident update unique ID
        incident_update : dict[str, any]
            The incident update data to update

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdIncidentsIncidentIdIncidentUpdatesIncidentUpdateId
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/incidents_update/{}".format(page_id, incident_id, incident_update_id)
        return self.patch(url, data={"incident_update": incident_update})

    def page_create_incident_subscriber(self, page_id, incident_id, subscriber):
        """
        Create a subscriber for an incident

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID
        subscriber : dict[str, any]
            The subscriber data to create

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdIncidentsIncidentIdSubscribers

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/subscribers".format(page_id, incident_id)
        return self.post(url, data={"subscriber": subscriber})

    def page_list_incident_subscribers(self, page_id, incident_id, page=1, per_page=100):
        """
        Get a list of subscribers for an incident

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID
        page : int
            The page offset to return. Defaults to 1.
        per_page : int
            The number of subscribers to return per page. Defaults to 100.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentIdSubscribers

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/subscribers".format(page_id, incident_id)
        return self.get(url, params={"page": page, "per_page": per_page})

    def page_unsubscribe_incident_subscriber(self, page_id, incident_id, subscriber_id):
        """
        Unsubscribe a subscriber from an incident

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID
        subscriber_id : str
            The subscriber unique ID

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/subscribers/{}".format(page_id, incident_id, subscriber_id)
        return self.delete(url)

    def page_get_incident_subscriber(self, page_id, incident_id, subscriber_id):
        """
        Get a subscriber for an incident

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID
        subscriber_id : str
            The subscriber unique ID

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentIdSubscribersSubscriberId
        # noqa: E501

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/subscribers/{}".format(page_id, incident_id, subscriber_id)
        return self.get(url)

    def page_resend_confirmation_incident_subscriber(self, page_id, incident_id, subscriber_id):
        """
        Resend the confirmation email for a subscriber

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID
        subscriber_id : str
            The subscriber unique ID

        Warnings
        --------
        Only returns 201 code

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/subscribers/{}/resend_confirmation".format(page_id, incident_id, subscriber_id)
        return self.post(url)

    def page_get_postmortem(self, page_id, incident_id):
        """
        Get a postmortem

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentIdPostmortem

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/postmortem".format(page_id, incident_id)
        return self.get(url)

    def page_create_postmortem(self, page_id, incident_id, postmortem):
        """
        Create a postmortem

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID
        postmortem : str
            Body of Postmortem to create.

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/putPagesPageIdIncidentsIncidentIdPostmortem

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/postmortem".format(page_id, incident_id)
        return self.post(url, data={"postmortem": {"body_draft": postmortem}})

    def page_delete_postmortem(self, page_id, incident_id):
        """
        Delete a postmortem

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdIncidentsIncidentIdPostmortem

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/postmortem".format(page_id, incident_id)
        return self.delete(url)

    def page_publish_postmortem(self, page_id, incident_id, postmortem):
        """
        Publish a postmortem

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID
        postmortem : dict[str, any]
            Body of Postmortem to publish
            Available fields: "notify_twitter", "notify_subscribers", and "custom_tweet"

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/putPagesPageIdIncidentsIncidentIdPostmortemPublish
        # noqa: E501

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/postmortem/publish".format(page_id, incident_id)
        return self.post(url, data={"postmortem": postmortem})

    def page_revert_postmortem(self, page_id, incident_id):
        """
        Revert a postmortem

        Parameters
        ----------
        page_id : str
            Your page unique ID
        incident_id : str
            The incident unique ID

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/putPagesPageIdIncidentsIncidentIdPostmortemRevert
        # noqa: E501

        Returns
        -------
        any
        """
        url = "v1/pages/{}/incidents/{}/postmortem/revert".format(page_id, incident_id)
        return self.post(url)

    def page_create_component(self, page_id, component):
        """
        Create a component

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component : dict[str, any]
            The component to create
            Available fields: "name", "description", "status", "group_id", "showcase", "only_show_if_degraded",
            and "start_date"

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponents

        Returns
        -------
        any
        """
        url = "v1/pages/{}/components".format(page_id)
        return self.post(url, data={"component": component})

    def page_get_components(self, page_id, per_page=100, page=1):
        """
        Get all components

        Parameters
        ----------
        page_id : str
            Your page unique ID
        per_page : int
            Number of components to return per page (default is 100)
        page : int
            Page number to return (default is 1)

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponents

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/components".format(page_id)
        return self.get(url, params={"per_page": per_page, "page": page})

    def page_update_component(self, page_id, component_id, component):
        """
        Update a component

        Warnings
        --------
        If "group_id" is Null then the component will be removed from a group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_id : str
            The component unique ID
        component : dict[str, any]
            The component to update
            Available fields: "name", "description", "status", "group_id", "showcase", "only_show_if_degraded",
            and "start_date"

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdComponentsComponentId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/components/{}".format(page_id, component_id)
        return self.patch(url, data={"component": component})

    def page_delete_component(self, page_id, component_id):
        """
        Delete a component

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_id : str
            The component unique ID

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentsComponentId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/components/{}".format(page_id, component_id)
        return self.delete(url)

    def page_get_component(self, page_id, component_id):
        """
        Get a component

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_id : str
            The component unique ID

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentsComponentId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/components/{}".format(page_id, component_id)
        return self.get(url)

    def page_get_uptime_component(self, page_id, component_id, start=None, end=None):
        """
        Get a component's uptime

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_id : str
            The component unique ID
        start : str
            The start date for uptime calculation
            (defaults to the component's start_date field or 90 days ago, whichever is more recent).
            The maximum supported date range is six calendar months.
            If the year is given, the date defaults to the first day of the year.
            If the year and month are given, the start date defaults to the first day of that month.
            The earliest supported date is January 1, 1970.
        end : str
            The end date for uptime calculation (defaults to today in the page's time zone).
            The maximum supported date range is six calendar months.
            If the year is given, the date defaults to the last day of the year.
            If the year and month are given, the date defaults to the last day of that month.
            The earliest supported date is January 1, 1970.

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentsComponentIdUptime

        Returns
        -------
        any
        """
        url = "v1/pages/{}/components/{}/uptime".format(page_id, component_id)

        params = {}
        if start is not None:
            params["start"] = start
        if end is not None:
            params["end"] = end

        return self.get(url, params=params)

    def page_remove_access_users_from_component(self, page_id, component_id):
        """
        Remove access users from a component

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_id : str
            The component unique ID

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentsComponentIdPageAccessUsers
        # noqa: E501

        Returns
        -------
        any
        """
        url = "v1/pages/{}/components/{}/page_access_users".format(page_id, component_id)
        return self.delete(url)

    def page_add_access_users_to_component(self, page_id, component_id, page_access_user_ids):
        """
        Add access users to a component

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_id : str
            The component unique ID
        page_access_user_ids : list[str]
            The users to add

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponentsComponentIdPageAccessUsers
        # noqa: E501

        Returns
        -------
        any
        """
        url = "v1/pages/{}/components/{}/page_access_users".format(page_id, component_id)
        return self.post(url, data={"page_access_user_ids": page_access_user_ids})

    def page_remove_access_users_from_group(self, page_id, component_id):
        """
        Remove access users from a group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_id : str
            The component unique ID

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentsComponentIdPageAccessGroups
        # noqa: E501

        Returns
        -------
        any
        """
        url = "v1/pages/{}/components/{}/page_access_groups".format(page_id, component_id)
        return self.delete(url)

    def page_add_access_users_to_group(self, page_id, component_id, page_access_group_ids):
        """
        Add page access groups to a component

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_id : str
            The component unique ID
        page_access_group_ids : list[str]
            The groups to add

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponentsComponentIdPageAccessGroups
        # noqa: E501

        Returns
        -------
        any
        """
        url = "v1/pages/{}/components/{}/page_access_groups".format(page_id, component_id)
        return self.post(url, data={"page_access_group_ids": page_access_group_ids})

    def page_create_component_group(self, page_id, description, components_group):
        """
        Create a component group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        description : str
            The description of the component group
        components_group : dick[str, any]
            The components to add to the group
            Available fields: "components" (array of strings), "name"

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponentGroups

        Returns
        -------
        any
        """
        url = "v1/pages/{}/component_groups".format(page_id)
        return self.post(url, data={"description": description, "components_group": components_group})

    def page_get_list_of_component_groups(self, page_id, per_page=100, page=1):
        """
        Get a list of component groups

        Parameters
        ----------
        page_id : str
            Your page unique ID
        per_page : int
            The number of results to return per page (defaults to 100)
        page : int
            The page to return (defaults to 1)

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentGroups

        Returns
        -------
        any
        """
        url = "v1/pages/{}/component_groups".format(page_id)
        return self.get(url, params={"per_page": per_page, "page": page})

    def page_update_component_group(self, page_id, component_group_id, description, component_group):
        """
        Update a component group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_group_id : str
            Component group identifier
        description : str
            The description of the component group
        component_group : dict[str, any]
            The components to update
            Available fields: "name", "components" (array of strings)

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdComponentGroupsId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/component_groups/{}".format(page_id, component_group_id)
        return self.patch(url, data={"description": description, "component_group": component_group})

    def page_delete_component_group(self, page_id, component_group_id):
        """
        Delete a component group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_group_id : str
            Component group identifier

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentGroupsId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/component_groups/{}".format(page_id, component_group_id)
        return self.delete(url)

    def page_get_component_group(self, page_id, component_group_id):
        """
        Get a component group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_group_id : str
            Component group identifier

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentGroupsId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/component_groups/{}".format(page_id, component_group_id)
        return self.get(url)

    def page_get_uptime_for_component_group(self, page_id, component_group_id, start=None, end=None):
        """
        Get uptime for a component group

        Parameters
        ----------
        page_id : str
            Your page unique ID
        component_group_id : str
            Component group identifier
        start : str
            The start date for uptime calculation
            (defaults to the date of the component in the group with the earliest start_date,
            or 90 days ago, whichever is more recent).
            The maximum supported date range is six calendar months.
            If the year is given, the date defaults to the first day of the year.
            If the year and month are given, the start date defaults to the first day of that month.
            The earliest supported date is January 1, 1970.
        end : str
            The end date for uptime calculation (defaults to today in the page's time zone).
            The maximum supported date range is six calendar months.
            If the year is given, the date defaults to the last day of the year.
            If the year and month are given, the date defaults to the last day of that month.
            The earliest supported date is January 1, 1970.

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentGroupsIdUptime

        Returns
        -------
        any
        """
        url = "v1/pages/{}/component_groups/{}/uptime".format(page_id, component_group_id)

        params = {}
        if start is not None:
            params["start"] = start
        if end is not None:
            params["end"] = end

        return self.get(url, params=params)

    def page_add_data_points_to_metric(self, page_id, data):
        """
        Add data points to a metric

        Parameters
        ----------
        page_id : str
            Your page unique ID
        data : dict[str, any]
            The data points to add
            Requires "metric_id", which specifies identifier to add data to
            In "metric_id" you should have array of "timestamp" and "value"

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsData

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics/data".format(page_id)
        return self.post(url, data={"data": data})

    def page_get_list_of_metrics(self, page_id, per_page=100, page=1):
        """
        Get a list of metrics

        Parameters
        ----------
        page_id : str
            Your page unique ID
        per_page : int
            The number of results to return per page (defaults to 100)
        page : int
            The page to return (defaults to 1)

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetrics

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics".format(page_id)
        return self.get(url, params={"per_page": per_page, "page": page})

    def page_update_metric(self, page_id, metric_id, metric):
        """
        Update a metric

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_id : str
            Metric identifier
        metric : dict[str, any]
            The metric to update

            Available fields in metric: "name", "metric_identifier"
            "name" - Name of metric,
            "metric_identifier" - Metric Display identifier used to look up the metric data from the provider

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdMetricsMetricId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics/{}".format(page_id, metric_id)
        return self.patch(url, data={"metric": metric})

    def page_update_metric_data(self, page_id, metric_id, metric):
        """
        Update metric data

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_id : str
            Metric identifier
        metric : dict[str, any]
            The metric to update

            Available fields in metric: "name", "metric_identifier"
            "name" - Name of metric,
            "metric_identifier" - Metric Display identifier used to look up the metric data from the provider

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdMetricsMetricId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics/{}".format(page_id, metric_id)
        return self.patch(url, data={"metric": metric})

    def page_delete_metric(self, page_id, metric_id):
        """
        Delete a metric

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_id : str
            Metric identifier

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdMetricsMetricId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics/{}".format(page_id, metric_id)
        return self.delete(url)

    def page_get_metric(self, page_id, metric_id):
        """
        Get a metric

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_id : str
            Metric identifier

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsMetricId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics/{}".format(page_id, metric_id)
        return self.get(url)

    def page_reset_data_for_metric(self, page_id, metric_id):
        """
        Reset data for a metric

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_id : str
            Metric identifier

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdMetricsMetricIdData

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics/{}/data".format(page_id, metric_id)
        return self.delete(url)

    def page_add_data_to_metric(self, page_id, metric_id, data):
        """
        Add data to a metric

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_id : str
            Metric identifier
        data : dict[str, any]
            The data to add

            Requires "timestamp" and "value"

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsMetricIdData

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics/{}/data".format(page_id, metric_id)
        return self.post(url, data={"data": data})

    def page_list_metric_for_metric_provider(self, page_id, metric_provider_id, per_page=100, page=1):
        """
        List metrics for a metric provider

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_provider_id : str
            Metric provider identifier
        per_page : int
            The number of results to return per page (defaults to 100)
        page : int
            The page to return (defaults to 1)

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProvidersMetricsProviderIdMetrics
        # noqa: E501

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics_providers/{}/metrics".format(page_id, metric_provider_id)
        return self.get(url, params={"per_page": per_page, "page": page})

    def page_create_metric_for_metric_provider(self, page_id, metric_provider_id, metric):
        """
        Create a metric for a metric provider

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_provider_id : str
            Metric provider identifier
        metric : dict[str, any]
            The metric to create

            Available fields in metric: "name", "metric_identifier", "transform", "suffix",
            "y_axis_min", "y_axis_max", "y_axis_hidden", "display",
            "decimal_places", "tooltip_description"

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsProvidersMetricsProviderIdMetrics
        # noqa: E501

        Descriptions of the fields that can be added to the metric:
            "name" - Name of metric,

            "metric_identifier" - The identifier used to look up the metric data from the provider

            "transform" - The transform to apply to metric before pulling into Statuspage.
            See transform enum for available values

            "suffix" - Suffix to describe the units on the graph

            "y_axis_min" - Minimum value for the y-axis

            "y_axis_max" - Maximum value for the y-axis

            "y_axis_hidden" - Should the values on the y-axis be hidden on render

            "display" - Should the metric be displayed on the status page

            "decimal_places" - How many decimal places to render on the graph

            "tooltip_description" - Description to show on the tooltip

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics_providers/{}/metrics".format(page_id, metric_provider_id)
        return self.post(url, data={"metric": metric})

    def page_list_metric_providers(self, page_id):
        """
        Get a list of metric providers

        Parameters
        ----------
        page_id : str
            Your page unique ID
        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProviders

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics_providers".format(page_id)
        return self.get(url)

    def page_create_metric_provider(self, page_id, metric_provider):
        """
        Create a metric provider

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_provider : dict[str, any]
            The metric provider to create

            Available fields in metric_provider: "email", "password", "api_key", "api_token",
            "application_key", "type", "metric_base_uri"

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsProviders

        Descriptions of the fields that can be added to the metric_provider:
            "email" - Required by the Librato metrics provider

            "password" - Just a password!

            "api_key" - Required by the Datadog and NewRelic type metrics providers

            "api_token" - Required by the Librato, Datadog and Pingdom type metrics providers

            "application_key" - Required by the Pingdom-type metrics provider

            "type" - The type of metrics provider. See MetricProviderType enum for available values

            "metric_base_uri" - The base URI for the metrics provider.
            Required by the Datadog and NewRelic type metrics providers.


        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics_providers".format(page_id)
        return self.post(url, data={"metric_provider": metric_provider})

    def page_get_metric_provider(self, page_id, metric_provider_id):
        """
        Get a metric provider

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_provider_id : str
            Metric provider identifier

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProvidersMetricsProviderId

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics_providers/{}".format(page_id, metric_provider_id)
        return self.get(url)

    def page_update_metric_provider(self, page_id, metric_provider_id, metric_provider):
        """
        Update a metric provider

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_provider_id : str
            Metric provider identifier
        metric_provider : dict[str, any]
            Metric provider to update


        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Notes
        -----
        See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProvidersMetricsProviderId

        Available fields in metric_provider: "type", "metric_base_uri"

        Descriptions of the fields that can be added to the metric_provider:
            "type" - The type of metrics provider. See MetricProviderType enum for available values

            "metric_base_uri" - The base URI for the metrics provider.
            Required by the Datadog and NewRelic type metrics providers.

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics_providers/{}".format(page_id, metric_provider_id)
        return self.patch(url, data={"metric_provider": metric_provider})

    def page_delete_metric_provider(self, page_id, metric_provider_id):
        """
        Delete a metric provider

        Parameters
        ----------
        page_id : str
            Your page unique ID
        metric_provider_id : str
            Metric provider identifier

        Raises
        ------
        requests.exceptions.HTTPError
            Use `json.loads(exceptions.response.content)` to get API error info

        Returns
        -------
        any
        """
        url = "v1/pages/{}/metrics_providers/{}".format(page_id, metric_provider_id)
        return self.delete(url)

get_page(page_id)

Get page information

Parameters

page_id : str Your page unique ID

Raises

requests.exceptions.HTTPError Use json.loads(exception.response.content) to get API error info

Notes

Available fields: https://developer.statuspage.io/#operation/getPagesPageId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
def get_page(self, page_id):
    """
    Get page information

    Parameters
    ----------
    page_id : str
        Your page unique ID

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exception.response.content)` to get API error info

    Notes
    -----
    Available fields: https://developer.statuspage.io/#operation/getPagesPageId

    Returns
    -------
    any
    """
    url = "v1/pages/{}".format(page_id)
    return self.get(url)

organization_get_user_permissions(organization_id, user_id)

Get a user's permissions in organization

Parameters

organization_id : str Unique organization ID user_id : str Unique user ID

Notes

Available fields: https://developer.statuspage.io/#operation/getOrganizationsOrganizationIdPermissionsUserId

Raises

requests.exceptions.HTTPError Use json.loads(exception.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
def organization_get_user_permissions(self, organization_id, user_id):
    """
    Get a user's permissions in organization

    Parameters
    ----------
    organization_id : str
        Unique organization ID
    user_id : str
        Unique user ID

    Notes
    -----
    Available fields: https://developer.statuspage.io/#operation/getOrganizationsOrganizationIdPermissionsUserId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exception.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/organizations/{}/permissions/{}".format(organization_id, user_id)
    return self.get(url)

organization_get_users(organization_id, page=1, per_page=100)

Get a list of users

Notes

Available fields: https://developer.statuspage.io/#operation/getOrganizationsOrganizationIdUsers

Raises

requests.exceptions.HTTPError Use json.loads(exception.response.content) to get API error info

Parameters

organization_id : str Unique organization ID page : int Page offset to fetch. Defaults to 1. per_page : int Number of results to return per page. Defaults to 100. Returns


any

Source code in server/vendor/atlassian/statuspage.py
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
def organization_get_users(self, organization_id, page=1, per_page=100):
    """
    Get a list of users

    Notes
    -----
    Available fields: https://developer.statuspage.io/#operation/getOrganizationsOrganizationIdUsers

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exception.response.content)` to get API error info

    Parameters
    ----------
    organization_id : str
        Unique organization ID
    page : int
        Page offset to fetch. Defaults to 1.
    per_page : int
        Number of results to return per page. Defaults to 100.
    Returns
    -------
    any
    """
    url = "v1/organizations/{}/users".format(organization_id)
    return self.get(url, params={"page": page, "per_page": per_page})

organization_set_user_permissions(organization_id, user_id, pages)

Update a user's role permissions. Payload should contain a mapping of pages to a set of the desired roles, if the page has Role Based Access Control. Otherwise, the pages should map to an empty hash. User will lose access to any pages omitted from the payload.

Parameters

organization_id : str Unique organization ID user_id : str Unique user ID pages : dict[str, any] You can specify "page_configuration", "incident_manager" and "maintenance_manager" booleans here

Notes

Available fields: https://developer.statuspage.io/#operation/putOrganizationsOrganizationIdPermissionsUserId

Raises

requests.exceptions.HTTPError Use json.loads(exception.response.content) to get API error info

Examples

client = StatusPage(url="https://api.statuspage.io", token="YOUR-TOKEN") client.organization_set_user_permissions( ... "ORGANIZATION-ID", ... "USER-ID", ... { ... "PAGE-ID": { ... "page_configuration": True, ... "incident_manager": True, ... "maintenance_manager": True ... } ... } ... )

Returns

any

Source code in server/vendor/atlassian/statuspage.py
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
def organization_set_user_permissions(self, organization_id, user_id, pages):
    """
    Update a user's role permissions. Payload should contain a mapping of pages to a set of the desired roles,
    if the page has Role Based Access Control. Otherwise, the pages should map to an empty hash.
    User will lose access to any pages omitted from the payload.

    Parameters
    ----------
    organization_id : str
        Unique organization ID
    user_id : str
        Unique user ID
    pages : dict[str, any]
        You can specify "page_configuration", "incident_manager" and "maintenance_manager" booleans here

    Notes
    -----
    Available fields: https://developer.statuspage.io/#operation/putOrganizationsOrganizationIdPermissionsUserId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exception.response.content)` to get API error info

    Examples
    --------
    >>> client = StatusPage(url="https://api.statuspage.io", token="YOUR-TOKEN")
    >>> client.organization_set_user_permissions(
    ...    "ORGANIZATION-ID",
    ...    "USER-ID",
    ...     {
    ...         "PAGE-ID": {
    ...             "page_configuration": True,
    ...             "incident_manager": True,
    ...             "maintenance_manager": True
    ...         }
    ...     }
    ... )

    Returns
    -------
    any
    """
    url = "v1/organizations/{}/permissions/{}".format(organization_id, user_id)
    return self.patch(url, data={"pages": pages})

page_access_users_list(page_id, email, page=1, per_page=100)

Get a list of page access users

Parameters

page_id : str Your page unique ID email : str Email address to search for page : int Page offset to fetch. Defaults to 1. per_page : int Number of results to return per page. Defaults to 100.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsers

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
def page_access_users_list(self, page_id, email, page=1, per_page=100):
    """
    Get a list of page access users

    Parameters
    ----------
    page_id : str
        Your page unique ID
    email : str
        Email address to search for
    page : int
        Page offset to fetch. Defaults to 1.
    per_page : int
        Number of results to return per page. Defaults to 100.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsers

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users".format(page_id)
    return self.get(url, params={"email": email, "page": page, "per_page": per_page})

page_add_access_users_to_component(page_id, component_id, page_access_user_ids)

Add access users to a component

Parameters

page_id : str Your page unique ID component_id : str The component unique ID page_access_user_ids : list[str] The users to add

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponentsComponentIdPageAccessUsers

noqa: E501

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
def page_add_access_users_to_component(self, page_id, component_id, page_access_user_ids):
    """
    Add access users to a component

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_id : str
        The component unique ID
    page_access_user_ids : list[str]
        The users to add

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponentsComponentIdPageAccessUsers
    # noqa: E501

    Returns
    -------
    any
    """
    url = "v1/pages/{}/components/{}/page_access_users".format(page_id, component_id)
    return self.post(url, data={"page_access_user_ids": page_access_user_ids})

page_add_access_users_to_group(page_id, component_id, page_access_group_ids)

Add page access groups to a component

Parameters

page_id : str Your page unique ID component_id : str The component unique ID page_access_group_ids : list[str] The groups to add

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponentsComponentIdPageAccessGroups

noqa: E501

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
def page_add_access_users_to_group(self, page_id, component_id, page_access_group_ids):
    """
    Add page access groups to a component

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_id : str
        The component unique ID
    page_access_group_ids : list[str]
        The groups to add

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponentsComponentIdPageAccessGroups
    # noqa: E501

    Returns
    -------
    any
    """
    url = "v1/pages/{}/components/{}/page_access_groups".format(page_id, component_id)
    return self.post(url, data={"page_access_group_ids": page_access_group_ids})

page_add_components_access_user(page_id, page_access_user_id, component_ids)

Add components for page access user

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier component_ids : list[str] List of component codes to allow access to

Notes

See available fields: https://developer.statuspage.io/#operation/putPagesPageIdPageAccessUsersPageAccessUserIdComponents

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
def page_add_components_access_user(self, page_id, page_access_user_id, component_ids):
    """
    Add components for page access user

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier
    component_ids : list[str]
        List of component codes to allow access to

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/putPagesPageIdPageAccessUsersPageAccessUserIdComponents
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}/components".format(page_id, page_access_user_id)
    return self.patch(url, data={"component_ids": component_ids})

page_add_components_to_access_group(page_id, page_access_group_id, component_ids)

Add components to page access group

Parameters

page_id : str Your page unique ID page_access_group_id : str Page Access Group Identifier component_ids : list[str] List of Component identifiers

Notes

See available fields: https://developer.statuspage.io/#tag/page-access-group-components

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
def page_add_components_to_access_group(self, page_id, page_access_group_id, component_ids):
    """
    Add components to page access group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_group_id : str
        Page Access Group Identifier
    component_ids : list[str]
        List of Component identifiers

    Notes
    -----
    See available fields: https://developer.statuspage.io/#tag/page-access-group-components

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_groups/{}/components".format(page_id, page_access_group_id)
    return self.patch(url, data={"component_ids": component_ids})

page_add_data_points_to_metric(page_id, data)

Add data points to a metric

Parameters

page_id : str Your page unique ID data : dict[str, any] The data points to add Requires "metric_id", which specifies identifier to add data to In "metric_id" you should have array of "timestamp" and "value"

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsData

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
def page_add_data_points_to_metric(self, page_id, data):
    """
    Add data points to a metric

    Parameters
    ----------
    page_id : str
        Your page unique ID
    data : dict[str, any]
        The data points to add
        Requires "metric_id", which specifies identifier to add data to
        In "metric_id" you should have array of "timestamp" and "value"

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsData

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics/data".format(page_id)
    return self.post(url, data={"data": data})

page_add_data_to_metric(page_id, metric_id, data)

Add data to a metric

Parameters

page_id : str Your page unique ID metric_id : str Metric identifier data : dict[str, any] The data to add

Requires "timestamp" and "value"
Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsMetricIdData

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
def page_add_data_to_metric(self, page_id, metric_id, data):
    """
    Add data to a metric

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_id : str
        Metric identifier
    data : dict[str, any]
        The data to add

        Requires "timestamp" and "value"

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsMetricIdData

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics/{}/data".format(page_id, metric_id)
    return self.post(url, data={"data": data})

page_add_metrics_access_user(page_id, page_access_user_id, metric_ids)

Add metrics for page access user

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier metric_ids : list[str] List of metrics to add

Notes

See available fields: https://developer.statuspage.io/#operation/putPagesPageIdPageAccessUsersPageAccessUserIdMetrics

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
def page_add_metrics_access_user(self, page_id, page_access_user_id, metric_ids):
    """
    Add metrics for page access user

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier
    metric_ids : list[str]
        List of metrics to add

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/putPagesPageIdPageAccessUsersPageAccessUserIdMetrics
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}/metrics".format(page_id, page_access_user_id)
    return self.patch(url, data={"metric_ids": metric_ids})

page_count_subscribers_by_type(page_id, subscriber_type, subscriber_state)

Count subscribers by type

Parameters

page_id : str Your page unique ID subscriber_type : SubscriberType If this is specified, only return subscribers of the specified type. subscriber_state : SubscriberState If this is specified, only return subscribers of the specified state. Specify state "all" to find subscribers in any states.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersCount

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
def page_count_subscribers_by_type(self, page_id, subscriber_type, subscriber_state):
    """
    Count subscribers by type

    Parameters
    ----------
    page_id : str
        Your page unique ID
    subscriber_type : SubscriberType
        If this is specified, only return subscribers of the specified type.
    subscriber_state : SubscriberState
        If this is specified, only return subscribers of the specified state.
        Specify state "all" to find subscribers in any states.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersCount

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers/count".format(page_id)
    return self.get(url, params={"type": subscriber_type, "state": subscriber_state})

page_create_access_group(page_id, name, external_identifier, component_ids, metric_ids, page_access_user_ids)

Create a page access group

Parameters

page_id : str Your page unique ID name : str Name for this Group external_identifier : str Associates group with external group component_ids : list[str] metric_ids : list[str] page_access_user_ids : list[str]

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessGroups

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
def page_create_access_group(
    self, page_id, name, external_identifier, component_ids, metric_ids, page_access_user_ids
):
    """
    Create a page access group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    name : str
        Name for this Group
    external_identifier : str
        Associates group with external group
    component_ids : list[str]
    metric_ids : list[str]
    page_access_user_ids : list[str]

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessGroups

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_groups".format(page_id)
    return self.post(
        url,
        data={
            "page_access_group": {
                "name": name,
                "external_identifier": external_identifier,
                "component_ids": component_ids,
                "metric_ids": metric_ids,
                "page_access_user_ids": page_access_user_ids,
            }
        },
    )

page_create_component(page_id, component)

Create a component

Parameters

page_id : str Your page unique ID component : dict[str, any] The component to create Available fields: "name", "description", "status", "group_id", "showcase", "only_show_if_degraded", and "start_date"

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponents

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
def page_create_component(self, page_id, component):
    """
    Create a component

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component : dict[str, any]
        The component to create
        Available fields: "name", "description", "status", "group_id", "showcase", "only_show_if_degraded",
        and "start_date"

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponents

    Returns
    -------
    any
    """
    url = "v1/pages/{}/components".format(page_id)
    return self.post(url, data={"component": component})

page_create_component_group(page_id, description, components_group)

Create a component group

Parameters

page_id : str Your page unique ID description : str The description of the component group components_group : dick[str, any] The components to add to the group Available fields: "components" (array of strings), "name"

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponentGroups

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
def page_create_component_group(self, page_id, description, components_group):
    """
    Create a component group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    description : str
        The description of the component group
    components_group : dick[str, any]
        The components to add to the group
        Available fields: "components" (array of strings), "name"

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdComponentGroups

    Returns
    -------
    any
    """
    url = "v1/pages/{}/component_groups".format(page_id)
    return self.post(url, data={"description": description, "components_group": components_group})

page_create_incident(page_id, incident)

Create an incident. "name" is required in the incident.

Parameters

page_id : str Your page unique ID incident : dict[str, any] The incident to create

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdIncidents

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
def page_create_incident(self, page_id, incident):
    """
    Create an incident. "name" is required in the incident.

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident : dict[str, any]
        The incident to create

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdIncidents

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents".format(page_id)
    return self.post(url, data={"incident": incident})

page_create_incident_subscriber(page_id, incident_id, subscriber)

Create a subscriber for an incident

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID subscriber : dict[str, any] The subscriber data to create

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdIncidentsIncidentIdSubscribers

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
def page_create_incident_subscriber(self, page_id, incident_id, subscriber):
    """
    Create a subscriber for an incident

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID
    subscriber : dict[str, any]
        The subscriber data to create

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdIncidentsIncidentIdSubscribers

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/subscribers".format(page_id, incident_id)
    return self.post(url, data={"subscriber": subscriber})

page_create_metric_for_metric_provider(page_id, metric_provider_id, metric)

Create a metric for a metric provider

Parameters

page_id : str Your page unique ID metric_provider_id : str Metric provider identifier metric : dict[str, any] The metric to create

Available fields in metric: "name", "metric_identifier", "transform", "suffix",
"y_axis_min", "y_axis_max", "y_axis_hidden", "display",
"decimal_places", "tooltip_description"
Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsProvidersMetricsProviderIdMetrics

noqa: E501

Descriptions of the fields that can be added to the metric

"name" - Name of metric,

"metric_identifier" - The identifier used to look up the metric data from the provider

"transform" - The transform to apply to metric before pulling into Statuspage. See transform enum for available values

"suffix" - Suffix to describe the units on the graph

"y_axis_min" - Minimum value for the y-axis

"y_axis_max" - Maximum value for the y-axis

"y_axis_hidden" - Should the values on the y-axis be hidden on render

"display" - Should the metric be displayed on the status page

"decimal_places" - How many decimal places to render on the graph

"tooltip_description" - Description to show on the tooltip

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
def page_create_metric_for_metric_provider(self, page_id, metric_provider_id, metric):
    """
    Create a metric for a metric provider

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_provider_id : str
        Metric provider identifier
    metric : dict[str, any]
        The metric to create

        Available fields in metric: "name", "metric_identifier", "transform", "suffix",
        "y_axis_min", "y_axis_max", "y_axis_hidden", "display",
        "decimal_places", "tooltip_description"

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsProvidersMetricsProviderIdMetrics
    # noqa: E501

    Descriptions of the fields that can be added to the metric:
        "name" - Name of metric,

        "metric_identifier" - The identifier used to look up the metric data from the provider

        "transform" - The transform to apply to metric before pulling into Statuspage.
        See transform enum for available values

        "suffix" - Suffix to describe the units on the graph

        "y_axis_min" - Minimum value for the y-axis

        "y_axis_max" - Maximum value for the y-axis

        "y_axis_hidden" - Should the values on the y-axis be hidden on render

        "display" - Should the metric be displayed on the status page

        "decimal_places" - How many decimal places to render on the graph

        "tooltip_description" - Description to show on the tooltip

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics_providers/{}/metrics".format(page_id, metric_provider_id)
    return self.post(url, data={"metric": metric})

page_create_metric_provider(page_id, metric_provider)

Create a metric provider

Parameters

page_id : str Your page unique ID metric_provider : dict[str, any] The metric provider to create

Available fields in metric_provider: "email", "password", "api_key", "api_token",
"application_key", "type", "metric_base_uri"
Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsProviders

Descriptions of the fields that can be added to the metric_provider

"email" - Required by the Librato metrics provider

"password" - Just a password!

"api_key" - Required by the Datadog and NewRelic type metrics providers

"api_token" - Required by the Librato, Datadog and Pingdom type metrics providers

"application_key" - Required by the Pingdom-type metrics provider

"type" - The type of metrics provider. See MetricProviderType enum for available values

"metric_base_uri" - The base URI for the metrics provider. Required by the Datadog and NewRelic type metrics providers.

Returns

any

Source code in server/vendor/atlassian/statuspage.py
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
def page_create_metric_provider(self, page_id, metric_provider):
    """
    Create a metric provider

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_provider : dict[str, any]
        The metric provider to create

        Available fields in metric_provider: "email", "password", "api_key", "api_token",
        "application_key", "type", "metric_base_uri"

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdMetricsProviders

    Descriptions of the fields that can be added to the metric_provider:
        "email" - Required by the Librato metrics provider

        "password" - Just a password!

        "api_key" - Required by the Datadog and NewRelic type metrics providers

        "api_token" - Required by the Librato, Datadog and Pingdom type metrics providers

        "application_key" - Required by the Pingdom-type metrics provider

        "type" - The type of metrics provider. See MetricProviderType enum for available values

        "metric_base_uri" - The base URI for the metrics provider.
        Required by the Datadog and NewRelic type metrics providers.


    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics_providers".format(page_id)
    return self.post(url, data={"metric_provider": metric_provider})

page_create_postmortem(page_id, incident_id, postmortem)

Create a postmortem

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID postmortem : str Body of Postmortem to create.

Notes

See available fields: https://developer.statuspage.io/#operation/putPagesPageIdIncidentsIncidentIdPostmortem

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
def page_create_postmortem(self, page_id, incident_id, postmortem):
    """
    Create a postmortem

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID
    postmortem : str
        Body of Postmortem to create.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/putPagesPageIdIncidentsIncidentIdPostmortem

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/postmortem".format(page_id, incident_id)
    return self.post(url, data={"postmortem": {"body_draft": postmortem}})

page_create_subscriber(page_id, subscriber)

Create a subscriber

Parameters

page_id : str Your page unique ID subscriber : dict[str, any] Subscriber object. You can specify email, endpoint, phone_country, phone_number, skip_confirmation_notification, page_access_user and component_ids. Check notes for all available fields.

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribers

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
def page_create_subscriber(self, page_id, subscriber):
    """
    Create a subscriber

    Parameters
    ----------
    page_id : str
        Your page unique ID
    subscriber : dict[str, any]
        Subscriber object. You can specify email, endpoint, phone_country, phone_number,
        skip_confirmation_notification, page_access_user and component_ids. Check notes for all available fields.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribers

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers".format(page_id)
    return self.post(url, data={"subscriber": subscriber})

page_create_template(page_id, template)

Create a template. "name", "title" and "body" is required in the template.

Parameters

page_id : str Your page unique ID template : dict[str, any] The template to create

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdIncidentTemplates

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
def page_create_template(self, page_id, template):
    """
    Create a template. "name", "title" and "body" is required in the template.

    Parameters
    ----------
    page_id : str
        Your page unique ID
    template : dict[str, any]
        The template to create

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdIncidentTemplates


    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incident_templates".format(page_id)
    return self.post(url, data={"template": template})

page_delete_access_group(page_id, page_access_group_id)

Remove a page access group

Parameters

page_id : str Your page unique ID page_access_group_id : str Page Access Group Identifier

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessGroupsPageAccessGroupId

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
def page_delete_access_group(self, page_id, page_access_group_id):
    """
    Remove a page access group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_group_id : str
        Page Access Group Identifier

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessGroupsPageAccessGroupId
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_groups/{}".format(page_id, page_access_group_id)
    return self.delete(url)

page_delete_access_user(page_id, page_access_user_id)

Delete page access user

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserId

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
def page_delete_access_user(self, page_id, page_access_user_id):
    """
    Delete page access user

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier

    Notes
    -----
    See available fields:
    https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}".format(page_id, page_access_user_id)
    return self.delete(url)

page_delete_component(page_id, component_id)

Delete a component

Parameters

page_id : str Your page unique ID component_id : str The component unique ID

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentsComponentId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
def page_delete_component(self, page_id, component_id):
    """
    Delete a component

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_id : str
        The component unique ID

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentsComponentId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/components/{}".format(page_id, component_id)
    return self.delete(url)

page_delete_component_access_user(page_id, page_access_user_id, component_id)

Delete components for page access user.

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier component_id : str Component identifier

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdComponentsComponentId

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
def page_delete_component_access_user(self, page_id, page_access_user_id, component_id):
    """
    Delete components for page access user.

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier
    component_id : str
        Component identifier

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdComponentsComponentId
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}/components/{}".format(page_id, page_access_user_id, component_id)
    return self.delete(url)

page_delete_component_for_access_page(page_id, page_access_group_id, component_id)

Remove a component from a page access group

Parameters

page_id : str Your page unique ID page_access_group_id : str Page Access Group Identifier component_id : str Component identifier

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessGroupsPageAccessGroupIdComponentsComponentId

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
def page_delete_component_for_access_page(self, page_id, page_access_group_id, component_id):
    """
    Remove a component from a page access group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_group_id : str
        Page Access Group Identifier
    component_id : str
        Component identifier

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessGroupsPageAccessGroupIdComponentsComponentId
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_groups/{}/components/{}".format(page_id, page_access_group_id, component_id)
    return self.delete(url)

page_delete_component_group(page_id, component_group_id)

Delete a component group

Parameters

page_id : str Your page unique ID component_group_id : str Component group identifier

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentGroupsId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
def page_delete_component_group(self, page_id, component_group_id):
    """
    Delete a component group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_group_id : str
        Component group identifier

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentGroupsId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/component_groups/{}".format(page_id, component_group_id)
    return self.delete(url)

page_delete_components_access_user(page_id, page_access_user_id, component_ids)

Delete components for page access user.

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier component_ids : list[str] List of components codes to remove. If omitted, all components will be removed.

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdComponents

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
def page_delete_components_access_user(self, page_id, page_access_user_id, component_ids):
    """
    Delete components for page access user.

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier
    component_ids : list[str]
        List of components codes to remove. **If omitted, all components will be removed.**

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdComponents
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}/components".format(page_id, page_access_user_id)
    return self.delete(url, data={"component_ids": component_ids})

page_delete_components_for_access_page(page_id, page_access_group_id, component_ids)

Delete components for a page access group

Parameters

page_id : str Your page unique ID page_access_group_id : str Page Access Group Identifier component_ids : list[str] List of Component identifiers

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessGroupsPageAccessGroupIdComponents

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
def page_delete_components_for_access_page(self, page_id, page_access_group_id, component_ids):
    """
    Delete components for a page access group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_group_id : str
        Page Access Group Identifier
    component_ids : list[str]
        List of Component identifiers

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessGroupsPageAccessGroupIdComponents
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_groups/{}/components".format(page_id, page_access_group_id)
    return self.delete(url, data={"component_ids": component_ids})

page_delete_incident(page_id, incident_id)

Delete an incident

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
def page_delete_incident(self, page_id, incident_id):
    """
    Delete an incident

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}".format(page_id, incident_id)
    return self.delete(url)

page_delete_metric(page_id, metric_id)

Delete a metric

Parameters

page_id : str Your page unique ID metric_id : str Metric identifier

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdMetricsMetricId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
def page_delete_metric(self, page_id, metric_id):
    """
    Delete a metric

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_id : str
        Metric identifier

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdMetricsMetricId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics/{}".format(page_id, metric_id)
    return self.delete(url)

page_delete_metric_access_user(page_id, page_access_user_id, metric_id)

Delete metric for page access user

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier metric_id : str Identifier of metric requested

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdMetricsMetricId

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
def page_delete_metric_access_user(self, page_id, page_access_user_id, metric_id):
    """
    Delete metric for page access user

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier
    metric_id : str
        Identifier of metric requested

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdMetricsMetricId
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}/metrics/{}".format(page_id, page_access_user_id, metric_id)
    return self.delete(url)

page_delete_metric_provider(page_id, metric_provider_id)

Delete a metric provider

Parameters

page_id : str Your page unique ID metric_provider_id : str Metric provider identifier

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
def page_delete_metric_provider(self, page_id, metric_provider_id):
    """
    Delete a metric provider

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_provider_id : str
        Metric provider identifier

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics_providers/{}".format(page_id, metric_provider_id)
    return self.delete(url)

page_delete_metrics_access_user(page_id, page_access_user_id, metric_ids)

Delete metrics for page access user

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier metric_ids : list[str] List of metrics to remove

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdMetrics

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
def page_delete_metrics_access_user(self, page_id, page_access_user_id, metric_ids):
    """
    Delete metrics for page access user

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier
    metric_ids : list[str]
        List of metrics to remove

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdPageAccessUsersPageAccessUserIdMetrics
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}/metrics".format(page_id, page_access_user_id)
    return self.delete(url, data={"metric_ids": metric_ids})

page_delete_postmortem(page_id, incident_id)

Delete a postmortem

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdIncidentsIncidentIdPostmortem

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
def page_delete_postmortem(self, page_id, incident_id):
    """
    Delete a postmortem

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdIncidentsIncidentIdPostmortem

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/postmortem".format(page_id, incident_id)
    return self.delete(url)

page_get_access_group(page_id, page_access_group_id)

Get a page access group

Parameters

page_id : str Your page unique ID page_access_group_id : str Page Access Group Identifier

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessGroupsPageAccessGroupId

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
def page_get_access_group(self, page_id, page_access_group_id):
    """
    Get a page access group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_group_id : str
        Page Access Group Identifier

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessGroupsPageAccessGroupId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_groups/{}".format(page_id, page_access_group_id)
    return self.get(url)

page_get_access_groups(page_id, page=1, per_page=100)

Get a list of page access groups

Parameters

page_id : str Your page unique ID page : int Page offset to fetch. Defaults to 1. per_page : int Number of results to return per page. Defaults to 100.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessGroups

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
def page_get_access_groups(self, page_id, page=1, per_page=100):
    """
    Get a list of page access groups

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page : int
        Page offset to fetch. Defaults to 1.
    per_page : int
        Number of results to return per page. Defaults to 100.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessGroups

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_groups".format(page_id)
    return self.get(url, params={"page": page, "per_page": per_page})

page_get_access_user(page_id, page_access_user_id)

Get page access user

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsersPageAccessUserId

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
def page_get_access_user(self, page_id, page_access_user_id):
    """
    Get page access user

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsersPageAccessUserId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}".format(page_id, page_access_user_id)
    return self.get(url)

page_get_component(page_id, component_id)

Get a component

Parameters

page_id : str Your page unique ID component_id : str The component unique ID

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentsComponentId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
def page_get_component(self, page_id, component_id):
    """
    Get a component

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_id : str
        The component unique ID

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentsComponentId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/components/{}".format(page_id, component_id)
    return self.get(url)

page_get_component_group(page_id, component_group_id)

Get a component group

Parameters

page_id : str Your page unique ID component_group_id : str Component group identifier

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentGroupsId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
def page_get_component_group(self, page_id, component_group_id):
    """
    Get a component group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_group_id : str
        Component group identifier

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentGroupsId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/component_groups/{}".format(page_id, component_group_id)
    return self.get(url)

page_get_components(page_id, per_page=100, page=1)

Get all components

Parameters

page_id : str Your page unique ID per_page : int Number of components to return per page (default is 100) page : int Page number to return (default is 1)

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponents

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
def page_get_components(self, page_id, per_page=100, page=1):
    """
    Get all components

    Parameters
    ----------
    page_id : str
        Your page unique ID
    per_page : int
        Number of components to return per page (default is 100)
    page : int
        Page number to return (default is 1)

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponents

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/components".format(page_id)
    return self.get(url, params={"per_page": per_page, "page": page})

page_get_components_access_user(page_id, page_access_user_id, page=1, per_page=100)

Get components for page access user

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier page : int Page offset to fetch. Defaults to 1. per_page : int Number of results to return per page. Defaults to 100.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsersPageAccessUserIdComponents

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
def page_get_components_access_user(self, page_id, page_access_user_id, page=1, per_page=100):
    """
    Get components for page access user

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier
    page : int
        Page offset to fetch. Defaults to 1.
    per_page : int
        Number of results to return per page. Defaults to 100.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsersPageAccessUserIdComponents
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}/components".format(page_id, page_access_user_id)
    return self.get(url, params={"page": page, "per_page": per_page})

page_get_components_for_access_group(page_id, page_access_group_id, page=1, per_page=100)

Add components to page access group

Parameters

page_id : str Your page unique ID page_access_group_id : str Page Access Group Identifier page : int Page offset to fetch. Defaults to 1. per_page : int Number of results to return per page. Defaults to 100.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessGroupsPageAccessGroupIdComponents

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
def page_get_components_for_access_group(self, page_id, page_access_group_id, page=1, per_page=100):
    """
    Add components to page access group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_group_id : str
        Page Access Group Identifier
    page : int
        Page offset to fetch. Defaults to 1.
    per_page : int
        Number of results to return per page. Defaults to 100.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessGroupsPageAccessGroupIdComponents
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_groups/{}/components".format(page_id, page_access_group_id)
    return self.get(url, params={"page": page, "per_page": per_page})

page_get_embed_config_settings(page_id)

Get status embed config settings

Parameters

page_id : str Your page unique ID

Raises

requests.exceptions.HTTPError Use json.loads(exception.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdStatusEmbedConfig

Returns

any

Source code in server/vendor/atlassian/statuspage.py
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
def page_get_embed_config_settings(self, page_id):
    """
    Get status embed config settings

    Parameters
    ----------
    page_id : str
        Your page unique ID

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exception.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdStatusEmbedConfig

    Returns
    -------
    any
    """
    url = "v1/pages/{}/status_embed_config".format(page_id)
    return self.get(url)

page_get_histogram_of_subscribers_with_state(page_id)

Get a histogram of subscribers with state

Parameters

page_id : str Your page unique ID

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersHistogramByState

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
def page_get_histogram_of_subscribers_with_state(self, page_id):
    """
    Get a histogram of subscribers with state

    Parameters
    ----------
    page_id : str
        Your page unique ID

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersHistogramByState

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers/histogram".format(page_id)
    return self.get(url)

page_get_incident(page_id, incident_id)

Get an incident

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentId

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
def page_get_incident(self, page_id, incident_id):
    """
    Get an incident

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}".format(page_id, incident_id)
    return self.get(url)

page_get_incident_subscriber(page_id, incident_id, subscriber_id)

Get a subscriber for an incident

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID subscriber_id : str The subscriber unique ID

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentIdSubscribersSubscriberId

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
def page_get_incident_subscriber(self, page_id, incident_id, subscriber_id):
    """
    Get a subscriber for an incident

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID
    subscriber_id : str
        The subscriber unique ID

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentIdSubscribersSubscriberId
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/subscribers/{}".format(page_id, incident_id, subscriber_id)
    return self.get(url)

page_get_list_of_component_groups(page_id, per_page=100, page=1)

Get a list of component groups

Parameters

page_id : str Your page unique ID per_page : int The number of results to return per page (defaults to 100) page : int The page to return (defaults to 1)

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentGroups

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
def page_get_list_of_component_groups(self, page_id, per_page=100, page=1):
    """
    Get a list of component groups

    Parameters
    ----------
    page_id : str
        Your page unique ID
    per_page : int
        The number of results to return per page (defaults to 100)
    page : int
        The page to return (defaults to 1)

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentGroups

    Returns
    -------
    any
    """
    url = "v1/pages/{}/component_groups".format(page_id)
    return self.get(url, params={"per_page": per_page, "page": page})

page_get_list_of_metrics(page_id, per_page=100, page=1)

Get a list of metrics

Parameters

page_id : str Your page unique ID per_page : int The number of results to return per page (defaults to 100) page : int The page to return (defaults to 1)

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetrics

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
def page_get_list_of_metrics(self, page_id, per_page=100, page=1):
    """
    Get a list of metrics

    Parameters
    ----------
    page_id : str
        Your page unique ID
    per_page : int
        The number of results to return per page (defaults to 100)
    page : int
        The page to return (defaults to 1)

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetrics

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics".format(page_id)
    return self.get(url, params={"per_page": per_page, "page": page})

page_get_list_unsubscribed(page_id, page=1, per_page=100)

Get a list of unsubscribed subscribers

Parameters

page_id : str Your page unique ID page : int Page offset to fetch. Defaults to 1. per_page : int Number of results to return per page. Defaults to 100.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersUnsubscribed

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
def page_get_list_unsubscribed(self, page_id, page=1, per_page=100):
    """
    Get a list of unsubscribed subscribers

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page : int
        Page offset to fetch. Defaults to 1.
    per_page : int
        Number of results to return per page. Defaults to 100.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersUnsubscribed

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/unsubscribed".format(page_id)
    return self.get(url, params={"page": page, "per_page": per_page})

page_get_metric(page_id, metric_id)

Get a metric

Parameters

page_id : str Your page unique ID metric_id : str Metric identifier

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsMetricId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
def page_get_metric(self, page_id, metric_id):
    """
    Get a metric

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_id : str
        Metric identifier

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsMetricId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics/{}".format(page_id, metric_id)
    return self.get(url)

page_get_metric_provider(page_id, metric_provider_id)

Get a metric provider

Parameters

page_id : str Your page unique ID metric_provider_id : str Metric provider identifier

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProvidersMetricsProviderId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
def page_get_metric_provider(self, page_id, metric_provider_id):
    """
    Get a metric provider

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_provider_id : str
        Metric provider identifier

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProvidersMetricsProviderId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics_providers/{}".format(page_id, metric_provider_id)
    return self.get(url)

page_get_metrics_access_user(page_id, page_access_user_id)

Get metrics for page access user

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsersPageAccessUserIdMetrics

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
def page_get_metrics_access_user(self, page_id, page_access_user_id):
    """
    Get metrics for page access user

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdPageAccessUsersPageAccessUserIdMetrics
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}/metrics".format(page_id, page_access_user_id)
    return self.get(url)

page_get_postmortem(page_id, incident_id)

Get a postmortem

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentIdPostmortem

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
def page_get_postmortem(self, page_id, incident_id):
    """
    Get a postmortem

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentIdPostmortem

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/postmortem".format(page_id, incident_id)
    return self.get(url)

page_get_subscriber(page_id, subscriber_id)

Get a subscriber

Parameters

page_id : str Your page unique ID subscriber_id : str Subscriber identifier

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersSubscriberId

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
def page_get_subscriber(self, page_id, subscriber_id):
    """
    Get a subscriber

    Parameters
    ----------
    page_id : str
        Your page unique ID
    subscriber_id : str
        Subscriber identifier

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribersSubscriberId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers/{}".format(page_id, subscriber_id)
    return self.get(url)

page_get_subscribers(page_id, search_by=None, sort_direction='asc', page=1, per_page=100)

Get all subscribers

Parameters

page_id : str Your page unique ID page : int Page offset to fetch. Defaults to 1. per_page : int Number of results to return per page. Defaults to 100. search_by : dict[str, any] What to search by.

"q" : str
If this is specified, search the contact information (email, endpoint, or phone number)
for the provided value. This parameter doesn't support searching for Slack subscribers.

"subscriber_type" : SubscriberType
If this is specified, only return subscribers of the specified type.

"subscriber_state" : SubscriberState
If this is specified, only return subscribers of the specified state.
Specify state "all" to find subscribers in any states.

"sort_field" : SortField
The field on which to sort the results.
SortOrder

The direction in which to sort the results.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribers

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
def page_get_subscribers(self, page_id, search_by=None, sort_direction="asc", page=1, per_page=100):
    """
    Get all subscribers

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page : int
        Page offset to fetch. Defaults to 1.
    per_page : int
        Number of results to return per page. Defaults to 100.
    search_by : dict[str, any]
        What to search by.

        "q" : str
        If this is specified, search the contact information (email, endpoint, or phone number)
        for the provided value. This parameter doesn't support searching for Slack subscribers.

        "subscriber_type" : SubscriberType
        If this is specified, only return subscribers of the specified type.

        "subscriber_state" : SubscriberState
        If this is specified, only return subscribers of the specified state.
        Specify state "all" to find subscribers in any states.

        "sort_field" : SortField
        The field on which to sort the results.

    sort_direction : SortOrder
        The direction in which to sort the results.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdSubscribers

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers".format(page_id)

    params = {}

    if search_by:
        if "q" in search_by:
            params["q"] = search_by["q"]
        if "subscriber_type" in search_by:
            params["type"] = search_by["subscriber_type"]
        if "subscriber_state" in search_by:
            params["state"] = search_by["subscriber_state"]
        if "sort_field" in search_by:
            params["sort_field"] = search_by["sort_field"]

    params["sort_direction"] = sort_direction
    params["page"] = page
    params["per_page"] = per_page

    return self.get(url, params=params)

page_get_templates(page_id, page=1, per_page=100)

Get a list of templates

Parameters

page_id : str Your page unique ID page : int The page offset to return. Defaults to 1. per_page : int The number of templates to return per page. Defaults to 100. If this is set to 0, a default and maximum limit of 100 will be imposed and this endpoint will return paginated data even if this query parameter is not provided.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentTemplates

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
def page_get_templates(self, page_id, page=1, per_page=100):
    """
    Get a list of templates

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page : int
        The page offset to return. Defaults to 1.
    per_page : int
        The number of templates to return per page. Defaults to 100.
        If this is set to 0, a default and maximum limit of 100
        will be imposed and this endpoint will return paginated data
        even if this query parameter is not provided.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentTemplates

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incident_templates".format(page_id)
    return self.get(url, params={"page": page, "per_page": per_page})

page_get_uptime_component(page_id, component_id, start=None, end=None)

Get a component's uptime

Parameters

page_id : str Your page unique ID component_id : str The component unique ID start : str The start date for uptime calculation (defaults to the component's start_date field or 90 days ago, whichever is more recent). The maximum supported date range is six calendar months. If the year is given, the date defaults to the first day of the year. If the year and month are given, the start date defaults to the first day of that month. The earliest supported date is January 1, 1970. end : str The end date for uptime calculation (defaults to today in the page's time zone). The maximum supported date range is six calendar months. If the year is given, the date defaults to the last day of the year. If the year and month are given, the date defaults to the last day of that month. The earliest supported date is January 1, 1970.

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentsComponentIdUptime

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
def page_get_uptime_component(self, page_id, component_id, start=None, end=None):
    """
    Get a component's uptime

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_id : str
        The component unique ID
    start : str
        The start date for uptime calculation
        (defaults to the component's start_date field or 90 days ago, whichever is more recent).
        The maximum supported date range is six calendar months.
        If the year is given, the date defaults to the first day of the year.
        If the year and month are given, the start date defaults to the first day of that month.
        The earliest supported date is January 1, 1970.
    end : str
        The end date for uptime calculation (defaults to today in the page's time zone).
        The maximum supported date range is six calendar months.
        If the year is given, the date defaults to the last day of the year.
        If the year and month are given, the date defaults to the last day of that month.
        The earliest supported date is January 1, 1970.

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentsComponentIdUptime

    Returns
    -------
    any
    """
    url = "v1/pages/{}/components/{}/uptime".format(page_id, component_id)

    params = {}
    if start is not None:
        params["start"] = start
    if end is not None:
        params["end"] = end

    return self.get(url, params=params)

page_get_uptime_for_component_group(page_id, component_group_id, start=None, end=None)

Get uptime for a component group

Parameters

page_id : str Your page unique ID component_group_id : str Component group identifier start : str The start date for uptime calculation (defaults to the date of the component in the group with the earliest start_date, or 90 days ago, whichever is more recent). The maximum supported date range is six calendar months. If the year is given, the date defaults to the first day of the year. If the year and month are given, the start date defaults to the first day of that month. The earliest supported date is January 1, 1970. end : str The end date for uptime calculation (defaults to today in the page's time zone). The maximum supported date range is six calendar months. If the year is given, the date defaults to the last day of the year. If the year and month are given, the date defaults to the last day of that month. The earliest supported date is January 1, 1970.

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentGroupsIdUptime

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
def page_get_uptime_for_component_group(self, page_id, component_group_id, start=None, end=None):
    """
    Get uptime for a component group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_group_id : str
        Component group identifier
    start : str
        The start date for uptime calculation
        (defaults to the date of the component in the group with the earliest start_date,
        or 90 days ago, whichever is more recent).
        The maximum supported date range is six calendar months.
        If the year is given, the date defaults to the first day of the year.
        If the year and month are given, the start date defaults to the first day of that month.
        The earliest supported date is January 1, 1970.
    end : str
        The end date for uptime calculation (defaults to today in the page's time zone).
        The maximum supported date range is six calendar months.
        If the year is given, the date defaults to the last day of the year.
        If the year and month are given, the date defaults to the last day of that month.
        The earliest supported date is January 1, 1970.

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdComponentGroupsIdUptime

    Returns
    -------
    any
    """
    url = "v1/pages/{}/component_groups/{}/uptime".format(page_id, component_group_id)

    params = {}
    if start is not None:
        params["start"] = start
    if end is not None:
        params["end"] = end

    return self.get(url, params=params)

page_list_active_maintenances(page_id, page=1, per_page=100)

Get a list of active maintenances

Parameters

page_id : str Your page unique ID page : int The page offset to return. Defaults to 1. per_page : int The number of maintenances to return per page. Defaults to 100. If this is set to 0, a default and maximum limit of 100 will be imposed and this endpoint will return paginated data even if this query parameter is not provided.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsActiveMaintenance

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
def page_list_active_maintenances(self, page_id, page=1, per_page=100):
    """
    Get a list of active maintenances

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page : int
        The page offset to return. Defaults to 1.
    per_page : int
        The number of maintenances to return per page. Defaults to 100.
        If this is set to 0, a default and maximum limit of 100
        will be imposed and this endpoint will return paginated data
        even if this query parameter is not provided.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsActiveMaintenance

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/active_maintenance".format(page_id)
    return self.get(url, params={"page": page, "per_page": per_page})

page_list_incident_subscribers(page_id, incident_id, page=1, per_page=100)

Get a list of subscribers for an incident

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID page : int The page offset to return. Defaults to 1. per_page : int The number of subscribers to return per page. Defaults to 100.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentIdSubscribers

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
def page_list_incident_subscribers(self, page_id, incident_id, page=1, per_page=100):
    """
    Get a list of subscribers for an incident

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID
    page : int
        The page offset to return. Defaults to 1.
    per_page : int
        The number of subscribers to return per page. Defaults to 100.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsIncidentIdSubscribers

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/subscribers".format(page_id, incident_id)
    return self.get(url, params={"page": page, "per_page": per_page})

page_list_incidents(page_id, q, page=1, per_page=100)

Get a list of incidents

Parameters

page_id : str Your page unique ID q : str The search query to filter incidents by. If this is specified, search for the text query string in the incident's name, status, postmortem_body, and incident_updates fields. page : int The page offset to return. Defaults to 1. per_page : int The number of incidents to return per page. Defaults to 100. If this is set to 0, a default and maximum limit of 100 will be imposed and this endpoint will return paginated data even if this query parameter is not provided.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidents

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
def page_list_incidents(self, page_id, q, page=1, per_page=100):
    """
    Get a list of incidents

    Parameters
    ----------
    page_id : str
        Your page unique ID
    q : str
        The search query to filter incidents by. If this is specified, search for the text query string in
        the incident's name, status, postmortem_body, and incident_updates fields.
    page : int
        The page offset to return. Defaults to 1.
    per_page : int
        The number of incidents to return per page. Defaults to 100.
        If this is set to 0, a default and maximum limit of 100
        will be imposed and this endpoint will return paginated data
        even if this query parameter is not provided.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidents

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents".format(page_id)
    return self.get(url, params={"q": q, "page": page, "per_page": per_page})

page_list_metric_for_metric_provider(page_id, metric_provider_id, per_page=100, page=1)

List metrics for a metric provider

Parameters

page_id : str Your page unique ID metric_provider_id : str Metric provider identifier per_page : int The number of results to return per page (defaults to 100) page : int The page to return (defaults to 1)

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProvidersMetricsProviderIdMetrics

noqa: E501

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
def page_list_metric_for_metric_provider(self, page_id, metric_provider_id, per_page=100, page=1):
    """
    List metrics for a metric provider

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_provider_id : str
        Metric provider identifier
    per_page : int
        The number of results to return per page (defaults to 100)
    page : int
        The page to return (defaults to 1)

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProvidersMetricsProviderIdMetrics
    # noqa: E501

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics_providers/{}/metrics".format(page_id, metric_provider_id)
    return self.get(url, params={"per_page": per_page, "page": page})

page_list_metric_providers(page_id)

Get a list of metric providers

Parameters

page_id : str Your page unique ID Raises


requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProviders

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
def page_list_metric_providers(self, page_id):
    """
    Get a list of metric providers

    Parameters
    ----------
    page_id : str
        Your page unique ID
    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProviders

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics_providers".format(page_id)
    return self.get(url)

page_list_pages()

Get a list of pages

Raises

requests.exceptions.HTTPError Use json.loads(exception.response.content) to get API error info

Notes

Available fields: https://developer.statuspage.io/#operation/getPages

Returns

any

Source code in server/vendor/atlassian/statuspage.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
def page_list_pages(self):
    """
    Get a list of pages

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exception.response.content)` to get API error info


    Notes
    -----
    Available fields: https://developer.statuspage.io/#operation/getPages

    Returns
    -------
    any
    """
    url = "v1/pages"
    return self.get(url)

page_list_scheduled_incidents(page_id, page=1, per_page=100)

Get a list of scheduled incidents

Parameters

page_id : str Your page unique ID page : int The page offset to return. Defaults to 1. per_page : int The number of incidents to return per page. Defaults to 100. If this is set to 0, a default and maximum limit of 100 will be imposed and this endpoint will return paginated data even if this query parameter is not provided.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsScheduled

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
def page_list_scheduled_incidents(self, page_id, page=1, per_page=100):
    """
    Get a list of scheduled incidents

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page : int
        The page offset to return. Defaults to 1.
    per_page : int
        The number of incidents to return per page. Defaults to 100.
        If this is set to 0, a default and maximum limit of 100
        will be imposed and this endpoint will return paginated data
        even if this query parameter is not provided.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsScheduled

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/scheduled".format(page_id)
    return self.get(url, params={"page": page, "per_page": per_page})

page_list_unresolved_incidents(page_id, page=1, per_page=100)

Get a list of unresolved incidents

Parameters

page_id : str Your page unique ID page : int The page offset to return. Defaults to 1. per_page : int The number of incidents to return per page. Defaults to 100. If this is set to 0, a default and maximum limit of 100 will be imposed and this endpoint will return paginated data even if this query parameter is not provided.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsUnresolved

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
def page_list_unresolved_incidents(self, page_id, page=1, per_page=100):
    """
    Get a list of unresolved incidents

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page : int
        The page offset to return. Defaults to 1.
    per_page : int
        The number of incidents to return per page. Defaults to 100.
        If this is set to 0, a default and maximum limit of 100
        will be imposed and this endpoint will return paginated data
        even if this query parameter is not provided.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsUnresolved

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/unresolved".format(page_id)
    return self.get(url, params={"page": page, "per_page": per_page})

page_list_upcoming_incidents(page_id, page=1, per_page=100)

Get a list of upcoming incidents

Parameters

page_id : str Your page unique ID page : int The page offset to return. Defaults to 1. per_page : int The number of incidents to return per page. Defaults to 100. If this is set to 0, a default and maximum limit of 100 will be imposed and this endpoint will return paginated data even if this query parameter is not provided.

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsUpcoming

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
def page_list_upcoming_incidents(self, page_id, page=1, per_page=100):
    """
    Get a list of upcoming incidents

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page : int
        The page offset to return. Defaults to 1.
    per_page : int
        The number of incidents to return per page. Defaults to 100.
        If this is set to 0, a default and maximum limit of 100
        will be imposed and this endpoint will return paginated data
        even if this query parameter is not provided.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdIncidentsUpcoming

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/upcoming".format(page_id)
    return self.get(url, params={"page": page, "per_page": per_page})

page_publish_postmortem(page_id, incident_id, postmortem)

Publish a postmortem

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID postmortem : dict[str, any] Body of Postmortem to publish Available fields: "notify_twitter", "notify_subscribers", and "custom_tweet"

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/putPagesPageIdIncidentsIncidentIdPostmortemPublish

noqa: E501

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
def page_publish_postmortem(self, page_id, incident_id, postmortem):
    """
    Publish a postmortem

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID
    postmortem : dict[str, any]
        Body of Postmortem to publish
        Available fields: "notify_twitter", "notify_subscribers", and "custom_tweet"

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/putPagesPageIdIncidentsIncidentIdPostmortemPublish
    # noqa: E501

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/postmortem/publish".format(page_id, incident_id)
    return self.post(url, data={"postmortem": postmortem})

page_reactivate_subscribers(page_id, subscriber_ids, subscriber_type)

Reactivate a list of quarantined subscribers

Parameters

page_id : str Your page unique ID subscriber_ids : list[str] A list of subscriber ids to reactivate. subscriber_type : SubscriberType If this is present, only reactivate subscribers of this type.

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersReactivate

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
def page_reactivate_subscribers(self, page_id, subscriber_ids, subscriber_type):
    """
    Reactivate a list of quarantined subscribers

    Parameters
    ----------
    page_id : str
        Your page unique ID
    subscriber_ids : list[str]
        A list of subscriber ids to reactivate.
    subscriber_type : SubscriberType
        If this is present, only reactivate subscribers of this type.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersReactivate

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers/reactivate".format(page_id)
    return self.post(url, data={"subscribers": subscriber_ids, "type": subscriber_type})

page_remove_access_users_from_component(page_id, component_id)

Remove access users from a component

Parameters

page_id : str Your page unique ID component_id : str The component unique ID

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentsComponentIdPageAccessUsers

noqa: E501

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
def page_remove_access_users_from_component(self, page_id, component_id):
    """
    Remove access users from a component

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_id : str
        The component unique ID

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentsComponentIdPageAccessUsers
    # noqa: E501

    Returns
    -------
    any
    """
    url = "v1/pages/{}/components/{}/page_access_users".format(page_id, component_id)
    return self.delete(url)

page_remove_access_users_from_group(page_id, component_id)

Remove access users from a group

Parameters

page_id : str Your page unique ID component_id : str The component unique ID

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentsComponentIdPageAccessGroups

noqa: E501

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
def page_remove_access_users_from_group(self, page_id, component_id):
    """
    Remove access users from a group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_id : str
        The component unique ID

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdComponentsComponentIdPageAccessGroups
    # noqa: E501

    Returns
    -------
    any
    """
    url = "v1/pages/{}/components/{}/page_access_groups".format(page_id, component_id)
    return self.delete(url)

page_replace_access_group(page_id, page_access_group_id, name, external_identifier, component_ids, metric_ids, page_access_user_ids)

Update a page access group

Parameters

page_id : str Your page unique ID page_access_group_id : str Page Access Group Identifier name : str Name for this Group external_identifier : str Associates group with external group component_ids : list[str] metric_ids : list[str] page_access_user_ids : list[str]

Notes

See available fields: https://developer.statuspage.io/#operation/putPagesPageIdPageAccessGroupsPageAccessGroupId

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
def page_replace_access_group(
    self, page_id, page_access_group_id, name, external_identifier, component_ids, metric_ids, page_access_user_ids
):
    """
    Update a page access group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_group_id : str
        Page Access Group Identifier
    name : str
        Name for this Group
    external_identifier : str
        Associates group with external group
    component_ids : list[str]
    metric_ids : list[str]
    page_access_user_ids : list[str]

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/putPagesPageIdPageAccessGroupsPageAccessGroupId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_groups/{}".format(page_id, page_access_group_id)
    return self.patch(
        url,
        data={
            "page_access_group": {
                "name": name,
                "external_identifier": external_identifier,
                "component_ids": component_ids,
                "metric_ids": metric_ids,
                "page_access_user_ids": page_access_user_ids,
            }
        },
    )

page_replace_components_access_user(page_id, page_access_user_id, component_ids)

Replace components for page access user

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier component_ids : list[str] List of component codes to allow access to

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessUsersPageAccessUserIdComponents

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
def page_replace_components_access_user(self, page_id, page_access_user_id, component_ids):
    """
    Replace components for page access user

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier
    component_ids : list[str]
        List of component codes to allow access to

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessUsersPageAccessUserIdComponents
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}/components".format(page_id, page_access_user_id)
    return self.post(url, data={"component_ids": component_ids})

page_replace_components_for_access_page(page_id, page_access_group_id, component_ids)

Replace components for a page access group

Parameters

page_id : str Your page unique ID page_access_group_id : str Page Access Group Identifier component_ids : list[str] List of components codes to set on the page access group

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessGroupsPageAccessGroupIdComponents

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
def page_replace_components_for_access_page(self, page_id, page_access_group_id, component_ids):
    """
    Replace components for a page access group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_group_id : str
        Page Access Group Identifier
    component_ids : list[str]
        List of components codes to set on the page access group

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessGroupsPageAccessGroupIdComponents
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_groups/{}/components".format(page_id, page_access_group_id)
    return self.post(url, data={"component_ids": component_ids})

page_replace_metrics_access_user(page_id, page_access_user_id, metric_ids)

Replace metrics for page access user

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier metric_ids : list[str] List of metrics to replace

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessUsersPageAccessUserIdMetrics

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
def page_replace_metrics_access_user(self, page_id, page_access_user_id, metric_ids):
    """
    Replace metrics for page access user

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier
    metric_ids : list[str]
        List of metrics to replace

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdPageAccessUsersPageAccessUserIdMetrics
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}/metrics".format(page_id, page_access_user_id)
    return self.post(url, data={"metric_ids": metric_ids})

page_resend_confirmation_incident_subscriber(page_id, incident_id, subscriber_id)

Resend the confirmation email for a subscriber

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID subscriber_id : str The subscriber unique ID

Warnings

Only returns 201 code

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
def page_resend_confirmation_incident_subscriber(self, page_id, incident_id, subscriber_id):
    """
    Resend the confirmation email for a subscriber

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID
    subscriber_id : str
        The subscriber unique ID

    Warnings
    --------
    Only returns 201 code

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/subscribers/{}/resend_confirmation".format(page_id, incident_id, subscriber_id)
    return self.post(url)

page_resend_confirmation_subscribers(page_id, subscriber_id)

Resend confirmation email to a subscriber

Parameters

page_id : str Your page unique ID subscriber_id : str Subscriber identifier

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersSubscriberIdResendConfirmation

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
def page_resend_confirmation_subscribers(self, page_id, subscriber_id):
    """
    Resend confirmation email to a subscriber

    Parameters
    ----------
    page_id : str
        Your page unique ID
    subscriber_id : str
        Subscriber identifier

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersSubscriberIdResendConfirmation
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers/{}/resend_confirmation".format(page_id, subscriber_id)
    return self.post(url)

page_resend_confirmations_to_subscribers(page_id, subscriber_ids)

Resend confirmation emails to a list of subscribers

Parameters

page_id : str Your page unique ID subscriber_ids : str | list[str] The array of subscriber codes to resend confirmations for, or "all" to resend confirmations to all subscribers. Only unconfirmed email subscribers will receive this notification.

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersResendConfirmation

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
def page_resend_confirmations_to_subscribers(self, page_id, subscriber_ids):
    """
    Resend confirmation emails to a list of subscribers

    Parameters
    ----------
    page_id : str
        Your page unique ID
    subscriber_ids : str | list[str]
        The array of subscriber codes to resend confirmations for,
        or "all" to resend confirmations to all subscribers.
        Only unconfirmed email subscribers will receive this notification.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersResendConfirmation

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers/resend_confirmation".format(page_id)
    return self.post(url, data={"subscribers": subscriber_ids})

page_reset_data_for_metric(page_id, metric_id)

Reset data for a metric

Parameters

page_id : str Your page unique ID metric_id : str Metric identifier

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdMetricsMetricIdData

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
def page_reset_data_for_metric(self, page_id, metric_id):
    """
    Reset data for a metric

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_id : str
        Metric identifier

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdMetricsMetricIdData

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics/{}/data".format(page_id, metric_id)
    return self.delete(url)

page_revert_postmortem(page_id, incident_id)

Revert a postmortem

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/putPagesPageIdIncidentsIncidentIdPostmortemRevert

noqa: E501

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
def page_revert_postmortem(self, page_id, incident_id):
    """
    Revert a postmortem

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/putPagesPageIdIncidentsIncidentIdPostmortemRevert
    # noqa: E501

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/postmortem/revert".format(page_id, incident_id)
    return self.post(url)

page_set_access_user(page_id, page_access_user_id, external_login, email, page_access_group_ids)

Update page access user

Warnings

TODO: Fields that can be updated are undocumented as well as their descriptions.

Parameters

page_id : str Your page unique ID page_access_user_id : str Page Access User Identifier external_login : str IDP login user id. Key is typically "uid". email : str Email address page_access_group_ids : list[str] Group IDs

Notes

See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdPageAccessUsersPageAccessUserId

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
def page_set_access_user(self, page_id, page_access_user_id, external_login, email, page_access_group_ids):
    """
    Update page access user

    Warnings
    --------
    TODO: Fields that can be updated are undocumented as well as their descriptions.

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page_access_user_id : str
        Page Access User Identifier
    external_login : str
        IDP login user id. Key is typically "uid".
    email : str
        Email address
    page_access_group_ids : list[str]
        Group IDs

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdPageAccessUsersPageAccessUserId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/page_access_users/{}".format(page_id, page_access_user_id)
    return self.patch(
        url, data={"external_login": external_login, "email": email, "page_access_group_ids": page_access_group_ids}
    )

page_unsubscribe_incident_subscriber(page_id, incident_id, subscriber_id)

Unsubscribe a subscriber from an incident

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID subscriber_id : str The subscriber unique ID

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
def page_unsubscribe_incident_subscriber(self, page_id, incident_id, subscriber_id):
    """
    Unsubscribe a subscriber from an incident

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID
    subscriber_id : str
        The subscriber unique ID

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/subscribers/{}".format(page_id, incident_id, subscriber_id)
    return self.delete(url)

page_unsubscribe_subscriber(page_id, subscriber_id, skip_unsubscription_notifications=False)

Unsubscribe a subscriber

Parameters

page_id : str Your page unique ID subscriber_id : str Subscriber identifier skip_unsubscription_notifications : bool If true, the subscriber will not receive an email notification when they are unsubscribed.

Notes

See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdSubscribersSubscriberId

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
def page_unsubscribe_subscriber(self, page_id, subscriber_id, skip_unsubscription_notifications=False):
    """
    Unsubscribe a subscriber

    Parameters
    ----------
    page_id : str
        Your page unique ID
    subscriber_id : str
        Subscriber identifier
    skip_unsubscription_notifications : bool
        If true, the subscriber will not receive an email notification when they are unsubscribed.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/deletePagesPageIdSubscribersSubscriberId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers/{}".format(page_id, subscriber_id)
    return self.delete(url, params={"skip_unsubscription_notifications": skip_unsubscription_notifications})

page_unsubscribe_subscribers(page_id, subscriber_ids, subscriber_type, skip_unsubscription_notification=False)

Unsubscribe a list of subscribers

Parameters

page_id : str Your page unique ID subscriber_ids : str | list[str] The array of subscriber codes to unsubscribe (limited to 100), or "all" to unsubscribe all subscribers if the number of subscribers is less than 100. subscriber_type : SubscriberType If this is present, only unsubscribe subscribers of this type. skip_unsubscription_notification : bool If this is true, do not send an unsubscription notification to the subscriber.

Notes

See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersUnsubscribe

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
def page_unsubscribe_subscribers(
    self, page_id, subscriber_ids, subscriber_type, skip_unsubscription_notification=False
):
    """
    Unsubscribe a list of subscribers

    Parameters
    ----------
    page_id : str
        Your page unique ID
    subscriber_ids : str | list[str]
        The array of subscriber codes to unsubscribe (limited to 100),
        or "all" to unsubscribe all subscribers if the number of subscribers is less than 100.
    subscriber_type : SubscriberType
        If this is present, only unsubscribe subscribers of this type.
    skip_unsubscription_notification : bool
        If this is true, do not send an unsubscription notification to the subscriber.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/postPagesPageIdSubscribersUnsubscribe

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers/unsubscribe".format(page_id)
    return self.post(
        url,
        data={
            "subscribers": subscriber_ids,
            "type": subscriber_type,
            "skip_unsubscription_notification": skip_unsubscription_notification,
        },
    )

page_update(page_id, page)

Update a page

Parameters

page_id : str Your page unique ID page : dict[str,any] Your page values that you want to change

Raises

requests.exceptions.HTTPError Use json.loads(exception.response.content) to get API error info

Notes

Available fields: https://developer.statuspage.io/#operation/patchPagesPageId

Description of fields:

str

The name of your page

Returns

any

Source code in server/vendor/atlassian/statuspage.py
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
def page_update(self, page_id, page):
    """
    Update a page

    Parameters
    ----------
    page_id : str
        Your page unique ID
    page : dict[str,any]
        Your page values that you want to change

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exception.response.content)` to get API error info

    Notes
    -----
    Available fields: https://developer.statuspage.io/#operation/patchPagesPageId

    Description of fields:

    name : str
        The name of your page

    Returns
    -------
    any
    """
    url = "v1/pages/{}".format(page_id)
    return self.patch(url, data={"page": page})

page_update_component(page_id, component_id, component)

Update a component

Warnings

If "group_id" is Null then the component will be removed from a group

Parameters

page_id : str Your page unique ID component_id : str The component unique ID component : dict[str, any] The component to update Available fields: "name", "description", "status", "group_id", "showcase", "only_show_if_degraded", and "start_date"

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdComponentsComponentId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
def page_update_component(self, page_id, component_id, component):
    """
    Update a component

    Warnings
    --------
    If "group_id" is Null then the component will be removed from a group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_id : str
        The component unique ID
    component : dict[str, any]
        The component to update
        Available fields: "name", "description", "status", "group_id", "showcase", "only_show_if_degraded",
        and "start_date"

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdComponentsComponentId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/components/{}".format(page_id, component_id)
    return self.patch(url, data={"component": component})

page_update_component_group(page_id, component_group_id, description, component_group)

Update a component group

Parameters

page_id : str Your page unique ID component_group_id : str Component group identifier description : str The description of the component group component_group : dict[str, any] The components to update Available fields: "name", "components" (array of strings)

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdComponentGroupsId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
def page_update_component_group(self, page_id, component_group_id, description, component_group):
    """
    Update a component group

    Parameters
    ----------
    page_id : str
        Your page unique ID
    component_group_id : str
        Component group identifier
    description : str
        The description of the component group
    component_group : dict[str, any]
        The components to update
        Available fields: "name", "components" (array of strings)

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdComponentGroupsId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/component_groups/{}".format(page_id, component_group_id)
    return self.patch(url, data={"description": description, "component_group": component_group})

page_update_embed_config_settings(page_id, status_embed_config)

Update status embed config settings

Parameters

page_id : str Your page unique ID status_embed_config : dict[str, any]

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Examples

client = StatusPage(url="https://api.statuspage.io", token="YOUR-TOKEN") client.page_update_embed_config_settings( ... "PAGE-ID", ... { ... "position": "string", ... "incident_background_color": "string", ... "incident_text_color": "string", ... "maintenance_background_color": "string", ... "maintenance_text_color": "string" ... } ... )

Notes

See available fields: https://developer.statuspage.io/#operation/putPagesPageIdStatusEmbedConfig

Returns

any

Source code in server/vendor/atlassian/statuspage.py
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
def page_update_embed_config_settings(self, page_id, status_embed_config):
    """
    Update status embed config settings

    Parameters
    ----------
    page_id : str
        Your page unique ID
    status_embed_config : dict[str, any]

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Examples
    --------
    >>> client = StatusPage(url="https://api.statuspage.io", token="YOUR-TOKEN")
    >>> client.page_update_embed_config_settings(
    ...    "PAGE-ID",
    ...     {
    ...         "position": "string",
    ...         "incident_background_color": "string",
    ...         "incident_text_color": "string",
    ...         "maintenance_background_color": "string",
    ...         "maintenance_text_color": "string"
    ...     }
    ... )

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/putPagesPageIdStatusEmbedConfig

    Returns
    -------
    any
    """
    url = "v1/pages/{}/status_embed_config".format(page_id)
    return self.patch(url, status_embed_config)

page_update_incident(page_id, incident_id, incident)

Update an incident

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID incident : dict[str, any] The incident data to update

Notes

See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdIncidentsIncidentId

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
def page_update_incident(self, page_id, incident_id, incident):
    """
    Update an incident

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID
    incident : dict[str, any]
        The incident data to update

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdIncidentsIncidentId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}".format(page_id, incident_id)
    return self.patch(url, data={"incident": incident})

page_update_incident_updates(page_id, incident_id, incident_update_id, incident_update)

Update a previous incident update

Parameters

page_id : str Your page unique ID incident_id : str The incident unique ID incident_update_id : str The incident update unique ID incident_update : dict[str, any] The incident update data to update

Notes

See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdIncidentsIncidentIdIncidentUpdatesIncidentUpdateId

noqa: E501

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
def page_update_incident_updates(self, page_id, incident_id, incident_update_id, incident_update):
    """
    Update a previous incident update

    Parameters
    ----------
    page_id : str
        Your page unique ID
    incident_id : str
        The incident unique ID
    incident_update_id : str
        The incident update unique ID
    incident_update : dict[str, any]
        The incident update data to update

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdIncidentsIncidentIdIncidentUpdatesIncidentUpdateId
    # noqa: E501

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/incidents/{}/incidents_update/{}".format(page_id, incident_id, incident_update_id)
    return self.patch(url, data={"incident_update": incident_update})

page_update_metric(page_id, metric_id, metric)

Update a metric

Parameters

page_id : str Your page unique ID metric_id : str Metric identifier metric : dict[str, any] The metric to update

Available fields in metric: "name", "metric_identifier"
"name" - Name of metric,
"metric_identifier" - Metric Display identifier used to look up the metric data from the provider
Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdMetricsMetricId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
def page_update_metric(self, page_id, metric_id, metric):
    """
    Update a metric

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_id : str
        Metric identifier
    metric : dict[str, any]
        The metric to update

        Available fields in metric: "name", "metric_identifier"
        "name" - Name of metric,
        "metric_identifier" - Metric Display identifier used to look up the metric data from the provider

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdMetricsMetricId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics/{}".format(page_id, metric_id)
    return self.patch(url, data={"metric": metric})

page_update_metric_data(page_id, metric_id, metric)

Update metric data

Parameters

page_id : str Your page unique ID metric_id : str Metric identifier metric : dict[str, any] The metric to update

Available fields in metric: "name", "metric_identifier"
"name" - Name of metric,
"metric_identifier" - Metric Display identifier used to look up the metric data from the provider
Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdMetricsMetricId

Returns

any

Source code in server/vendor/atlassian/statuspage.py
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
def page_update_metric_data(self, page_id, metric_id, metric):
    """
    Update metric data

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_id : str
        Metric identifier
    metric : dict[str, any]
        The metric to update

        Available fields in metric: "name", "metric_identifier"
        "name" - Name of metric,
        "metric_identifier" - Metric Display identifier used to look up the metric data from the provider

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdMetricsMetricId

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics/{}".format(page_id, metric_id)
    return self.patch(url, data={"metric": metric})

page_update_metric_provider(page_id, metric_provider_id, metric_provider)

Update a metric provider

Parameters

page_id : str Your page unique ID metric_provider_id : str Metric provider identifier metric_provider : dict[str, any] Metric provider to update

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Notes

See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProvidersMetricsProviderId

Available fields in metric_provider: "type", "metric_base_uri"

Descriptions of the fields that can be added to the metric_provider

"type" - The type of metrics provider. See MetricProviderType enum for available values

"metric_base_uri" - The base URI for the metrics provider. Required by the Datadog and NewRelic type metrics providers.

Returns

any

Source code in server/vendor/atlassian/statuspage.py
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
def page_update_metric_provider(self, page_id, metric_provider_id, metric_provider):
    """
    Update a metric provider

    Parameters
    ----------
    page_id : str
        Your page unique ID
    metric_provider_id : str
        Metric provider identifier
    metric_provider : dict[str, any]
        Metric provider to update


    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/getPagesPageIdMetricsProvidersMetricsProviderId

    Available fields in metric_provider: "type", "metric_base_uri"

    Descriptions of the fields that can be added to the metric_provider:
        "type" - The type of metrics provider. See MetricProviderType enum for available values

        "metric_base_uri" - The base URI for the metrics provider.
        Required by the Datadog and NewRelic type metrics providers.

    Returns
    -------
    any
    """
    url = "v1/pages/{}/metrics_providers/{}".format(page_id, metric_provider_id)
    return self.patch(url, data={"metric_provider": metric_provider})

page_update_subscriber(page_id, subscriber_id, component_ids)

Update a subscriber

Parameters

page_id : str Your page unique ID subscriber_id : str Subscriber identifier component_ids : list[str] A list of component ids for which the subscriber should receive updates for. Components must be an array with at least one element if it is passed at all. Each component must belong to the page indicated in the path. To set the subscriber to be subscribed to all components on the page, exclude this parameter.

Notes

See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdSubscribersSubscriberId

Raises

requests.exceptions.HTTPError Use json.loads(exceptions.response.content) to get API error info

Returns

any

Source code in server/vendor/atlassian/statuspage.py
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
def page_update_subscriber(self, page_id, subscriber_id, component_ids):
    """
    Update a subscriber

    Parameters
    ----------
    page_id : str
        Your page unique ID
    subscriber_id : str
        Subscriber identifier
    component_ids : list[str]
        A list of component ids for which the subscriber should receive updates for.
        Components must be an array with at least one element if it is passed at all.
        Each component must belong to the page indicated in the path.
        To set the subscriber to be subscribed to all components on the page, exclude this parameter.

    Notes
    -----
    See available fields: https://developer.statuspage.io/#operation/patchPagesPageIdSubscribersSubscriberId

    Raises
    ------
    requests.exceptions.HTTPError
        Use `json.loads(exceptions.response.content)` to get API error info

    Returns
    -------
    any
    """
    url = "v1/pages/{}/subscribers/{}".format(page_id, subscriber_id)
    return self.patch(url, data={"component_ids": component_ids})

SubscriberState

Bases: Enum

The state of the subscriber

Source code in server/vendor/atlassian/statuspage.py
28
29
30
31
32
33
34
class SubscriberState(Enum):
    """The state of the subscriber"""

    ACTIVE = "active"
    PENDING = "pending"
    QUARANTINED = "quarantined"
    ALL = "all"

SubscriberType

Bases: Enum

The type of subscriber

Source code in server/vendor/atlassian/statuspage.py
18
19
20
21
22
23
24
25
class SubscriberType(Enum):
    """The type of subscriber"""

    EMAIL = "email"
    SMS = "sms"
    WEBHOOK = "webhook"
    SLACK = "slack"
    INTEGRATION_PARTNER = "integration_partner"

Transform

Bases: Enum

The transform to apply to the metric

Source code in server/vendor/atlassian/statuspage.py
88
89
90
91
92
93
94
95
class Transform(Enum):
    """The transform to apply to the metric"""

    AVERAGE = "average"
    COUNT = "count"
    MAX = "max"
    MIN = "min"
    SUM = "sum"