Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9780C200CD6 for ; Mon, 31 Jul 2017 19:18:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 94484165925; Mon, 31 Jul 2017 17:18:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0EBBD165922 for ; Mon, 31 Jul 2017 19:18:04 +0200 (CEST) Received: (qmail 1893 invoked by uid 500); 31 Jul 2017 17:18:04 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 1881 invoked by uid 99); 31 Jul 2017 17:18:03 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2017 17:18:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DA29AE02E0; Mon, 31 Jul 2017 17:18:03 +0000 (UTC) From: m4rkmckenna To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request #782: Adds `PUT /applications/{appid}` Content-Type: text/plain Message-Id: <20170731171803.DA29AE02E0@git1-us-west.apache.org> Date: Mon, 31 Jul 2017 17:18:03 +0000 (UTC) archived-at: Mon, 31 Jul 2017 17:18:05 -0000 Github user m4rkmckenna commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/782#discussion_r130405571 --- Diff: rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/ApplicationApi.java --- @@ -110,15 +112,32 @@ public Response createFromYaml( required = true) String yaml); + @Beta + @PUT + @Path("/{application}") + @Consumes({"application/x-yaml", + // see http://stackoverflow.com/questions/332129/yaml-mime-type + "text/yaml", "text/x-yaml", "application/yaml"}) + @ApiOperation( + value = "[BETA] Create and start a new application from YAML, with the given id", + response = org.apache.brooklyn.rest.domain.TaskSummary.class + ) + @ApiResponses(value = { + @ApiResponse(code = 404, message = "Undefined entity or location"), + @ApiResponse(code = 409, message = "Application already registered") --- End diff -- 409 is not returned when there is an id clash --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---