summaryrefslogtreecommitdiff
path: root/api/api.json
diff options
context:
space:
mode:
Diffstat (limited to 'api/api.json')
-rw-r--r--api/api.json1000
1 files changed, 1000 insertions, 0 deletions
diff --git a/api/api.json b/api/api.json
new file mode 100644
index 0000000..6d42127
--- /dev/null
+++ b/api/api.json
@@ -0,0 +1,1000 @@
+{
+ "openapi": "3.0.0",
+ "servers": [
+ {
+ "url": "https://SERVER_URI/api"
+ }
+ ],
+ "info": {
+ "description": "REST API webservice for lazar. \n\n*lazar* (lazy structure–activity relationships) is a modular framework for\npredictive toxicology.",
+ "version": "1.4.0",
+ "title": "Lazar REST Service",
+ "contact": {
+ "name": "in silico toxicology gmbh",
+ "email": "info@in-silico.ch",
+ "url": "https://in-silico.ch"
+ },
+ "license": {
+ "name": "GNU GENERAL PUBLIC LICENSE",
+ "url": "https://github.com/opentox/lazar-rest/blob/master/LICENSE"
+ }
+ },
+ "externalDocs": {
+ "description": "See also documentation\n",
+ "url": "https://github.com/OpenRiskNet/home/blob/master/openshift/deployments/lazar/README.md"
+ },
+ "paths": {
+ "/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"
+ }
+ }
+ }
+ },
+ "/compound/descriptor": {
+ "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": {
+ "tags": [
+ "compound",
+ "descriptor"
+ ],
+ "summary": "Descriptor calculation",
+ "description": "Calculate descriptors for a single compound as SMILES string",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/subjectid"
+ }
+ ],
+ "responses": {
+ "202": {
+ "$ref": "#/components/responses/202"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
+ },
+ "401": {
+ "$ref": "#/components/responses/401"
+ },
+ "404": {
+ "$ref": "#/components/responses/404"
+ },
+ "500": {
+ "$ref": "#/components/responses/500"
+ }
+ },
+ "requestBody": {
+ "description": "identifier and descriptor/s",
+ "required": true,
+ "content": {
+ "application/x-www-form-urlencoded": {
+ "schema": {
+ "$ref": "#/components/schemas/postdescriptor"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/compound/descriptor/{descriptor}": {
+ "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": {
+ "tags": [
+ "compound"
+ ],
+ "description": "Get compound representation",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/InChI"
+ },
+ {
+ "$ref": "#/components/parameters/subjectid"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "example": "InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H"
+ }
+ },
+ "chemical/x-daylight-smiles": {
+ "schema": {
+ "type": "string",
+ "example": "InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H"
+ }
+ },
+ "chemical/x-inchi": {
+ "schema": {
+ "type": "string",
+ "example": "InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H"
+ }
+ },
+ "chemical/x-mdl-sdfile": {
+ "schema": {
+ "type": "string",
+ "example": "InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H"
+ }
+ },
+ "image/png": {
+ "schema": {
+ "type": "string",
+ "example": "InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H"
+ }
+ },
+ "image/svg+xml": {
+ "schema": {
+ "type": "string",
+ "example": "InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H"
+ }
+ },
+ "text/plain": {
+ "schema": {
+ "type": "string",
+ "example": "InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H"
+ }
+ }
+ }
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
+ },
+ "500": {
+ "$ref": "#/components/responses/500"
+ }
+ }
+ }
+ },
+ "/dataset": {
+ "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": {
+ "tags": [
+ "dataset"
+ ],
+ "description": "Get dataset representation",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/id"
+ },
+ {
+ "$ref": "#/components/parameters/subjectid"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "text/csv": {
+ },
+ "application/csv": {
+ }
+ }
+ },
+ "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": {
+ "tags": [
+ "dataset"
+ ],
+ "description": "Get dataset representation",
+ "parameters": [
+ {
+ "name": "attribute",
+ "in": "path",
+ "description": "requested attribute",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "enum": [
+ "compounds",
+ "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"
+ }
+ }
+ }
+ },
+ "/endpoint": {
+ "get": {
+ "tags": [
+ "endpoint"
+ ],
+ "description": "Get a list of all available endpoints",
+ "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"
+ }
+ }
+ }
+ },
+ "/endpoint/{endpoint}": {
+ "get": {
+ "tags": [
+ "endpoint"
+ ],
+ "description": "Get a list of all available models for an endpoint",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/endpoint"
+ },
+ {
+ "$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": {
+ "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": {
+ "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"
+ }
+ }
+ }
+ },
+ "/model": {
+ "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"
+ }
+ }
+ }
+ },
+ "/model/{id}": {
+ "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": {
+ "tags": [
+ "model"
+ ],
+ "description": "Predict a compound.",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/id"
+ },
+ {
+ "$ref": "#/components/parameters/subjectid"
+ }
+ ],
+ "responses": {
+ "202": {
+ "$ref": "#/components/responses/202"
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
+ },
+ "401": {
+ "$ref": "#/components/responses/401"
+ },
+ "403": {
+ "$ref": "#/components/responses/403"
+ },
+ "404": {
+ "$ref": "#/components/responses/404"
+ }
+ },
+ "requestBody": {
+ "description": "SMILES identifier.\n",
+ "required": true,
+ "content": {
+ "application/x-www-form-urlencoded": {
+ "schema": {
+ "$ref": "#/components/schemas/postmodel"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/report": {
+ "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": {
+ "tags": [
+ "report"
+ ],
+ "description": "Get QMRF for prediction model",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/id"
+ },
+ {
+ "$ref": "#/components/parameters/subjectid"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/xml": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "400": {
+ "$ref": "#/components/responses/400"
+ },
+ "401": {
+ "$ref": "#/components/responses/401"
+ },
+ "403": {
+ "$ref": "#/components/responses/403"
+ },
+ "404": {
+ "$ref": "#/components/responses/404"
+ }
+ }
+ }
+ },
+ "/substance": {
+ "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": {
+ "tags": [
+ "substance"
+ ],
+ "description": "Get substance representation by ID",
+ "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": {
+ "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": {
+ "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": {
+ "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"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ {
+ "name": "api",
+ "description": "Swagger API representation in JSON"
+ },
+ {
+ "name": "compound",
+ "description": "Compound"
+ },
+ {
+ "name": "dataset",
+ "description": "Dataset"
+ },
+ {
+ "name": "descriptor",
+ "description": "Descriptor"
+ },
+ {
+ "name": "endpoint",
+ "description": "Endpoint"
+ },
+ {
+ "name": "feature",
+ "description": "Feature"
+ },
+ {
+ "name": "model",
+ "description": "Lazar Model Service"
+ },
+ {
+ "name": "report",
+ "description": "QMRF Reporting"
+ },
+ {
+ "name": "substance",
+ "description": "Substance"
+ },
+ {
+ "name": "validation",
+ "description": "Validation"
+ }
+ ],
+ "components": {
+ "schemas": {
+ "postmodel": {
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "type": "string",
+ "example": "O=C1NC(=O)NC=C1"
+ }
+ }
+ },
+ "postdescriptor": {
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "type": "string",
+ "example": "O=C1NC(=O)NC=C1"
+ },
+ "descriptor": {
+ "type": "string",
+ "example": "Openbabel.MW,Openbabel.atoms"
+ }
+ }
+ }
+ },
+ "parameters": {
+ "id": {
+ "name": "id",
+ "in": "path",
+ "description": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "endpoint": {
+ "name": "endpoint",
+ "in": "path",
+ "description": "type",
+ "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",
+ "enum": [
+ "crossvalidation",
+ "leaveoneout",
+ "repeatedcrossvalidation",
+ "regressioncrossvalidation"
+ ]
+ }
+ },
+ "subjectid": {
+ "in": "header",
+ "name": "subjectid",
+ "description": "authorization token",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "201": {
+ "description": "Created",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "202": {
+ "description": "Accepted",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ },
+ "text/plain": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad Request"
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Resource Not Found"
+ },
+ "500": {
+ "description": "Server Error"
+ }
+ }
+ }
+}