User Tools

Site Tools


userspace:json-rpc_angularjs

This is an old revision of the document!


Yet another method of reading the JSON-RPC interface.

The example below reads the result of the latest softwareAudit and displays it as a table. Information about installed sw products are merged in.

All needed files (.html, .js, .css) should be hosted below /usr/share/opsiconfd/static/AngularExample folder thus avoiding cross scripting complaints of modern browsers.

The location would then read https://opsi:4447/AngularExample.

Minor Obstacles

configed will currently answer /rpc? requests with Encoding “deflate”, but will anounce it as “gzip”. This issue is known and a patch is [https://forum.opsi.org/viewtopic.php?f=6&t=7449 mentioned in the forums].

Most requests require a logon, some even special rights. The script user should be member of a new group opsireader and the acl.conf file should be prepended with appropriate lines:

getProducts_.*		: sys_group(opsireader); sys_group(opsiadmin); opsi_depotserver; self; opsi_client
productOnClient_get.*	: sys_group(opsireader); sys_group(opsiadmin); opsi_depotserver;self; opsi_client
auditSoftwareOnClient_get.*	: sys_group(opsireader); sys_group(opsiadmin); opsi_depotserver; self; opsi_client
product_get.*		: sys_group(opsireader); sys_group(opsiadmin); opsi_depotserver; self; opsi_client
userspace/json-rpc_angularjs.1430488307.txt.gz · Last modified: 2021/08/23 08:37 (external edit)