implement ApiKeyService and related entities
add Test class and implement some codes to ApiService