From cd96e2096237484329e0d20b5198484c58e8f17b Mon Sep 17 00:00:00 2001 From: Richard Marston Date: Mon, 13 May 2019 14:47:21 +0200 Subject: [PATCH] add URL for querying and editing models associated with a simulation --- doc/api/api.yaml | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/doc/api/api.yaml b/doc/api/api.yaml index 2bb0e64..f2f2f5d 100644 --- a/doc/api/api.yaml +++ b/doc/api/api.yaml @@ -125,6 +125,55 @@ paths: 200: description: TODO RESPONSES! content: {} + /simulations/{SimulationID}/models/{ModelID}: + get: + tags: + - simulations models + summary: Get model associated with simulation with ID SimulationID + operationId: getModelFromSimulation + parameters: + - in: path + name: SimulationID + description: ID of a simulation + required: true + schema: + type: integer + - in: path + name: ModelID + description: ID of a model + required: true + schema: + type: integer + responses: + 200: + description: Simulation and associated model found (TODO CHECK CODE) + content: + application/zip: + description: "Model file in zip format" + 400: + description: PUT Simulation Unknown for ID or unable to save simulation or Model not associated with Simulation + content: {} + put: + tags: + - simulations models + summary: Update model file for model with ModelID associated with simulation with SimulationID + operationId: updateModelForSimulation + parameters: + - in: path + name: SimulationID + description: ID of a simulation + required: true + schema: + type: integer + requestBody: + description: "Model file in zip format" + required: true + content: + application/xml: + responses: + 400: + description: PUT Simulation Unknown for ID or unable to save simulation or Model not associated with Simulation + content: {} /counts: get: tags: