diff options
Diffstat (limited to 'opendc-api-spec.yml')
| -rw-r--r-- | opendc-api-spec.yml | 184 |
1 files changed, 38 insertions, 146 deletions
diff --git a/opendc-api-spec.yml b/opendc-api-spec.yml index 0c7d507f..1e879b49 100644 --- a/opendc-api-spec.yml +++ b/opendc-api-spec.yml @@ -293,6 +293,34 @@ paths: description: Missing or incorrectly typed parameter. '401': description: Unauthorized. + '/simulations/{simulationId}/experiments': + post: + tags: + - experiments + description: Add an Experiment. + parameters: + - name: simulationId + in: path + description: Simulation's ID. + required: true + type: string + - name: experiment + in: body + description: The new Experiment. + required: true + schema: + properties: + topology: + $ref: '#/definitions/Experiment' + responses: + '200': + description: Successfully added Topology. + schema: + $ref: '#/definitions/Topology' + '400': + description: Missing or incorrectly typed parameter. + '401': + description: Unauthorized. '/topologies/{topologyId}': get: tags: @@ -371,61 +399,6 @@ paths: description: Forbidden from deleting Topology. '404': description: Topology not found. - '/simulations/{simulationId}/experiments': - get: - tags: - - experiments - description: Get this Simulation's Experiments. - parameters: - - name: simulationId - in: path - description: Simulation's ID. - required: true - type: string - responses: - '200': - description: Successfully retrieved Experiments. - schema: - type: array - items: - $ref: '#/definitions/Experiment' - '400': - description: Missing or incorrectly typed parameter. - '401': - description: Unauthorized. - '403': - description: Forbidden from retrieving Simulation's Experiments. - '404': - description: Simulation not found. - post: - tags: - - experiments - description: Add a new Experiment for this Simulation. - parameters: - - name: simulationId - in: path - description: Simulation's ID. - required: true - type: string - - name: experiment - in: body - description: Experiment to add to this Simulation. - required: true - schema: - $ref: '#/definitions/Experiment' - responses: - '200': - description: Successfully added new Experiment. - schema: - $ref: '#/definitions/Experiment' - '400': - description: Missing or incorrectly typed parameter. - '401': - description: Unauthorized. - '403': - description: Forbidden from adding an Experiment to this Simulation. - '404': - description: 'Simulation, Topology, Scheduler or Trace not found.' '/experiments/{experimentId}': get: tags: @@ -508,32 +481,6 @@ paths: description: Forbidden from deleting Experiment. '404': description: Experiment not found. - '/experiments/{experimentId}/last-simulated-tick': - get: - tags: - - simulations - description: Get this Experiment's last simulated tick. - parameters: - - name: experimentId - in: path - description: Experiment's ID. - required: true - type: string - responses: - '200': - description: Successfully retrieved Experiment's last simulated tick. - schema: - properties: - lastSimulatedTick: - type: integer - '400': - description: Missing or incorrectly typed parameter. - '401': - description: Unauthorized - '403': - description: Forbidden from getting this simulation - '404': - description: Simulation not found '/experiments/{experimentId}/machine-states': get: tags: @@ -660,58 +607,6 @@ paths: description: Forbidden from getting Experiment's Room States. '404': description: 'Experiment, Room or Tick not found.' - '/experiments/{experimentId}/task-states': - get: - tags: - - simulations - - states - description: Get this Experiment's Task States. - parameters: - - name: experimentId - in: path - description: Experiment's ID. - required: true - type: string - - name: tick - in: query - description: Tick to filter on. - required: false - type: integer - - name: taskId - in: query - description: Task's ID to filter on. - required: false - type: string - - name: machineId - in: query - description: Machine's ID to filter on. - required: false - type: string - - name: rackId - in: query - description: ID the rack whose machines' task states to get - required: false - type: string - - name: roomId - in: query - description: ID of the room whose racks' machines' states to get - required: false - type: string - responses: - '200': - description: Successfully retrieved Task States. - schema: - type: array - items: - $ref: '#/definitions/TaskState' - '400': - description: Missing or incorrectly typed parameter. - '401': - description: Unauthorized. - '403': - description: Forbidden from retrieving Experiment's Task States. - '404': - description: 'Experiment, Tick, Task, Machine, Rack or Room not found.' /schedulers: get: tags: @@ -782,6 +677,10 @@ definitions: type: string name: type: string + state: + type: string + lastSimulatedTick: + type: integer MachineState: type: object properties: @@ -852,24 +751,17 @@ definitions: type: array items: type: string - TaskState: - type: object - properties: - _id: - type: string - taskId: - type: string - experimentId: - type: string - tick: - type: integer - flopsLeft: - type: integer + experimentIds: + type: array + items: + type: string Topology: type: object properties: _id: type: string + simulationId: + type: string name: type: string rooms: |
