Yoobi connector for Power BI

Add a driver for Yoobi to Invantive Cloud or Data Replicator.

Yoobi is used by accounting firms for hour registration. The SOAP API is end of life. Has been replaced by REST API.

Yoobi runs for approximately 550 customers and has 20 APIs with 40 tables.

Backlink: ITGEN-2862.

Do you want to support this idea for improving Invantive software? Please register/log on first, then add a vote by clicking on the “Vote” button directly to the left of the title above or add a reply.

Metadata

The Yoobi API documentation can be found at:

https://ACME.yoobi.nl/docs/apiconsole

where ACME is replaced by the environment name (typically similar to the company name). To get a feeling without starting a subscription, “ACME” can be replaced by “yoobi”, such as:

https://yoobi.yoobi.nl/docs/apiconsole

The metadata in RAML-structured format can be found at (“RESTful API Modelling Language”) at:

https://ACME.yoobi.nl/views/docs/api.cfm

To get a feeling without starting a subscription, “ACME” can be replaced by “yoobi”, such as:

https://yoobi.yoobi.nl/views/docs/api.cfm

Limits

The Yoobi API has the following limits:

  • API calls per day: 10.000
  • CPU usage per minute: 60 seconds

Processing without Yoobi Driver

The free subscription of Invantive Cloud can be used to retrieve the data as follows.

First step is to register the API user on

Then execute the following PSQL, such as from the Invantive Query Tool or an application module returning JSON:

declare
  g_api_environment     varchar2    := 'acme';
  g_api_user            varchar2    := 'john.doe-api@acme.com';
  g_api_password        varchar2    := 'secret';
  --
  l_current_page        pls_integer;
  l_last_page           pls_integer;
  l_done                boolean;
  l_retrieval_succesful boolean;
  l_http_status_code    int;
  l_contents            varchar2;
begin
  l_done         := false;
  l_last_page    := null;
  l_current_page := 1;
  --
  -- Create an empty table to load the data into.
  --
  -- Replace @inmemorystorage by the data container alias of for instance
  -- a SQL Server database.
  -- 
  create or replace table yoobi_projecten@inmemorystorage
  ( projectid       guid
  , projectcode     varchar2
  , department_name varchar2
  , name            varchar2
  );
  --
  while not l_done
  loop
    dbms_output.put_line('Retrieve page ' || to_char(l_current_page) || ' of rows.');
    select RETRIEVAL_SUCCESSFUL
    ,      HTTP_STATUS_CODE
    ,      CONTENTS_CHAR
    into   l_retrieval_succesful
    ,      l_http_status_code
    ,      l_contents
    from   HTTPDOWNLOAD@DataDictionary
           ( url => 'https://' || g_api_environment || '.yoobi.nl/api/v1/projects' || '?currentPage=' || l_current_page
           , method => 'GET'
           , headers => 'Authorization=Basic%20' 
                        || urlencode(base64_encode(ascii_to_blob(g_api_user || ':' || g_api_password)))
           )
    ;
    if not l_retrieval_succesful 
       or l_http_status_code != 200 
    then
      raise_application_error(-20163, 'Failure! Inspect error message.');
    else
      --
      -- Print the data row-by-row.
      --
      for r
      in
      ( select *
        from   jsontable
               ( 'results[*]'
                 passing l_contents
                 columns projectid       guid     path 'projectid'
                 ,       projectcode     varchar2 path 'projectcode'
                 ,       department_name varchar2 path 'department.name'
                 ,       name            varchar2 path 'name'
               )
      )
      loop
        dbms_output.put_line(r.projectid || ' - ' || r.projectcode || ': ' || r.name || ' (' || r.department_name || ')');
      end loop;
      --
      -- Bulk load into table in-memory, SQL Server, Oracle, PostgreSQL or MySQL:
      --
      bulk insert into yoobi_projecten@inmemorystorage
      ( projectid
      , projectcode
      , department_name
      , name
      )
      select projectid
      ,      projectcode
      ,      department_name
      ,      name
      from   jsontable
             ( 'results[*]'
               passing l_contents
               columns projectid       guid     path 'projectid'
               ,       projectcode     varchar2 path 'projectcode'
               ,       department_name varchar2 path 'department.name'
               ,       name            varchar2 path 'name'
             )
      ;
    end if;
    --
    -- Request next page when there is one.
    -- Number of rows in result set doesn't change after initial retrieval.
    --
    if l_last_page is null
    then
      select t.last
      into   l_last_page
      from   jsontable
             ( ''
               passing l_contents
               columns last int path 'metadata.last'
             ) t
      ;    
    end if;
    --
    l_current_page := l_current_page + 1;
    l_done := l_current_page > l_last_page;
  end loop;
end;

The table yoobi_projecten contains some randomly selected fields from the API.

Yoobi API Performance

Retrieval of projects takes between 523 and 901 ms per 100 rows. Initial first API call can take approximately an additional second.