How to get field values from Global Set using Element API plugin?
There’s no need to go through getContent() to access your field values; you can access them directly from the GlobalSetModel:

'transformer' =&gt; function(GlobalSetModel $siteSettings) {
    return [
        'defaultTitle' =&gt; $siteSettings-&gt;defaultTitle,
        'defaultDescription' =&gt; $siteSettings-&gt;defaultDescription
    ];
},