rlm_rest: Parse response from API?

Michael Schwartzkopff ms at sys4.de
Mon Dec 20 16:56:23 CET 2021


On 20.12.21 16:48, Alan DeKok wrote:
> On Dec 18, 2021, at 10:27 AM, Michael Schwartzkopff <ms at sys4.de> wrote:
>> my API returns something like:
>>
>> {"count":1,"next":null,"previous":null,"results":[{"id":16, ... How can
>> I access key/value pairs in the "results" data structure and assign the
>> value of a specific pair to an attribute?
>   It's hard to do in 3.0. :(  v4 is more able to decode this.
>
>   Matthew updated rlm_json in the v3.2.x branch.  It can encode more json attributes, but can't decode any.  We'd be OK with getting a patch to update 3.2.  But if we change 3.0 at this time, then Matthew will be upset at me. :(
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Thanks for the response. I solved the problem in rlm_python3.


I write a blog article about this work, when I find the time. Basic idea:


FreeRADIUS -> dynamic clients -> lookup in netbox asset management.


Mit freundlichen Grüßen,

-- 

[*] sys4 AG
 
https://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG,80333 München
 
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief
Aufsichtsratsvorsitzender: Florian Kirstein



More information about the Freeradius-Users mailing list