How to create moodle api with the file structure