Api program part 1

part 1 of my api program, takes values from api and inserts them into
mysql database.