Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions docs/http-api/images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Request

.. code-block::

GET /images?model_id=1
GET /images?task_id=1

* `model_id`: id of model to get images for
* `task_id`: id of task to get images for

Response
^^^^^^^^
Expand Down Expand Up @@ -94,6 +94,15 @@ Request
"model_id": 1
}

* Can be either provided with model or pipeline id

.. code-block:: json

{
"name": "image_name",
"pipeline_id": 1
}

Response
^^^^^^^^^^^^^^

Expand Down Expand Up @@ -155,6 +164,7 @@ Request

* `id`: id of image to delete
* `cascade`: (optional, default - `0`) delete cascadely (stops and deletes running instances of image)
* `meta_only`: (optional, default - `0`) delete image from metadata repository only if 1, if 0 also deletes image from host too

Response
^^^^^^^^^^^^^^
Expand Down
4 changes: 1 addition & 3 deletions docs/http-api/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Response
"artifacts": ["model.pkl", "methods.json"]
}

* `404`: if given task doesn't exist
* `404`: if given model doesn't exist


Get model artifact
Expand Down Expand Up @@ -138,11 +138,9 @@ Request
DELETE /models/<:id>?cascade=1

* `id`: id of model to delete
* `cascade`: (optional, default - `0`) delete cascadely (with referenced images, etc)

Response
^^^^^^^^^^^^^^

* `204`: OK
* `400`: if `cascade` is not `1` and given model has images in it
* `404`: if given model doesn't exist
177 changes: 177 additions & 0 deletions docs/http-api/pipelines.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
Pipelines
============

Get list of pipelines
------------------------

Request
^^^^^^^

.. code-block::

GET /pipelines?task_id=1

* `task_id`: id of task to get pipelines for

Response
^^^^^^^^

* `200`:

.. code-block:: json

[
{
"name": "pipe_1",
"id": 1,
"task_id": 1,
"creation_date": "1970-01-01 00:00:00.000000 ",
"author": "user_name",
"input_data": "array",
"output_data": "array",
"steps": [
{"model_name": "model1", "method_name": "method1"},
{"model_name": "model2", "method_name": "method2"}
],
"models":
{ "model1":{
"name": "model1",
"id": 1,
"task_id": 1,
"author": "user_name",
"creation_date": "1970-01-01 00:00:00.000000 ",
"wrapper_meta": {"type": "ebonite.ext.sklearn.model.SklearnModelWrapper"},
"requirements": [
{"module": "numpy", "version": "1.17.3", "type": "installable"},
{"module": "sklearn", "version": "0.22", "type": "installable"}
],
"params": {"python_version": "3.7.5"},
"artifacts": ["model.pkl", "methods.json"]
},
"model2":{
"name": "model2",
"id": 2,
"task_id": 1,
"author": "user_name",
"creation_date": "1970-01-01 00:00:00.000000 ",
"wrapper_meta": {"type": "ebonite.ext.sklearn.model.SklearnModelWrapper"},
"requirements": [
{"module": "numpy", "version": "1.17.3", "type": "installable"},
{"module": "sklearn", "version": "0.22", "type": "installable"}
],
"params": {"python_version": "3.7.5"},
"artifacts": ["model.pkl", "methods.json"]
}
}
}
]

* `404`: if given task doesn't exist

Get pipeline
------------

Request
^^^^^^^

.. code-block::

GET /pipelines/<:id>

* `id`: id of pipeline to get

Response
^^^^^^^^

* `200`:

.. code-block:: json

{
"name": "pipe_1",
"id": 1,
"task_id": 1,
"creation_date": "1970-01-01 00:00:00.000000 ",
"author": "user_name",
"input_data": "array",
"output_data": "array",
"steps": [
{"model_name": "model1", "method_name": "method1"},
{"model_name": "model2", "method_name": "method2"}
],
"models":
{ "model1":{
"name": "model1",
"id": 1,
"task_id": 1,
"author": "user_name",
"creation_date": "1970-01-01 00:00:00.000000 ",
"wrapper_meta": {"type": "ebonite.ext.sklearn.model.SklearnModelWrapper"},
"requirements": [
{"module": "numpy", "version": "1.17.3", "type": "installable"},
{"module": "sklearn", "version": "0.22", "type": "installable"}
],
"params": {"python_version": "3.7.5"},
"artifacts": ["model.pkl", "methods.json"]
},
"model2":{
"name": "model2",
"id": 2,
"task_id": 1,
"author": "user_name",
"creation_date": "1970-01-01 00:00:00.000000 ",
"wrapper_meta": {"type": "ebonite.ext.sklearn.model.SklearnModelWrapper"},
"requirements": [
{"module": "numpy", "version": "1.17.3", "type": "installable"},
{"module": "sklearn", "version": "0.22", "type": "installable"}
],
"params": {"python_version": "3.7.5"},
"artifacts": ["model.pkl", "methods.json"]
}
}
}

Comment thread
konanykhin marked this conversation as resolved.
* `404`: if given pipeline doesn't exist

Update pipeline
---------------

Request
^^^^^^^

.. code-block::

PATCH /pipelines/<:id>

* `id`: id of pipeline to update

.. code-block:: json

{
"name": "first pipeline"
}

Response
^^^^^^^^^^^^^^

* `204`: OK
* `404`: if given pipeline doesn't exist

Delete pipeline
---------------

Request
^^^^^^^

.. code-block::

DELETE /pipelines/<:id>

* `id`: id of pipeline to delete

Response
^^^^^^^^^^^^^^

* `204`: OK
* `404`: if given pipeline doesn't exist