summaryrefslogtreecommitdiff
path: root/api/validation.json
blob: 900df8c802b9520334a0d050d86ad3a84b0e796a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
{
    "swagger": "2.0",
    "info": {
        "description": "An OpenTox REST Webservice for validation and reporting\n",
        "version": "1.0.0",
        "title": "OpenTox Validation",
        "contact": {
            "name": "Martin Guetlein, Christoph Helma"
        },
        "license": {
            "name": "GNU GENERAL PUBLIC LICENSE",
            "url": "https://github.com/opentox/validation/blob/master/LICENSE"
        }
    },
    "host": "enm.in-silico.ch",
    "basePath": "/",
    "schemes": [
        "https"
    ],
    "paths": {
        "/validation": {
            "head": {
                "tags": [
                    "validation"
                ],
                "description": "for service check",
                "responses": {
                    "200": {
                        "$ref": "#/responses/200"
                    },
                    "400": {
                        "$ref": "#/responses/400"
                    },
                    "401": {
                        "$ref": "#/responses/401"
                    },
                    "404": {
                        "$ref": "#/responses/404"
                    }
                }
            },
            "get": {
                "tags": [
                    "validation"
                ],
                "description": "Get a list of all validations",
                "parameters": [
                    {
                        "name": "accept",
                        "in": "header",
                        "description": "requested Content-Type",
                        "required": true,
                        "type": "string",
                        "enum": [
                            "text/uri-list",
                            "text/turtle",
                            "text/plain",
                            "text/html",
                            "application/rdf+xml",
                            "application/sparql-results+xml"
                        ]
                    },
                    {
                        "$ref": "#/parameters/subjectid"
                    }
                ],
                "produces": [
                    "text/uri-list",
                    "text/turtle",
                    "text/plain",
                    "text/html",
                    "application/rdf+xml",
                    "application/sparql-results+xml"
                ],
                "responses": {
                    "200": {
                        "$ref": "#/responses/200"
                    },
                    "400": {
                        "$ref": "#/responses/400"
                    },
                    "401": {
                        "$ref": "#/responses/401"
                    },
                    "404": {
                        "$ref": "#/responses/404"
                    }
                }
            }
        },
        "/validation/test_set_validation": {
            "post": {
                "consumes": [
                    "application/x-www-form-urlencoded"
                ],
                "tags": [
                    "validation"
                ],
                "description": "Validates a model on a test dataset",
                "produces": [
                    "application/rdf+xml",
                    "application/x-yaml",
                    "text/html",
                    "text/uri-list"
                ],
                "parameters": [
                    {
                        "$ref": "#/parameters/subjectid"
                    },
                    {
                        "name": "model_uri",
                        "description": "model URI",
                        "type": "string",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "name": "test_dataset_uri",
                        "description": "test dataset URI",
                        "type": "string",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "name": "test_target_dataset_uri",
                        "description": "test target dataset URI (default=test_dataset_uri)",
                        "type": "string",
                        "in": "formData",
                        "required": false
                    },
                    {
                        "name": "prediction_feature",
                        "description": "prediction feature URI (default= dependent variable of model)",
                        "type": "string",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "$ref": "#/responses/200"
                    },
                    "202": {
                        "$ref": "#/responses/202"
                    },
                    "400": {
                        "$ref": "#/responses/400"
                    },
                    "401": {
                        "$ref": "#/responses/401"
                    },
                    "404": {
                        "$ref": "#/responses/404"
                    },
                    "500": {
                        "$ref": "#/responses/500"
                    }
                }
            }
        }
    },
    "parameters": {
        "subjectid": {
            "name": "subjectid",
            "in": "header",
            "description": "authorization token",
            "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": "validation",
            "description": "Validation service"
        }
    ]
}