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 28, 2017
1 parent f4dacd6 commit 98408cf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/restapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ POST /yadage
------------

.. autofunction:: reana_workflow_controller.app.yadage_endpoint
.. autofunction:: reana_workflow_controller.app.get_workflows
18 changes: 15 additions & 3 deletions reana_workflow_controller/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,37 @@
@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.
.. warning::
Not implemented, just a mock that can be 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.
"""
Expand Down

0 comments on commit 98408cf

Please sign in to comment.