# Check local APEX plugin version against apex.world

There's something new on apex.world: A REST endpoint to retrieve information about listed open source plugins from the apex.world plugins directory! Just fire up a HTTP GET call to [https://apex.world/ords/apex\_world/plugin/list/](https://apex.world/ords/apex_world/plugin/list/) to retrieve all plugin information in JSON format... You can now use this information to compare your locally installed plugins (which of course are installed from apex.world before) with the ones listed on apex.world. In this example I use it to compare the locally installed plugin version to the newest version available, very useful for update checks where you want to know if there's a newer version of the plugins available! Just create a view like this in your schema (using APEX\_DATA\_PARSER: for all DBs and APEX versions >= 19.1): \[code lang=text\] create or replace force view v\_apex\_world\_plugins as select apex\_world\_plugins\_t.line\_number ,apex\_world\_plugins\_t.col001 as plg\_int\_name ,apex\_world\_plugins\_t.col002 as plg\_name ,apex\_world\_plugins\_t.col003 as plg\_desc ,apex\_world\_plugins\_t.col004 as plg\_type ,apex\_world\_plugins\_t.col005 as plg\_version ,apex\_world\_plugins\_t.col006 as created ,apex\_world\_plugins\_t.col007 as updated ,apex\_world\_plugins\_t.col008 as apex\_versions ,apex\_world\_plugins\_t.col009 as demo\_url ,apex\_world\_plugins\_t.col010 as download\_url ,apex\_world\_plugins\_t.col011 as homepage\_url ,apex\_world\_plugins\_t.col012 as like\_count ,apex\_world\_plugins\_t.col013 as author\_name ,apex\_world\_plugins\_t.col014 as author\_email ,apex\_world\_plugins\_t.col015 as author\_url ,apex\_world\_plugins\_t.col016 as author\_twitter from table(apex\_data\_parser.parse(p\_content => apex\_web\_service.make\_rest\_request\_b(p\_url => 'https://apex.world/ords/apex\_world/plugin/list/' ,p\_http\_method => 'GET') ,p\_file\_name => 'apex\_world\_plugins.json' ,p\_file\_profile => q'\[ { "file-type": 4, "single-row": false, "file-encoding": "AL32UTF8", "row-selector": "items", "headings-in-first-row": false, "csv-enclosed": "\\"", "columns": \[ { "name": "PLG\_INT\_NAME", "data-type": 1, "data-type-len": 255, "selector": "plg\_int\_name" }, { "name": "PLG\_NAME", "data-type": 1, "data-type-len": 255, "selector": "plg\_name" }, { "name": "PLG\_DESC", "data-type": 1, "data-type-len": 4000, "selector": "plg\_desc" }, { "name": "PLG\_TYPE", "data-type": 1, "data-type-len": 50, "selector": "plg\_type" }, { "name": "PLG\_VERSION", "data-type": 1, "data-type-len": 50, "selector": "plg\_version" }, { "name": "CREATED", "data-type": 5, "selector": "created", "format-mask": "YYYY\\"-\\"MM\\"-\\"DD\\"T\\"HH24\\":\\"MI:SSTZR" }, { "name": "UPDATED", "data-type": 5, "selector": "updated", "format-mask": "YYYY\\"-\\"MM\\"-\\"DD\\"T\\"HH24\\":\\"MI:SSTZR" }, { "name": "APEX\_VERSIONS", "data-type": 1, "data-type-len": 255, "selector": "apex\_versions" }, { "name": "DEMO\_URL", "data-type": 1, "data-type-len": 255, "selector": "demo\_url" }, { "name": "DOWNLOAD\_URL", "data-type": 1, "data-type-len": 255, "selector": "download\_url" }, { "name": "HOMEPAGE\_URL", "data-type": 1, "data-type-len": 255, "selector": "homepage\_url" }, { "name": "LIKE\_COUNT", "data-type": 2, "decimal-char": ".", "selector": "like\_count" }, { "name": "AUTHOR\_NAME", "data-type": 1, "data-type-len": 100, "selector": "author\_name" }, { "name": "AUTHOR\_EMAIL", "data-type": 1, "data-type-len": 255, "selector": "author\_email" }, { "name": "AUTHOR\_URL", "data-type": 1, "data-type-len": 255, "selector": "author\_url" }, { "name": "AUTHOR\_TWITTER", "data-type": 1, "data-type-len": 50, "selector": "author\_twitter" } \], "parsed-rows": 200 } \]')) apex\_world\_plugins\_t; \[/code\] Or like this (using XMLTABLE: for all DBs and APEX versions): \[code lang=text\] create or replace view v\_apex\_world\_plugins as select apex\_world\_plugins\_t.plg\_int\_name ,apex\_world\_plugins\_t.plg\_name ,apex\_world\_plugins\_t.plg\_desc ,apex\_world\_plugins\_t.plg\_type ,apex\_world\_plugins\_t.plg\_version ,apex\_world\_plugins\_t.created ,apex\_world\_plugins\_t.updated ,apex\_world\_plugins\_t.apex\_versions ,apex\_world\_plugins\_t.demo\_url ,apex\_world\_plugins\_t.download\_url ,apex\_world\_plugins\_t.homepage\_url ,apex\_world\_plugins\_t.like\_count ,apex\_world\_plugins\_t.author\_name ,apex\_world\_plugins\_t.author\_email ,apex\_world\_plugins\_t.author\_url ,apex\_world\_plugins\_t.author\_twitter from xmltable('/json/items/row' passing apex\_json.to\_xmltype(apex\_web\_service.make\_rest\_request(p\_url => 'https://apex.world/ords/apex\_world/plugin/list/' ,p\_http\_method => 'GET')) columns plg\_int\_name path 'plg\_int\_name' ,plg\_name path 'plg\_name' ,plg\_desc path 'plg\_desc' ,plg\_type path 'plg\_type' ,plg\_version path 'plg\_version' ,created path 'created' ,updated path 'updated' ,apex\_versions path 'apex\_versions' ,demo\_url path 'demo\_url' ,download\_url path 'download\_url' ,homepage\_url path 'homepage\_url' ,like\_count path 'like\_count' ,author\_name path 'author\_name' ,author\_email path 'author\_email' ,author\_url path 'author\_url' ,author\_twitter path 'author\_twitter') apex\_world\_plugins\_t \[/code\] Or like this (using JSON\_TABLE: for DBs >= 12.1 and all APEX versions): \[code lang=text\] create or replace view v\_apex\_world\_plugins as select apex\_world\_plugins\_t.plg\_int\_name ,apex\_world\_plugins\_t.plg\_name ,apex\_world\_plugins\_t.plg\_desc ,apex\_world\_plugins\_t.plg\_type ,apex\_world\_plugins\_t.plg\_version ,apex\_world\_plugins\_t.created ,apex\_world\_plugins\_t.updated ,apex\_world\_plugins\_t.apex\_versions ,apex\_world\_plugins\_t.demo\_url ,apex\_world\_plugins\_t.download\_url ,apex\_world\_plugins\_t.homepage\_url ,apex\_world\_plugins\_t.like\_count ,apex\_world\_plugins\_t.author\_name ,apex\_world\_plugins\_t.author\_email ,apex\_world\_plugins\_t.author\_url ,apex\_world\_plugins\_t.author\_twitter from json\_table(apex\_web\_service.make\_rest\_request(p\_url => 'https://apex.world/ords/apex\_world/plugin/list/' ,p\_http\_method => 'GET') ,'$.items\[\*\]' columns(plg\_int\_name varchar2(250) path '$.plg\_int\_name' ,plg\_name varchar2(250) path '$.plg\_name' ,plg\_desc varchar2(4000) path '$.plg\_desc' ,plg\_type varchar2(100) path '$.plg\_type' ,plg\_version varchar2(50) path '$.plg\_version' ,created varchar2(50) path '$.created' ,updated varchar2(50) path '$.updated' ,apex\_versions varchar2(100) path '$.apex\_versions' ,demo\_url varchar2(1000) path '$.demo\_url' ,download\_url varchar2(1000) path '$.download\_url' ,homepage\_url varchar2(1000) path '$.homepage\_url' ,like\_count number path '$.like\_count' ,author\_name varchar2(250) path '$.author\_name' ,author\_email varchar2(250) path '$.author\_email' ,author\_url varchar2(1000) path '$.author\_url' ,author\_twitter varchar2(100) path '$.author\_twitter')) apex\_world\_plugins\_t; \[/code\] _Note: Thus the web service is running over HTTPS a Oracle Wallet is needed to connect to it!_ _I created a script which creates such a wallet with all valid public root CAs a while back: [https://github.com/Dani3lSun/oracle-ca-wallet-creator](https://github.com/Dani3lSun/oracle-ca-wallet-creator)_ And with this select statement you get the local plugin version and the version from apex.world for easier comparison: \[code lang=text\] select apex\_appl\_plugins.name ,apex\_appl\_plugins.display\_name ,apex\_appl\_plugins.version\_identifier as version\_local ,v\_apex\_world\_plugins.plg\_version as version\_apex\_world from apex\_appl\_plugins ,v\_apex\_world\_plugins where apex\_appl\_plugins.name = v\_apex\_world\_plugins.plg\_int\_name and apex\_appl\_plugins.application\_id = 103 \[/code\] The output should be like that: ![](https://blogdanielhochleitner.files.wordpress.com/2020/02/compare_plugin_versions.png) And if it differs, it's time for an update! Just as easy as 123! :)
