1
|
<html>
|
2
|
<head><title>Document similarity RESTful service API description</title></head>
|
3
|
<body>
|
4
|
<h1>1 Description</h1>
|
5
|
|
6
|
This document contains the description of the RESTful API of the service. The service itself is available at <code>http://services.ceon.pl/coansys/document_similarity.do</code>.
|
7
|
|
8
|
<h1>2 Input</h1>
|
9
|
|
10
|
The service accepts a query being a text conforming to the JSON schema presented in this section. The query has to be sent using the HTTP POST method.
|
11
|
|
12
|
<h2>2.1 Example</h2>
|
13
|
<pre>
|
14
|
{
|
15
|
"inputObject":{
|
16
|
"doi":"10.3791/3308"
|
17
|
}
|
18
|
}
|
19
|
</pre>
|
20
|
|
21
|
<h2>2.2 JSON schema</h2>
|
22
|
<pre>
|
23
|
{
|
24
|
"type":"object",
|
25
|
"required":true,
|
26
|
"properties":{
|
27
|
"inputObject":{
|
28
|
"type":"object",
|
29
|
"required":true,
|
30
|
"properties":{
|
31
|
"doi":{
|
32
|
"type":"string",
|
33
|
"required":true
|
34
|
}
|
35
|
}
|
36
|
}
|
37
|
}
|
38
|
}
|
39
|
</pre>
|
40
|
|
41
|
<h1>3 Output</h1>
|
42
|
|
43
|
The service returns an answer conforming to the JSON schema presented in this section.
|
44
|
|
45
|
<h2>3.1 Example</h2>
|
46
|
|
47
|
<h3>3.1.1 Result from a successful query</h3>
|
48
|
|
49
|
<pre>
|
50
|
{
|
51
|
"outputObject":{
|
52
|
"givenArticleDetails":{
|
53
|
"doi":"10.3791/3308",
|
54
|
"year":"2012",
|
55
|
"title":"ImplantationofaCarotidCuffforTriggeringShear-stressInducedAtherosclerosisinMice",
|
56
|
"authors":[
|
57
|
"MichaelT.Kuhlmann",
|
58
|
"SimonCuhlmann",
|
59
|
"IrmgardHoppe",
|
60
|
"RobKrams",
|
61
|
"PaulC.Evans",
|
62
|
"GustavJ.Strijkers",
|
63
|
"KlaasNicolay",
|
64
|
"SvenHermann",
|
65
|
"MichaelSchäfers"
|
66
|
]
|
67
|
},
|
68
|
"similarResults":[
|
69
|
{
|
70
|
"sim":"0.9",
|
71
|
"doi":"10.3791/9",
|
72
|
"year":"2012",
|
73
|
"title":"Implantation",
|
74
|
"authors":[
|
75
|
"MichaelT.Kuhlmann"
|
76
|
]
|
77
|
},
|
78
|
{
|
79
|
"sim":"0.8",
|
80
|
"doi":"10.3791/8",
|
81
|
"year":"2012",
|
82
|
"title":"of",
|
83
|
"authors":[
|
84
|
"SimonCuhlmann"
|
85
|
]
|
86
|
},
|
87
|
{
|
88
|
"sim":"0.7",
|
89
|
"doi":"10.3791/7",
|
90
|
"year":"2012",
|
91
|
"title":"a",
|
92
|
"authors":[
|
93
|
"IrmgardHoppe"
|
94
|
]
|
95
|
},
|
96
|
{
|
97
|
"sim":"0.6",
|
98
|
"doi":"10.3791/6",
|
99
|
"year":"2012",
|
100
|
"title":"CarotidCuff",
|
101
|
"authors":[
|
102
|
"RobKrams"
|
103
|
]
|
104
|
},
|
105
|
{
|
106
|
"sim":"0.5",
|
107
|
"doi":"10.3791/5",
|
108
|
"year":"2012",
|
109
|
"title":"forTriggering",
|
110
|
"authors":[
|
111
|
"PaulC.Evans"
|
112
|
]
|
113
|
}
|
114
|
]
|
115
|
}
|
116
|
}
|
117
|
</pre>
|
118
|
|
119
|
<h3>3.1.2 Result from an erroneous query</h3>
|
120
|
|
121
|
<pre>
|
122
|
{
|
123
|
"error":"LoremIpsumError: LoremIpsum"
|
124
|
}
|
125
|
</pre>
|
126
|
|
127
|
<h2>3.2 JSON schema</h2>
|
128
|
<pre>
|
129
|
{
|
130
|
"type":"object",
|
131
|
"required":true,
|
132
|
"properties":{
|
133
|
"outputObject":{
|
134
|
"type":"object",
|
135
|
"required":true,
|
136
|
"properties":{
|
137
|
"givenArticleDetails":{
|
138
|
"type":"object",
|
139
|
"required":true,
|
140
|
"properties":{
|
141
|
"doi":{
|
142
|
"type":"string",
|
143
|
"required":true
|
144
|
},
|
145
|
"year":{
|
146
|
"type":"string",
|
147
|
"required":true
|
148
|
},
|
149
|
"title":{
|
150
|
"type":"string",
|
151
|
"required":true
|
152
|
},
|
153
|
"authors":{
|
154
|
"type":"array",
|
155
|
"required":true,
|
156
|
"items":{
|
157
|
"type":"string",
|
158
|
"required":true
|
159
|
}
|
160
|
}
|
161
|
}
|
162
|
},
|
163
|
"similarResults":{
|
164
|
"type":"array",
|
165
|
"required":true,
|
166
|
"document":{
|
167
|
"type":"object",
|
168
|
"required":true,
|
169
|
"properties":{
|
170
|
"sim":{
|
171
|
"type":"float",
|
172
|
"required":true
|
173
|
},
|
174
|
"doi":{
|
175
|
"type":"string",
|
176
|
"required":true
|
177
|
},
|
178
|
"year":{
|
179
|
"type":"string",
|
180
|
"required":true
|
181
|
},
|
182
|
"title":{
|
183
|
"type":"string",
|
184
|
"required":true
|
185
|
},
|
186
|
"authors":{
|
187
|
"type":"array",
|
188
|
"required":true,
|
189
|
"items":{
|
190
|
"type":"string",
|
191
|
"required":true
|
192
|
}
|
193
|
}
|
194
|
}
|
195
|
}
|
196
|
}
|
197
|
}
|
198
|
}
|
199
|
}
|
200
|
}
|
201
|
</pre>
|
202
|
|
203
|
</body>
|
204
|
</html>
|