def remove_role_by_email(email, role_id): try: req = delete_request(f'/users-by-email/{email}/roles/{role_id}') except HTTPError as e: if e.response.status_code == 500: raise DataRequestException(500, { "errors": ["Failed to remove role by email, please wait a " "minute and try again."] }) return req
def delete(site_id): req = delete_request(f'/sites/{site_id}') return req
def delete(forecast_id): req = delete_request(f'/forecasts/cdf/{forecast_id}') return req
def delete_outage(report_id, outage_id): delete = delete_request(f'/reports/{report_id}/outages/{outage_id}') return delete
def delete(report_id): delete = delete_request(f'/reports/{report_id}') return delete
def remove_object(permission_id, object_id): req = delete_request(f'/permissions/{permission_id}/objects/{object_id}') return req
def delete(permission_id): req = delete_request(f'/permissions/{permission_id}') return req
def delete_observation(aggregate_id, observation_id): req = delete_request( f'/aggregates/{aggregate_id}/observations/{observation_id}') return req
def delete(aggregate_id): req = delete_request(f'/aggregates/{aggregate_id}') return req
def remove_role(user_id, role_id): req = delete_request(f'/users/{user_id}/roles/{role_id}') return req
def delete(observation_id): req = delete_request(f'/observations/{observation_id}') return req