How to read Application (sys_scope) and Custom Application (sys_app) records via REST API?

andriyko
Giga Contributor

How to read Application (sys_scope) and Custom Application (sys_app) records via REST API?

I added ACLs to read "sys_scope", "sys_app" with my custom role, but I get results with empty dictionaries "{}", without fields.

Also tried to add ACL with wildcard eg "sys_scope.*", but it is not allowed in scoped application.

Is there any solution for this? (apart of adding "admin" role to my role or creating custom processor that would proxy the query and return the results)

4 REPLIES 4

srinivasthelu
Tera Guru

Hi Andriy,



Its tricky question.



What is the end goal here?, what information you wanted to access from application record?



Thanks


Srinivas


Hi Srinivas,



I want to get details (like "version") about my own app.


Then, depending on app version, build queries with appropriate params.


Hi Andriy,



You might be already aware, there is another table in that hierarchy called sys_store_app.



Once you share the app through store,in the client instance, that app will go and sit in sys_store_app table. That table wont be accessible through REST API.



I would rather go with the custom processor approach.



Hope that make sense.




Thanks


Srinivas


Custom processor does not help here as well. It works on dev instance, but does not work on instances if it was installed using option "install from other instance".


On dev instance custom processor works in scope of application.


On prod instance the scope is "global".


For example, this query will give no results on prod, and gives correct result on dev:


var gr = new GlideRecord('sys_app');


gr.get('scope', 'x_my_app');


gs.info(gr.version);