<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.22.2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>447</ContextCount>
  <ElementCount>459</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>110</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>9</UnitCount>
  <MyReports>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>100000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>100010 - Statement - Condensed Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_StatementCondensedConsolidatedBalanceSheets</Role>
      <ShortName>Condensed Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100060 - Statement - Condensed Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_StatementCondensedConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Condensed Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100080 - Statement - Condensed Consolidated Statements of Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_StatementCondensedConsolidatedStatementsOfOperations</Role>
      <ShortName>Condensed Consolidated Statements of Operations</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100090 - Statement - Condensed Consolidated Statements of Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_StatementCondensedConsolidatedStatementsOfComprehensiveIncomeLoss</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100100 - Statement - Condensed Consolidated Statements of Comprehensive Income (Loss) (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_StatementCondensedConsolidatedStatementsOfComprehensiveIncomeLossParenthetical</Role>
      <ShortName>Condensed Consolidated Statements of Comprehensive Income (Loss) (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>100110 - Statement - Condensed Consolidated Statements of Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_StatementCondensedConsolidatedStatementsOfShareholdersEquity</Role>
      <ShortName>Condensed Consolidated Statements of Shareholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>100120 - Statement - Condensed Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_StatementCondensedConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Condensed Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>100130 - Disclosure - Nature of Business</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureNatureOfBusiness</Role>
      <ShortName>Nature of Business</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>100140 - Disclosure - Basis of Presentation and Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureBasisOfPresentationAndSignificantAccountingPolicies</Role>
      <ShortName>Basis of Presentation and Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>100150 - Disclosure - Recent Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureRecentAccountingPronouncements</Role>
      <ShortName>Recent Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>100160 - Disclosure - Business Combinations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureBusinessCombinations</Role>
      <ShortName>Business Combinations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>100170 - Disclosure - Restructuring</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureRestructuring</Role>
      <ShortName>Restructuring</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>100190 - Disclosure - Net Revenues</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureNetRevenues</Role>
      <ShortName>Net Revenues</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>100200 - Disclosure - Goodwill and Intangibles</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureGoodwillAndIntangibles</Role>
      <ShortName>Goodwill and Intangibles</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>100210 - Disclosure - Fair Value of Financial Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureFairValueOfFinancialInstruments</Role>
      <ShortName>Fair Value of Financial Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>100220 - Disclosure - Derivatives</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureDerivatives</Role>
      <ShortName>Derivatives</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>100230 - Disclosure - Property and Equipment, Net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosurePropertyAndEquipmentNet</Role>
      <ShortName>Property and Equipment, Net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>100240 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureLeases1</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>100250 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureDebt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>100260 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>100270 - Disclosure - Employee Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureEmployeeBenefitPlans</Role>
      <ShortName>Employee Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>100280 - Disclosure - Pension</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePension</Role>
      <ShortName>Pension</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>100300 - Disclosure - Related-Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureRelatedPartyTransactions</Role>
      <ShortName>Related-Party Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>100310 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>100330 - Disclosure - Shareholders' Equity and Redeemable Convertible Preferred Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureShareholdersEquityAndRedeemableConvertiblePreferredStock</Role>
      <ShortName>Shareholders' Equity and Redeemable Convertible Preferred Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>100340 - Disclosure - Share-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureSharebasedCompensation</Role>
      <ShortName>Share-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>100350 - Disclosure - Earnings (Loss) Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureEarningsLossPerShare</Role>
      <ShortName>Earnings (Loss) Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>100360 - Disclosure - Segment Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureSegmentInformation</Role>
      <ShortName>Segment Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>100380 - Disclosure - Basis of Presentation and Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureBasisOfPresentationAndSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Basis of Presentation and Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureBasisOfPresentationAndSignificantAccountingPolicies</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>100390 - Disclosure - Business Combinations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureBusinessCombinationsTables</Role>
      <ShortName>Business Combinations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureBusinessCombinations</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>100400 - Disclosure - Restructuring (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureRestructuringTables</Role>
      <ShortName>Restructuring (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureRestructuring</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>100420 - Disclosure - Net Revenues (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureNetRevenuesTables</Role>
      <ShortName>Net Revenues (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureNetRevenues</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>100430 - Disclosure - Goodwill and Intangibles (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureGoodwillAndIntangiblesTables</Role>
      <ShortName>Goodwill and Intangibles (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureGoodwillAndIntangibles</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>100440 - Disclosure - Fair Value of Financial Instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureFairValueOfFinancialInstrumentsTables</Role>
      <ShortName>Fair Value of Financial Instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureFairValueOfFinancialInstruments</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>100450 - Disclosure - Property and Equipment, Net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosurePropertyAndEquipmentNetTables</Role>
      <ShortName>Property and Equipment, Net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosurePropertyAndEquipmentNet</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>100460 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureLeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureLeases1</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>100470 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureDebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureDebt</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>100480 - Disclosure - Pension (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePensionTables</Role>
      <ShortName>Pension (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePension</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>100510 - Disclosure - Share-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureSharebasedCompensationTables</Role>
      <ShortName>Share-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureSharebasedCompensation</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>100520 - Disclosure - Earnings (Loss) Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureEarningsLossPerShareTables</Role>
      <ShortName>Earnings (Loss) Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureEarningsLossPerShare</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>100530 - Disclosure - Segment Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureSegmentInformationTables</Role>
      <ShortName>Segment Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureSegmentInformation</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>100540 - Disclosure - Nature of Business - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureNatureOfBusinessAdditionalInformationDetail</Role>
      <ShortName>Nature of Business - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>100550 - Disclosure - Basis of Presentation and Significant Accounting Policies - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureBasisOfPresentationAndSignificantAccountingPoliciesAdditionalInformationDetail</Role>
      <ShortName>Basis of Presentation and Significant Accounting Policies - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>100570 - Disclosure - Business Combinations - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureBusinessCombinationsAdditionalInformationDetail</Role>
      <ShortName>Business Combinations - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>100580 - Disclosure - Business Combinations - Summary of Preliminary Fair Value of Consideration of Assets Acquired and Liabilities Assumed (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureBusinessCombinationsSummaryOfPreliminaryFairValueOfConsiderationOfAssetsAcquiredAndLiabilitiesAssumedDetail</Role>
      <ShortName>Business Combinations - Summary of Preliminary Fair Value of Consideration of Assets Acquired and Liabilities Assumed (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>100590 - Disclosure - Business Combinations - Summary of Preliminary Fair Value of Identifiable Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureBusinessCombinationsSummaryOfPreliminaryFairValueOfIdentifiableIntangibleAssetsDetail</Role>
      <ShortName>Business Combinations - Summary of Preliminary Fair Value of Identifiable Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>100600 - Disclosure - Business Combinations - Summary of Company's Operating Results of Acquisition and Related Finance (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureBusinessCombinationsSummaryOfCompanysOperatingResultsOfAcquisitionAndRelatedFinanceDetail</Role>
      <ShortName>Business Combinations - Summary of Company's Operating Results of Acquisition and Related Finance (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>100610 - Disclosure - Restructuring (Additional Information) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureRestructuringAdditionalInformationDetails</Role>
      <ShortName>Restructuring (Additional Information) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureRestructuringTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>100620 - Disclosure - Restructuring - Summary of Restructuring Program (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureRestructuringSummaryOfRestructuringProgramDetails</Role>
      <ShortName>Restructuring - Summary of Restructuring Program (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>100650 - Disclosure - Net Revenues - Summary of Disaggregated Net Revenues (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureNetRevenuesSummaryOfDisaggregatedNetRevenuesDetail</Role>
      <ShortName>Net Revenues - Summary of Disaggregated Net Revenues (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>100660 - Disclosure - Net Revenues - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureNetRevenuesAdditionalInformationDetail</Role>
      <ShortName>Net Revenues - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>100670 - Disclosure - Net Revenues - Additional Information (Details1)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureNetRevenuesAdditionalInformationDetails1</Role>
      <ShortName>Net Revenues - Additional Information (Details1)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>100680 - Disclosure - Net Revenues - Summary of Accounts Receivable, Net of Allowances, Contract Assets and Contract Liabilities from Contracts with Customer (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureNetRevenuesSummaryOfAccountsReceivableNetOfAllowancesContractAssetsAndContractLiabilitiesFromContractsWithCustomerDetail</Role>
      <ShortName>Net Revenues - Summary of Accounts Receivable, Net of Allowances, Contract Assets and Contract Liabilities from Contracts with Customer (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>100690 - Disclosure - Goodwill and Intangibles - Summary of Changes In Carrying Amounts of Goodwill By Reportable Segments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureGoodwillAndIntangiblesSummaryOfChangesInCarryingAmountsOfGoodwillByReportableSegmentsDetail</Role>
      <ShortName>Goodwill and Intangibles - Summary of Changes In Carrying Amounts of Goodwill By Reportable Segments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>100710 - Disclosure - Goodwill and Intangibles - Summary of Identifiable Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureGoodwillAndIntangiblesSummaryOfIdentifiableIntangibleAssetsDetail</Role>
      <ShortName>Goodwill and Intangibles - Summary of Identifiable Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>100720 - Disclosure - Goodwill and Intangibles - Summary of Amortization Expense Recognized on Intangible Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureGoodwillAndIntangiblesSummaryOfAmortizationExpenseRecognizedOnIntangibleAssetsDetail</Role>
      <ShortName>Goodwill and Intangibles - Summary of Amortization Expense Recognized on Intangible Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>100730 - Disclosure - Fair Value of Financial Instruments - Summary of Fair Value Measurement Assets and Liabilities Measured on Recurring Basis (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureFairValueOfFinancialInstrumentsSummaryOfFairValueMeasurementAssetsAndLiabilitiesMeasuredOnRecurringBasisDetail</Role>
      <ShortName>Fair Value of Financial Instruments - Summary of Fair Value Measurement Assets and Liabilities Measured on Recurring Basis (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>100740 - Disclosure - Fair Value of Financial Instruments - Summary of Reconciliation of Fair Value of Contingent Consideration Obligations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureFairValueOfFinancialInstrumentsSummaryOfReconciliationOfFairValueOfContingentConsiderationObligationsDetail</Role>
      <ShortName>Fair Value of Financial Instruments - Summary of Reconciliation of Fair Value of Contingent Consideration Obligations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>100750 - Disclosure - Fair Value of Financial Instruments - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureFairValueOfFinancialInstrumentsAdditionalInformationDetail</Role>
      <ShortName>Fair Value of Financial Instruments - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>100760 - Disclosure - Fair Value of Financial Instruments - Summary of Carrying And Fair Value Of Non-Variable Interest Rate Debt (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureFairValueOfFinancialInstrumentsSummaryOfCarryingAndFairValueOfNonVariableInterestRateDebtDetail</Role>
      <ShortName>Fair Value of Financial Instruments - Summary of Carrying And Fair Value Of Non-Variable Interest Rate Debt (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>100770 - Disclosure - Fair Value of Financial Instruments - Summary of Carrying And Fair Value Of Non-Variable Interest Rate Debt (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureFairValueOfFinancialInstrumentsSummaryOfCarryingAndFairValueOfNonvariableInterestRateDebtParentheticalDetail</Role>
      <ShortName>Fair Value of Financial Instruments - Summary of Carrying And Fair Value Of Non-Variable Interest Rate Debt (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>100780 - Disclosure - Derivatives - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureDerivativesAdditionalInformationDetail</Role>
      <ShortName>Derivatives - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>100790 - Disclosure - Property and Equipment, Net - Summary of Components of Property and Equipment (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosurePropertyAndEquipmentNetSummaryOfComponentsOfPropertyAndEquipmentDetail</Role>
      <ShortName>Property and Equipment, Net - Summary of Components of Property and Equipment (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>100800 - Disclosure - Property and Equipment, Net - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosurePropertyAndEquipmentNetAdditionalInformationDetail</Role>
      <ShortName>Property and Equipment, Net - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>100810 - Disclosure - Leases - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureLeasesAdditionalInformationDetail</Role>
      <ShortName>Leases - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>100820 - Disclosure - Leases - Schedule of Future Undiscounted Cash Flows and Reconciliation to the Lease Liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureLeasesScheduleOfFutureUndiscountedCashFlowsAndReconciliationToTheLeaseLiabilitiesDetail</Role>
      <ShortName>Leases - Schedule of Future Undiscounted Cash Flows and Reconciliation to the Lease Liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>100830 - Disclosure - Schedule of Supplemental Unaudited Condensed Consolidated Balance Sheets Information Related to Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureScheduleOfSupplementalUnauditedCondensedConsolidatedBalanceSheetsInformationRelatedToLeasesDetail</Role>
      <ShortName>Schedule of Supplemental Unaudited Condensed Consolidated Balance Sheets Information Related to Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>100840 - Disclosure - Debt - Summary of Debt Obligations (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureDebtSummaryOfDebtObligationsDetail</Role>
      <ShortName>Debt - Summary of Debt Obligations (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>100850 - Disclosure - Debt - Summary of Debt Obligations (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureDebtSummaryOfDebtObligationsParentheticalDetail</Role>
      <ShortName>Debt - Summary of Debt Obligations (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>100860 - Disclosure - Debt - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureDebtAdditionalInformationDetail</Role>
      <ShortName>Debt - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>100870 - Disclosure - Debt - Schedule of Annual Maturities, Excluding Amortization of Debt Issuance Costs (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureDebtScheduleOfAnnualMaturitiesExcludingAmortizationOfDebtIssuanceCostsDetail</Role>
      <ShortName>Debt - Schedule of Annual Maturities, Excluding Amortization of Debt Issuance Costs (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>100880 - Disclosure - Income Taxes - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureIncomeTaxesAdditionalInformationDetail</Role>
      <ShortName>Income Taxes - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>100890 - Disclosure - Employee Benefit Plans - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureEmployeeBenefitPlansAdditionalInformationDetail</Role>
      <ShortName>Employee Benefit Plans - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>100900 - Disclosure - Pension - Schedule of Preliminary Valuation of Pension Plans in Purchase Price Allocation (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePensionScheduleOfPreliminaryValuationOfPensionPlansInPurchasePriceAllocationDetail</Role>
      <ShortName>Pension - Schedule of Preliminary Valuation of Pension Plans in Purchase Price Allocation (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>100910 - Disclosure - Pension - Summary of Supplemental Condensed Consolidated Balance Sheets Information Related to Pension (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePensionSummaryOfSupplementalCondensedConsolidatedBalanceSheetsInformationRelatedToPensionDetail</Role>
      <ShortName>Pension - Summary of Supplemental Condensed Consolidated Balance Sheets Information Related to Pension (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>100920 - Disclosure - Pension - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePensionAdditionalInformationDetail</Role>
      <ShortName>Pension - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>100930 - Disclosure - Pension - Information for Pension Plans with Accumulated Benefit Obligations in Excess of Plan Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePensionInformationForPensionPlansWithAccumulatedBenefitObligationsInExcessOfPlanAssetsDetail</Role>
      <ShortName>Pension - Information for Pension Plans with Accumulated Benefit Obligations in Excess of Plan Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>100940 - Disclosure - Pension - Information for Pension Plans with Projected Benefit Obligations in Excess of Plan Assets (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePensionInformationForPensionPlansWithProjectedBenefitObligationsInExcessOfPlanAssetsDetail</Role>
      <ShortName>Pension - Information for Pension Plans with Projected Benefit Obligations in Excess of Plan Assets (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>100950 - Disclosure - Pension - Components of Net Periodic Pension Benefit (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePensionComponentsOfNetPeriodicPensionBenefitDetail</Role>
      <ShortName>Pension - Components of Net Periodic Pension Benefit (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>100970 - Disclosure - Pension - Major Assumptions Used to Determine Benefit Obligation (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePensionMajorAssumptionsUsedToDetermineBenefitObligationDetail</Role>
      <ShortName>Pension - Major Assumptions Used to Determine Benefit Obligation (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>100980 - Disclosure - Pension - Summary of Fair Value of Pension Plan Assets by Asset Category (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosurePensionSummaryOfFairValueOfPensionPlanAssetsByAssetCategoryDetail</Role>
      <ShortName>Pension - Summary of Fair Value of Pension Plan Assets by Asset Category (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>100990 - Disclosure - Other Noncurrent Liabilities - Summary of Other Noncurrent Liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureOtherNoncurrentLiabilitiesSummaryOfOtherNoncurrentLiabilitiesDetail</Role>
      <ShortName>Other Noncurrent Liabilities - Summary of Other Noncurrent Liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>101000 - Disclosure - Other Noncurrent Liabilities - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureOtherNoncurrentLiabilitiesAdditionalInformationDetail</Role>
      <ShortName>Other Noncurrent Liabilities - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>101010 - Disclosure - Related-Party Transactions - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureRelatedPartyTransactionsAdditionalInformationDetail</Role>
      <ShortName>Related-Party Transactions - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>101020 - Disclosure - Commitments and Contingencies (Additional Information) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureCommitmentsAndContingenciesAdditionalInformationDetail</Role>
      <ShortName>Commitments and Contingencies (Additional Information) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>86</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>101040 - Disclosure - Shareholders' Equity and Redeemable Convertible Preferred Stock - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureShareholdersEquityAndRedeemableConvertiblePreferredStockAdditionalInformationDetail</Role>
      <ShortName>Shareholders' Equity and Redeemable Convertible Preferred Stock - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>101050 - Disclosure - Share-Based Compensation - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureSharebasedCompensationAdditionalInformationDetails</Role>
      <ShortName>Share-Based Compensation - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>101060 - Disclosure - Share-Based Compensation - Summary of Valuation Assumptions (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/DisclosureSharebasedCompensationSummaryOfValuationAssumptionsDetail</Role>
      <ShortName>Share-Based Compensation - Summary of Valuation Assumptions (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>101070 - Disclosure - Earnings (Loss) Per Share - Summary of Computation Earnings (Loss) Per Common Share Using Two Class Method (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureEarningsLossPerShareSummaryOfComputationEarningsLossPerCommonShareUsingTwoClassMethodDetail</Role>
      <ShortName>Earnings (Loss) Per Share - Summary of Computation Earnings (Loss) Per Common Share Using Two Class Method (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureEarningsLossPerShareTables</ParentRole>
      <Position>90</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>101080 - Disclosure - Earnings (Loss) Per Share - Summary of Computation Earnings (Loss) Per Common Share Using Two Class Method (Parenthetical) (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureEarningsLossPerShareSummaryOfComputationEarningsLossPerCommonShareUsingTwoClassMethodParentheticalDetail</Role>
      <ShortName>Earnings (Loss) Per Share - Summary of Computation Earnings (Loss) Per Common Share Using Two Class Method (Parenthetical) (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureEarningsLossPerShareTables</ParentRole>
      <Position>91</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>101090 - Disclosure - Segment Information - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureSegmentInformationAdditionalInformationDetail</Role>
      <ShortName>Segment Information - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="apg-20220630.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>101100 - Disclosure - Segment Information - Summary of Reconciliation Operating Income to EBITDA (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.apigroupinc.com/20220630/taxonomy/role/Role_DisclosureSegmentInformationSummaryOfReconciliationOperatingIncomeToEBITDADetail</Role>
      <ShortName>Segment Information - Summary of Reconciliation Operating Income to EBITDA (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-Q" original="apg-20220630.htm">apg-20220630.htm</File>
    <File>apg-20220630.xsd</File>
    <File>apg-20220630_cal.xml</File>
    <File>apg-20220630_def.xml</File>
    <File>apg-20220630_lab.xml</File>
    <File>apg-20220630_pre.xml</File>
    <File>apg-ex31_1.htm</File>
    <File>apg-ex31_2.htm</File>
    <File>apg-ex32_1.htm</File>
    <File>apg-ex32_2.htm</File>
    <File>apg-ex95_1.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="1150">http://fasb.org/us-gaap/2022</BaseTaxonomy>
    <BaseTaxonomy items="29">http://xbrl.sec.gov/dei/2022</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
