New Apollo APIs for Bouw7 (Exact Online Bouw)

Add driver for the Apollo APIs on Bouw7 (see Apollo General: What is apollo).

Retrieval of data through the Apollo APIs is already possible through the Bouw7 Heimdall-driver.

Example Projects using Apollo

Use for instance the following query to retrieve the Projects created after January 2022:

insert into Bouw7.Native.NATIVEPLATFORMSCALARREQUESTS
( url
, HTTP_METHOD
, HTTP_DISK_CACHE_USE
, HTTP_DISK_CACHE_SAVE
, HTTP_DISK_CACHE_MAX_AGE_SEC
)
select 'https://apollo.bouw7.nl/search/projects?q=' || urlencode('createdAt > @("jan. 2022 at 15:30")')
,      'GET'
,      true
,      true
,      3600 * 20 /* 20 hours cache */

--
-- Retrieve metadata.
--
select jte.*
from   Bouw7.Native.NATIVEPLATFORMSCALARREQUESTS npt
join   jsontable
       ( '__metadata'
         passing npt.result_text
         columns metaQueryUserInput        varchar2 not null path 'query.userInput'
         ,       metaQueryNormalized       varchar2 not null path 'query.normalized'
         ,       metaPageCurrent           int      not null path 'page.current'
         ,       metaPageTotal             int      not null path 'page.total'
         ,       metaLinkPrev              varchar2     null path 'link.prev'
         ,       metaLinkNext              varchar2     null path 'link.next'
         ,       metaRowsTotal             int      not null path 'rows.total'
         ,       metaRowsPerPage           int      not null path 'rows.perPage'
         ,       metaRowsOffset            int      not null path 'rows.offset'
         ,       metaPerformanceParseQuery varchar2 not null path 'performance.parse-query'
         ,       metaPerformanceGFetchList varchar2 not null path 'performance.fetch-global-id-list'
         ,       metaPerformanceSFetchPage varchar2 not null path 'performance.fetch-single-page-result'
         ,       metaPerformanceHydrateObj varchar2 not null path 'performance.hydrate-objects'
       ) jte

--
-- Retrieve project information.
--
select jte.*
from   Bouw7.Native.NATIVEPLATFORMSCALARREQUESTS npt
join   jsontable
       ( 'items[*]'
         passing npt.result_text
         columns id                        int      not null path 'id'
         ,       name                      varchar2 not null path 'name'
         ,       number                    varchar2 not null path 'number'
         ,       reference                 varchar2     null path 'reference'
         ,       streetName                varchar2     null path 'streetName'
         ,       zipCode                   varchar2     null path 'zipCode'
         ,       city                      varchar2     null path 'city'
         ,       country                   varchar2     null path 'country'
         ,       startDate                 date         null path 'startDate'
         ,       endDate                   date         null path 'endDate'
         ,       deliveryDate              date         null path 'deliveryDate'
         ,       additionalWork            number       null path 'additionalWork'
         ,       fixedPrice                number       null path 'fixedPrice'
         ,       createdAt                 datetime     null path 'createdAt'
         ,       updatedAt                 datetime     null path 'updatedAt'
         ,       categoryId                varchar2     null path 'category.id'
         ,       categoryName              varchar2     null path 'category.name'
         ,       categoryCode              varchar2     null path 'category.code'
         ,       divisionId                varchar2     null path 'division.id'
         ,       divisionName              varchar2     null path 'division.name'
         ,       eolDivisionCode           int          null path 'division.exactOnlineDivisionId'
       ) jte

Example Plan Items using Apollo

Use for instance the following query to retrieve the first 1.000 plan items:

insert into Bouw7.Native.NATIVEPLATFORMSCALARREQUESTS
( url
, HTTP_METHOD
, HTTP_DISK_CACHE_USE
, HTTP_DISK_CACHE_SAVE
, HTTP_DISK_CACHE_MAX_AGE_SEC
)
select 'https://apollo.bouw7.nl/search/plan-items'
,      'GET'
,      true
,      true
,      3600 * 20 /* 20 hours cache */

--
-- Retrieve plan-items information.
--
select jte.*
from   Bouw7.Native.NATIVEPLATFORMSCALARREQUESTS npt
join   jsontable
       ( 'items[*]'
         passing npt.result_text
         columns id                          int      not null path 'id'
         ,       name                        varchar2 not null path 'name'
         ,       startDate                   date         null path 'startDate'
         ,       endDate                     date         null path 'endDate'
         ,       hours                       number       null path 'hours'
         ,       requisite                   number       null path 'requisite'
         ,       remark                      varchar2     null path 'remark'
         ,       color                       varchar2     null path 'color'
         ,       createdAt                   datetime     null path 'createdAt'
         ,       updatedAt                   datetime     null path 'updatedAt'
         ,       isProcessed                 boolean      null path 'isProcessed'
         ,       projectId                   int          null path 'project.id'
         ,       projectName                 varchar2     null path 'project.name'
         ,       planningLinkId              int          null path 'securityPlanningLink.id'
         ,       planningLinkCodeName        varchar2     null path 'securityPlanningLink.securityCode.name'
         ,       planningLinkCodeCode        varchar2     null path 'securityPlanningLink.securityCode.code'
         ,       planningLinkCodeChapterId   int          null path 'securityPlanningLink.securityCode.chapter.id'
         ,       planningLinkCodeChapterName varchar2     null path 'securityPlanningLink.securityCode.chapter.name'
         ,       planningLinkCodeChapterCode varchar2     null path 'securityPlanningLink.securityCode.chapter.code'
       ) jte