Text this: Design and development of a dynamic role management API for data protection in smart city applications