public static long checkAndGetUniqueId(String url, String token, String searchVal) {
        try {
            Map<String, String> header = buildHeader(token);
            Map<String, String> queryParams = buildPageParam(searchVal);

            JsonObject response = executeHttpRequest(url, GET, queryParams, header);

            JsonObject data = response.get(DS_RESPONSE_DATA).getAsJsonObject();
            JsonArray totalList = data.getAsJsonArray(DS_RESPONSE_TOTAL_LIST);

            // check uniqueness
            if (totalList != null && totalList.size() == 1) {
                JsonObject project = totalList.get(0).getAsJsonObject();
                String name = project.get(DS_RESPONSE_NAME).getAsString();
                if (name.equals(searchVal)) {
                    return project.get(DS_CODE).getAsLong();
                }
            }
            return 0;
        } catch (JsonParseException e) {
            LOGGER.error("JsonParseException during checkAndGetUniqueId", e);
            throw new DolphinScheduleException(JSON_PARSE_ERROR,
                    String.format("Error parsing json during unique ID check for: %s at URL: %s", searchVal, url), e);

        } catch (DolphinScheduleException e) {
            LOGGER.error("DolphinScheduleException during unique ID check: {}", e.getDetailedMessage(), e);
            throw new DolphinScheduleException(UNIQUE_CHECK_FAILED,
                    String.format("Error checking unique ID for %s at URL: %s", searchVal, url));
        }
    }
Checks the uniqueness of a project ID based on the given search value.

@param url       The base URL of the DolphinScheduler API.
@param token     The authentication token to be used in the request header.
@param searchVal The name of the project to search for.
@return The unique project ID if found, or 0 if not found or an error occurs.
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleUtils.java