getAttrs is a sheet worker function, not an API function. To grab attributes from a character sheet in an API script you need to use the functions on this page: <a href="https://wiki.roll20.net/API:Function_documentation" rel="nofollow">https://wiki.roll20.net/API:Function_documentation</a> Even if it was a sheet worker function, getAttrs['inventory'] wouldnt work, because there is no single inventory attribute. To grab all the attributes from a repeating section, you need to use getSectionIDs. Again that's a asheet worker function, not an API function, and only works as part of character sheet code. Also, there are two different functions called setAttrs. The one for sheet workers has different syntax for the one in the API. They are not the same function.