def get_api_service(params, project):
    """
    Create or get an api service dss object and return it
    """

    if params.get('create_new_service'):
        api_service = project.create_api_service(params.get("service_id"))
    else:
        api_service = project.get_api_service(params.get("service_id"))
    return api_service