api: s/machine/machineID/

Rather than having a `machine` field and a `machineID` field on different entities that represent the same value, standardize on `machineID`.