summaryrefslogtreecommitdiff
path: root/api/api.json
diff options
context:
space:
mode:
authorrautenberg <rautenberg@in-silico.ch>2015-09-15 18:26:28 +0200
committerrautenberg <rautenberg@in-silico.ch>2015-09-15 18:26:28 +0200
commitd05e0f9a367c6b4eafabdaf86272a7fa0785c11e (patch)
treea04bf1e1ee41f69732e6992521b5f01a9e58b19e /api/api.json
parentc2b42bd053d4e0c0ec72e2fb1b26530a2d5fd81e (diff)
initial files with test and api
Diffstat (limited to 'api/api.json')
-rw-r--r--api/api.json148
1 files changed, 148 insertions, 0 deletions
diff --git a/api/api.json b/api/api.json
new file mode 100644
index 0000000..6f9a037
--- /dev/null
+++ b/api/api.json
@@ -0,0 +1,148 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "description": "An REST Webservice for lazar\n",
+ "version": "0.0.1",
+ "title": "Lazar REST Service",
+ "contact": {
+ "name": "in silico toxicology",
+ "email": "service@in-silico.ch"
+ },
+ "license": {
+ "name": "GNU GENERAL PUBLIC LICENSE",
+ "url": "https://github.com/opentox/lazar-rest/blob/master/LICENSE"
+ }
+ },
+ "host": "mr-test.in-silico.ch",
+ "basePath": "/",
+ "schemes": [
+ "https"
+ ],
+ "paths": {
+ "/model": {
+ "get": {
+ "tags": [
+ "model"
+ ],
+ "description": "Get a list of all prediction models",
+ "parameters": [
+ {
+ "name": "accept",
+ "in": "header",
+ "description": "requested Content-Type",
+ "required": true,
+ "type": "string",
+ "enum": [
+ "text/uri-list",
+ "application/json"
+ ]
+ }
+ ],
+ "produces": [
+ "text/uri-list",
+ "application/json"
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/200"
+ },
+ "400": {
+ "$ref": "#/responses/400"
+ },
+ "401": {
+ "$ref": "#/responses/401"
+ },
+ "404": {
+ "$ref": "#/responses/404"
+ },
+ "500": {
+ "$ref": "#/responses/500"
+ }
+ }
+ }
+ },
+ "/model/{id}": {
+ "post": {
+ "tags": [
+ "model"
+ ],
+ "description": "Predict a compound",
+ "parameters": [
+ {
+ "name": "Content-Type",
+ "in": "header",
+ "description": "body Content-Type",
+ "required": true,
+ "type": "string",
+ "enum": [
+ "text/plain"
+ ]
+ },
+ {
+ "name": "compound",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "#/parameters/modelid"
+ }
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "consumes": [
+ "text/plain"
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/200"
+ },
+ "400": {
+ "$ref": "#/responses/400"
+ },
+ "404": {
+ "$ref": "#/responses/404"
+ }
+ }
+ }
+ }
+ },
+ "parameters": {
+ "modelid": {
+ "name": "id",
+ "in": "path",
+ "description": "model id",
+ "required": true,
+ "type": "string"
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK"
+ },
+ "202": {
+ "description": "Accepted"
+ },
+ "400": {
+ "description": "Bad Request"
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "404": {
+ "description": "Resource Not Found"
+ },
+ "500": {
+ "description": "Server Error"
+ }
+ },
+ "tags": [
+ {
+ "name": "model",
+ "description": "Lazar Model Service"
+ }
+ ]
+} \ No newline at end of file