add support for scope arrays to api