General developer forum

What i must use? Moodle API web services or quering directally to database?