database create for api