From 14e626e3b0e5dad90f772bfec575fdd73d1bd3a3 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 7 May 2018 12:44:31 +0200 Subject: use orn uri --- api/api.json | 2098 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 1069 insertions(+), 1029 deletions(-) diff --git a/api/api.json b/api/api.json index 23dd1cc..1a07c0d 100644 --- a/api/api.json +++ b/api/api.json @@ -1,1052 +1,1092 @@ { - "swagger": "2.0", - "info": { - "description": "REST API webservice for lazar and nano-lazar. \n*lazar* (lazy structure–activity relationships) is a modular framework for predictive toxicology. With activated Authentication & Authorization, subjectid authorization token are obligatory for designated services.\n", - "version": "1.1.0", - "title": "Lazar & Nano-Lazar REST Service", - "contact": { - "name": "in silico toxicology gmbh", - "email": "service@in-silico.ch", - "url": "https://in-silico.ch" - }, - "license": { - "name": "GNU GENERAL PUBLIC LICENSE", - "url": "https://github.com/opentox/lazar-rest/blob/master/LICENSE" - } + "openapi": "3.0.0", + "x-orn-@id": "https://dg-lazar.prod.openrisknet.org", + "x-orn-@type": "x-orn:Service", + "servers": [ + { + "url": "https://dg-lazar.prod.openrisknet.org/" + } + ], + "info": { + "description": "REST API webservice for lazar and nano-lazar. \n\n*lazar* (lazy structure–activity relationships) is a modular framework for\npredictive toxicology. With activated Authentication & Authorization,\nsubjectid authorization token are obligatory for designated services.\n", + "version": "1.1.0", + "title": "Lazar & Nano-Lazar REST Service", + "contact": { + "name": "in silico toxicology gmbh", + "email": "service@in-silico.ch", + "url": "https://in-silico.ch" }, - "host": "api.in-silico.ch", - "externalDocs": { - "description": "See also *lazar-rest* documentation on Github\n", - "url": "https://github.com/opentox/lazar-rest" + "license": { + "name": "GNU GENERAL PUBLIC LICENSE", + "url": "https://github.com/opentox/lazar-rest/blob/master/LICENSE" + } + }, + "externalDocs": { + "description": "See also *lazar-rest* documentation on Github\n", + "url": "https://github.com/opentox/lazar-rest" + }, + "paths": { + "/model": { + "get": { + "x-orn-@type": "x-orn:Model", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/model", + "x-orn:method": "Get", + "tags": [ + "model" + ], + "description": "Get a list of all prediction models", + "parameters": [ + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } }, - "basePath": "/", - "schemes": [ - "https" - ], - "paths": { - "/model": { - "get": { - "tags": [ - "model" - ], - "description": "Get a list of all prediction models", - "parameters": [ - { - "$ref": "#/parameters/subjectid" - } - ], - "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}": { - "get": { - "tags": [ - "model" - ], - "description": "Get model representation", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/id" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - } - } - }, - "post": { - "tags": [ - "model" - ], - "description": "Predict a compound or a nanoparticle", - "consumes": [ - "multipart/form-data" - ], - "parameters": [ - { - "name": "identifier", - "in": "formData", - "description": "SMILES identifier or Nanoparticle URI or comma separated list of SMILES identifiers or Nanoparticle URI", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/id" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - } - } - } - }, - "/report": { - "get": { - "tags": [ - "report" - ], - "description": "Get a list of QMRF reports", - "parameters": [ - { - "$ref": "#/parameters/subjectid" - } - ], - "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" - } - } - } - }, - "/report/{id}": { - "get": { - "tags": [ - "report" - ], - "description": "Get QMRF for prediction model", - "parameters": [ - { - "$ref": "#/parameters/id" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "application/xml" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - } - } - } - }, - "/dataset": { - "get": { - "tags": [ - "dataset" - ], - "description": "Get a list of all datasets", - "parameters": [ - { - "$ref": "#/parameters/subjectid" - } - ], - "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" - } - } - } - }, - "/dataset/{id}": { - "get": { - "tags": [ - "dataset" - ], - "description": "Get dataset representation", - "parameters": [ - { - "$ref": "#/parameters/id" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "application/json", - "text/csv" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/dataset/{id}/{attribute}": { - "get": { - "tags": [ - "dataset" - ], - "description": "Get dataset representation", - "parameters": [ - { - "name": "attribute", - "in": "path", - "description": "requested attribute", - "required": true, - "type": "string", - "enum": [ - "compounds", - "nanoparticles", - "substances", - "features" - ] - }, - { - "$ref": "#/parameters/id" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/substance": { - "get": { - "tags": [ - "substance" - ], - "description": "Get a list of all substances", - "parameters": [ - { - "$ref": "#/parameters/subjectid" - } - ], - "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" - } - } - } - }, - "/substance/{id}": { - "get": { - "tags": [ - "substance" - ], - "description": "Get substance representation", - "parameters": [ - { - "$ref": "#/parameters/id" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/nanoparticle": { - "get": { - "tags": [ - "nanoparticle" - ], - "description": "Get a list of all nanoparticles", - "parameters": [ - { - "$ref": "#/parameters/subjectid" - } - ], - "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" - } - } - } - }, - "/nanoparticle/{id}": { - "get": { - "tags": [ - "nanoparticle" - ], - "description": "Get nanoparticle representation", - "parameters": [ - { - "$ref": "#/parameters/id" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/feature": { - "get": { - "tags": [ - "feature" - ], - "description": "Get a list of ids for all features", - "parameters": [ - { - "$ref": "#/parameters/subjectid" - } - ], - "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" - } - } - } - }, - "/feature/{id}": { - "get": { - "tags": [ - "feature" - ], - "description": "Get feature representation", - "parameters": [ - { - "$ref": "#/parameters/id" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/validation": { - "get": { - "tags": [ - "validation" - ], - "description": "Get a list of all validation types", - "parameters": [ - { - "$ref": "#/parameters/subjectid" - } - ], - "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" - } - } - } - }, - "/validation/{validationtype}": { - "get": { - "tags": [ - "validation" - ], - "description": "Get all validations of a validation type", - "parameters": [ - { - "$ref": "#/parameters/valtype" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "text/uri-list", - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } - }, - "/validation/{validationtype}/{id}": { - "get": { - "tags": [ - "validation" - ], - "description": "Get validation representation", - "parameters": [ - { - "$ref": "#/parameters/valtype" - }, - { - "$ref": "#/parameters/id" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "403": { - "$ref": "#/responses/403" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - } + "/model/{id}": { + "get": { + "x-orn-@type": "x-orn:Model", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/model", + "x-orn:method": "Get", + "tags": [ + "model" + ], + "description": "Get model representation", + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + } + } + }, + "post": { + "x-orn-@type": "x-orn:Prediction", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/model/{id}", + "x-orn:method": "Post", + "tags": [ + "model" + ], + "description": "Predict a compound or a nanoparticle", + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + } }, - "/compound/descriptor": { - "get": { - "tags": [ - "compound", - "descriptor" - ], - "description": "Get a list of all descriptors", - "parameters": [ - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "text/plain; charset=utf-8", - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } - }, - "post": { - "tags": [ - "compound", - "descriptor" - ], - "summary": "Descriptor calculation", - "description": "Calculate descriptors for a single compound as SMILES string
curl example:
curl -Lk -X POST -i  -H \"Accept:application/json\" -F \"identifier=O=C1NC(=O)NC=C1\" -F \"descriptor=Openbabel.MW,Openbabel.atoms\" https://api.in-silico.ch/compound/descriptor 
.", - "consumes": [ - "multipart/form-data" - ], - "parameters": [ - { - "name": "identifier", - "in": "formData", - "description": "SMILES identifier", - "required": true, - "type": "string" - }, - { - "name": "descriptor", - "in": "formData", - "description": "list of comma seperated descriptors", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "text/csv", - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } + "requestBody": { + "description": "SMILES identifier or Nanoparticle URI or comma separated\nlist of SMILES identifiers or Nanoparticle URI\n", + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "x-orn:schema": "application/x-www-form-urlencoded", + "schema": { + "$ref": "#/components/schemas/postmodel" + } } - }, - "/compound/descriptor/{descriptor}": { - "get": { - "tags": [ - "compound", - "descriptor" - ], - "description": "Get a list of a descriptors", - "parameters": [ - { - "name": "descriptor", - "in": "path", - "description": "descriptor name or ID", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "text/plain; charset=utf-8", - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "500": { - "$ref": "#/responses/500" - } - } + } + } + } + }, + "/report": { + "get": { + "x-orn-@type": "x-orn:Report", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/report", + "x-orn:method": "Get", + "tags": [ + "report" + ], + "description": "Get a list of QMRF reports", + "parameters": [ + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/report/{id}": { + "get": { + "x-orn-@type": "x-orn:Report", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/report/{id}", + "x-orn:method": "Get", + "tags": [ + "report" + ], + "description": "Get QMRF for prediction model", + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + } + } + } + }, + "/dataset": { + "get": { + "x-orn-@type": "x-orn:Dataset", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/dataset", + "x-orn:method": "Get", + "tags": [ + "dataset" + ], + "description": "Get a list of all datasets", + "parameters": [ + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/dataset/{id}": { + "get": { + "x-orn-@type": "x-orn:Dataset", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/dataset/{id}", + "x-orn:method": "Get", + "tags": [ + "dataset" + ], + "description": "Get dataset representation", + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/dataset/{id}/{attribute}": { + "get": { + "x-orn-@type": "x-orn:Dataset", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/dataset/{id}/{attribute}", + "x-orn:method": "Get", + "tags": [ + "dataset" + ], + "description": "Get dataset representation", + "parameters": [ + { + "name": "attribute", + "in": "path", + "description": "requested attribute", + "required": true, + "schema": { + "type": "string", + "enum": [ + "compounds", + "nanoparticles", + "substances", + "features" + ] } + }, + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/substance": { + "get": { + "x-orn-@type": "x-orn:Substance", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/substance", + "x-orn:method": "Get", + "tags": [ + "substance" + ], + "description": "Get a list of all substances", + "parameters": [ + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/substance/{id}": { + "get": { + "x-orn-@type": "x-orn:Substance", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/substance/{id}", + "x-orn:method": "Get", + "tags": [ + "substance" + ], + "description": "Get substance representation", + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/nanoparticle": { + "get": { + "x-orn-@type": "x-orn:Nanoparticle", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/nanoparticle", + "x-orn:method": "Get", + "tags": [ + "nanoparticle" + ], + "description": "Get a list of all nanoparticles", + "parameters": [ + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/nanoparticle/{id}": { + "get": { + "x-orn-@type": "x-orn:Nanoparticle", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/nanoparticle/{id}", + "x-orn:method": "Get", + "tags": [ + "nanoparticle" + ], + "description": "Get nanoparticle representation", + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/feature": { + "get": { + "x-orn-@type": "x-orn:Feature", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/feature", + "x-orn:method": "Get", + "tags": [ + "feature" + ], + "description": "Get a list of ids for all features", + "parameters": [ + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/feature/{id}": { + "get": { + "x-orn-@type": "x-orn:Feature", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/feature/{id}", + "x-orn:method": "Get", + "tags": [ + "feature" + ], + "description": "Get feature representation", + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/validation": { + "get": { + "x-orn-@type": "x-orn:Validation", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/validation", + "x-orn:method": "Get", + "tags": [ + "validation" + ], + "description": "Get a list of all validation types", + "parameters": [ + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/validation/{validationtype}": { + "get": { + "x-orn-@type": "x-orn:Validation", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/validation/{validationtype}", + "x-orn:method": "Get", + "tags": [ + "validation" + ], + "description": "Get all validations of a validation type", + "parameters": [ + { + "$ref": "#/components/parameters/valtype" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/validation/{validationtype}/{id}": { + "get": { + "x-orn-@type": "x-orn:Validation", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/validation/{validationtype}/{id}", + "x-orn:method": "Get", + "tags": [ + "validation" + ], + "description": "Get validation representation", + "parameters": [ + { + "$ref": "#/components/parameters/valtype" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/compound/descriptor": { + "get": { + "x-orn-@type": "x-orn:Descriptor", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/compound/descriptor", + "x-orn:method": "Get", + "tags": [ + "compound", + "descriptor" + ], + "description": "Get a list of all descriptors", + "parameters": [ + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + }, + "post": { + "x-orn-@type": "x-orn:Prediction", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/compound/descriptor", + "x-orn:method": "Post", + "tags": [ + "compound", + "descriptor" + ], + "summary": "Descriptor calculation", + "description": "Calculate descriptors for a single compound as SMILES string", + "parameters": [ + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } }, - "/compound/{InChI}": { - "get": { - "tags": [ - "compound" - ], - "description": "Get compound representation", - "parameters": [ - { - "$ref": "#/parameters/InChI" - }, - { - "$ref": "#/parameters/subjectid" - } - ], - "produces": [ - "application/json", - "chemical/x-daylight-smiles", - "chemical/x-inchi", - "chemical/x-mdl-sdfile", - "chemical/x-mdl-molfile", - "image/png", - "image/svg+xml", - "text/plain" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - } - } + "requestBody": { + "description": "identifier and descriptor/s", + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "x-orn:schema": "application/x-www-form-urlencoded", + "schema": { + "$ref": "#/components/schemas/postdescriptor" + } } - }, - "/api/api.json": { - "get": { - "tags": [ - "api" - ], - "description": "Get swagger api in JSON", - "produces": [ - "application/json" - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "500": { - "$ref": "#/responses/500" - } - } + } + } + } + }, + "/compound/descriptor/{descriptor}": { + "get": { + "x-orn-@type": "x-orn:Descriptor", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/compound/descriptor/{descriptor}", + "x-orn:method": "Get", + "tags": [ + "compound", + "descriptor" + ], + "description": "Get informations about a single descriptor", + "parameters": [ + { + "name": "descriptor", + "in": "path", + "description": "descriptor name or ID", + "required": true, + "schema": { + "type": "string" } + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/compound/{InChI}": { + "get": { + "x-orn-@type": "x-orn:Compound", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/compound/{InChI}", + "x-orn:method": "Get", + "tags": [ + "compound" + ], + "description": "Get compound representation", + "parameters": [ + { + "$ref": "#/components/parameters/InChI" + }, + { + "$ref": "#/components/parameters/subjectid" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + } + } + } + }, + "/api/api.json": { + "get": { + "tags": [ + "api" + ], + "description": "Get swagger api in JSON", + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "500": { + "$ref": "#/components/responses/500" + } + } + } + }, + "/aa/authenticate": { + "post": { + "x-orn-@type": "x-orn:Authentication", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/aa/authenticate", + "x-orn:method": "Post", + "tags": [ + "authentication" + ], + "summary": "Get token", + "description": "Authentication against OpenSSO. Returns authentication token. Requires\nUsername and Password.\n", + "operationId": "login", + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } }, - "/aa/authenticate": { - "post": { - "tags": [ - "authentication" - ], - "summary": "Get token", - "description": "Authentication against OpenSSO. Returns authentication token. Requires Username and Password.", - "operationId": "login", - "consumes": [ - "text/plain; charset=utf-8", - "multipart/form-data" - ], - "produces": [ - "text/plain; charset=utf-8" - ], - "parameters": [ - { - "in": "formData", - "name": "username", - "description": "username", - "required": true, - "type": "string" - }, - { - "in": "formData", - "name": "password", - "description": "password", - "required": true, - "type": "string", - "format": "password" - } - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "500": { - "$ref": "#/responses/500" - } - } + "requestBody": { + "description": "username and password", + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "x-orn:schema": "application/x-www-form-urlencoded", + "schema": { + "$ref": "#/components/schemas/postauth" + } } + } + } + } + }, + "/aa/logout": { + "post": { + "x-orn-@type": "x-orn:Authentication", + "x-orn:path": "https://dg-lazar.prod.openrisknet.org/aa/logout", + "x-orn:method": "Post", + "description": "Devalidates a token. Requires Subjectid.", + "summary": "Destroy token", + "operationId": "logout", + "tags": [ + "authentication" + ], + "responses": { + "200": { + "$ref": "#/components/responses/200" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } }, - "/aa/logout": { - "post": { - "description": "Devalidates a token. Requires Subjectid.", - "summary": "Destroy token", - "operationId": "logout", - "tags": [ - "authentication" - ], - "consumes": [ - "text/plain; charset=utf-8", - "multipart/form-data" - ], - "produces": [ - "text/plain; charset=utf-8" - ], - "parameters": [ - { - "in": "formData", - "name": "subjectid", - "description": "subjectid", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "$ref": "#/responses/200" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "500": { - "$ref": "#/responses/500" - } - } + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "x-orn:schema": "application/x-www-form-urlencoded", + "schema": { + "$ref": "#/components/schemas/postlogout" + } } + } } + } + } + }, + "tags": [ + { + "name": "api", + "description": "Swagger API representation in JSON" }, - "parameters": { - "id": { - "name": "id", - "in": "path", - "description": "id", - "required": true, - "type": "string" - }, - "InChI": { - "name": "InChI", - "in": "path", - "description": "InChI String", - "required": true, - "type": "string" - }, - "valtype": { - "name": "validationtype", - "in": "path", - "description": "validation type", - "required": true, - "type": "string" - }, - "subjectid": { - "in": "header", - "name": "subjectid", - "description": "authorization token", - "required": false, + { + "name": "algorithm", + "description": "Algorithm" + }, + { + "name": "authentication", + "description": "minimal Authentication service" + }, + { + "name": "compound", + "description": "Compound" + }, + { + "name": "dataset", + "description": "Dataset" + }, + { + "name": "descriptor", + "description": "Descriptor" + }, + { + "name": "feature", + "description": "Feature" + }, + { + "name": "model", + "description": "Lazar Model Service" + }, + { + "name": "nanoparticle", + "description": "Nanoparticle" + }, + { + "name": "report", + "description": "QMRF Reporting" + }, + { + "name": "substance", + "description": "Substance" + }, + { + "name": "validation", + "description": "Validation" + } + ], + "components": { + "schemas": { + "postmodel": { + "type": "object", + "properties": { + "identifier": { + "x-orn:property": "identifier", + "type": "string", + "example": "O=C1NC(=O)NC=C1" + } + } + }, + "postdescriptor": { + "type": "object", + "properties": { + "identifier": { + "x-orn:property": "identifier", + "type": "string", + "example": "O=C1NC(=O)NC=C1" + }, + "descriptor": { + "x-orn:property": "descriptor", + "type": "string", + "example": "Openbabel.MW,Openbabel.atoms" + } + } + }, + "postauth": { + "type": "object", + "properties": { + "username": { + "x-orn:property": "username", "type": "string" - }, - "subjectidRequired": { - "in": "header", - "name": "subjectid", - "description": "authorization token", - "required": true, + }, + "password": { + "x-orn:property": "password", + "type": "string", + "format": "password" + } + } + }, + "postlogout": { + "type": "object", + "properties": { + "subjectid": { + "x-orn:property": "subjectid", "type": "string" + } } + } }, - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Resource Not Found" - }, - "500": { - "description": "Server Error" + "parameters": { + "id": { + "name": "id", + "in": "path", + "description": "id", + "required": true, + "schema": { + "type": "string" + } + }, + "InChI": { + "name": "InChI", + "in": "path", + "description": "InChI String", + "required": true, + "schema": { + "type": "string" } + }, + "valtype": { + "name": "validationtype", + "in": "path", + "description": "validation type", + "required": true, + "schema": { + "type": "string" + } + }, + "subjectid": { + "in": "header", + "name": "subjectid", + "description": "authorization token", + "required": false, + "schema": { + "type": "string" + } + }, + "subjectidRequired": { + "in": "header", + "name": "subjectid", + "description": "authorization token", + "required": true, + "schema": { + "type": "string" + } + } }, - "tags": [ - { - "name": "api", - "description": "Swagger API representation in JSON" - }, - { - "name": "algorithm", - "description": "Algorithm" - }, - { - "name": "authentication", - "description": "minimal Authentication service" - }, - { - "name": "compound", - "description": "Compound" - }, - { - "name": "dataset", - "description": "Dataset" - }, - { - "name": "descriptor", - "description": "Descriptor" - }, - { - "name": "feature", - "description": "Feature" - }, - { - "name": "model", - "description": "Lazar Model Service" - }, - { - "name": "nanoparticle", - "description": "Nanoparticle" - }, - { - "name": "report", - "description": "QMRF Reporting" - }, - { - "name": "substance", - "description": "Substance" - }, - { - "name": "validation", - "description": "Validation" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "x-orn:returns": "application/json", + "schema": { + "type": "object" + } + } } - ] + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Resource Not Found" + }, + "500": { + "description": "Server Error" + } + } + } } -- cgit v1.2.3