String createApplicationDeployment(Application.Function function) {
        CreateDeploymentResponse deployment = callController(HttpMethod.POST, "/v1/deployment/" + function.getId(),
                request -> {
                    request.putHeader(HttpHeaders.CONTENT_TYPE, Proxy.HEADER_CONTENT_TYPE_APPLICATION_JSON);
                    CreateDeploymentRequest body = new CreateDeploymentRequest(function.getEnv());
                    return ProxyUtil.convertToString(body);
                },
                body -> convertServerSentEvent(body, CreateDeploymentResponse.class));

        return deployment.url();
    }
A web client to Application Controller Web Service that manages deployments for applications with functions.
server/src/main/java/com/epam/aidial/core/server/service/ApplicationOperatorService.java