-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path14_01_ops_search.ttl
More file actions
45 lines (39 loc) · 1.91 KB
/
14_01_ops_search.ttl
File metadata and controls
45 lines (39 loc) · 1.91 KB
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
@base <http://www.openphacts.org/api> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix api: <http://purl.org/linked-data/api/vocab#> .
@prefix ops: <http://www.openphacts.org/api#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<#opsSearch> a api:API ;
rdfs:label "Open PHACTS search services"@en;
api:sparqlEndpoint <http://localhost:8890/sparql/> ;
api:contentNegotiation api:parameterBased ;
api:variable <#q> ;
api:variable <#limit> ;
api:variable <#branch> ;
api:description "An API configuration to map free text to a set of URIs." ;
api:endpoint [
a api:ExternalHTTPService ;
api:name "Free Text to 'thing'" ;
api:enableCache false ;
api:description "A set of URIs associated with the input free text." ;
api:uriTemplate "/search?query={q}" ;
api:externalRequestTemplate "http://localhost:8839/search?query={query}" ;
api:externalResponseHandler "converters/ops_search_json_to_rdf.php" ;
api:exampleRequestPath "/search?query=aspirin&limit=15" ;
api:viewer <#externalResponseViewer> ;
api:defaultViewer <#externalResponseViewer> ] .
<#q> api:name "query" ;
api:label "query";
api:value "Query; required. E.g. aspirin" .
<#limit> api:name "limit" ;
api:label "limit";
api:value "Limits the number of results; optional. Minimum value is 1, maximum value is common sense. Default value is 25." .
<#branch> api:name "branch" ;
api:label "branch" ;
api:value "The search results will be filtered by this source authority; optional. Can be multiple values in an array. Possible values: chembl, chebi, uniprot, wikipathways, go, ocrs, drugbank" .
<#type> api:name "type" ;
api:label "type" ;
api:value "The type of thing you want to search for; optional. Limited to one value eg compound. Possible values are compound, target, gene, pathway." .
<#externalResponseViewer> a api:Viewer ;
api:name "externalResponseViewer" .