lib/api.js
function(systemId, target, revision, cb) {
    if (target === 'alltargets') {
      cb(null, target);
    }
    else {
      _sr.getDeployedRevisionId(systemId, target, function(err, deployedRevId) {
        if (typeof revision === 'function') {
          cb = revision;
          if (!err) {
            revision = deployedRevId;
          }
          else {
            revision = 'latest';
          }
        }
        _builder.loadTargets(systemId, revision, function(err, targets) {
          if (err) { return cb(err); }
          var candidates = Object.keys(targets).filter(function(candidate) {
          return candidate.indexOf(target) >= 0;
          });

          if (candidates.length === 0 || candidates.length > 1) {
            logger.error(ERR_NOTARGET);
            return cb(new Error(ERR_NOTARGET));
          } else {
            target = candidates[0];
          }
          cb(null, target);
        });
      });
    }
  }
function(systemId, target, revision, cb) {
    if (target === 'alltargets') {
      cb(null, target);
    }
    else {
      _sr.getDeployedRevisionId(systemId, target, function(err, deployedRevId) {
        if (typeof revision === 'function') {
          cb = revision;
          if (!err) {
            revision = deployedRevId;
          }
          else {
            revision = 'latest';
          }
        }
        _builder.loadTargets(systemId, revision, function(err, targets) {
          if (err) { return cb(err); }
          var candidates = Object.keys(targets).filter(function(candidate) {
          return candidate.indexOf(target) >= 0;
          });

          if (candidates.length === 0 || candidates.length > 1) {
            logger.error(ERR_NOTARGET);
            return cb(new Error(ERR_NOTARGET));
          } else {
            target = candidates[0];
          }
          cb(null, target);
        });
      });
    }
  }
Supports target abbreviation