db api defined