Skip to content

Commit

Permalink
api: Add MOCKED /workflows -endpoint
Browse files Browse the repository at this point in the history
* Add MOCKED /workflows -endpoint that provides a quick way to
  check if reana-workflow-engine is running. Closes #20.

Signed-off-by: Harri Hirvonsalo <harri.hirvonsalo@cern.ch>
  • Loading branch information
hjhsalo committed Mar 24, 2017
1 parent b209f4e commit f4dacd6
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions reana_workflow_controller/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,34 @@
}


@app.route('/workflows', methods=['GET'])
def get_workflows():
"""Get all workflows.
.. http:get:: /workflows
Returns a JSON list with all the workflows.
NOTE: Currently just a mock that can used e.g. to quickly
check if reana-workflow-controller is running.
**Request**:
.. sourcecode:: http
GET /workflows HTTP/1.1
Content-Type: application/json
Host: localhost:5000
:reqheader Content-Type: application/json
**Responses**:
.. sourcecode:: http
HTTP/1.1 200 OK
Content-Length: 22
Content-Type: application/json
{
"workflows": {}
}
:resheader Content-Type: application/json
:statuscode 200: no error - the list has been returned.
"""
return jsonify({"workflows": {}}), 200


@app.route('/yadage', methods=['POST'])
def yadage_endpoint():
"""Create a new job.
Expand Down

0 comments on commit f4dacd6

Please sign in to comment.