public static ApplicationInstanceReference parseApplicationInstanceReference(String restFormat) {
        if (restFormat == null) {
            throw new IllegalArgumentException("Could not construct instance id from null string");
        }

        Matcher matcher = APPLICATION_INSTANCE_REFERENCE_REST_FORMAT_PATTERN.matcher(restFormat);
        if (!matcher.matches()) {
            throw new IllegalArgumentException("Could not construct instance id from string \"" + restFormat +"\"");
        }

        TenantId tenantId = new TenantId(matcher.group(1));
        ApplicationInstanceId applicationInstanceId = new ApplicationInstanceId(matcher.group(2));
        return new ApplicationInstanceReference(tenantId, applicationInstanceId);
    }
Returns an ApplicationInstanceReference constructed from the serialized format used in the REST API.
orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorUtil.java