apollo-openapi/src/main/java/com/ctrip/framework/apollo/openapi/client/service/ItemOpenApiService.java/ItemOpenApiService/getItem
class ItemOpenApiService:  @Override
  public OpenItemDTO getItem(String appId, String env, String clusterName, String namespaceName, String key) {
    if (Strings.isNullOrEmpty(clusterName)) {
      clusterName = ConfigConsts.CLUSTER_NAME_DEFAULT;
    }
    if (Strings.isNullOrEmpty(namespaceName)) {
      namespaceName = ConfigConsts.NAMESPACE_APPLICATION;
    }

    checkNotEmpty(appId, "App id");
    checkNotEmpty(env, "Env");
    checkNotEmpty(key, "Item key");

    OpenApiPathBuilder pathBuilder = OpenApiPathBuilder.newBuilder()
        .envsPathVal(env)
        .appsPathVal(appId)
        .clustersPathVal(clusterName)
        .namespacesPathVal(namespaceName)
        .itemsPathVal(key);

    try (CloseableHttpResponse response = get(pathBuilder)) {
      return gson.fromJson(EntityUtils.toString(response.getEntity()), OpenItemDTO.class);
    } catch (Throwable ex) {
      // return null if item doesn't exist
      if (ex instanceof ApolloOpenApiException && ((ApolloOpenApiException)ex).getStatus() == 404) {
        return null;
      }
      throw new RuntimeException(String
          .format("Get item: %s for appId: %s, cluster: %s, namespace: %s in env: %s failed", key, appId, clusterName,
              namespaceName, env), ex);
    }
  }