The following is an example to lookup a domain object by OID.

// Look up device R1230-5 in network SOUTHWEST-REGION by OID
// R1230-5's OID is c0a857081bf8e93fe3d5e46b00010000
// SOUTHWEST-REGION is c0a857080d6bb23ffbfa048200010000
ResourceIdentityInfo networkId =
    new ResourceIdentityInfo(
      "c0a857080d6bb23ffbfa048200010000",
null,
 "network");
ResourceIdentityInfo deviceId =
    new ResourceIdentityInfo(
        "c0a857081bf8e93fe3d5e46b00010000",
 null, "device");
OperationalDeviceInfo info =
    api.getOperationalDeviceInfo(networkId, deviceId, false);