This repository was archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
RESTful webservice
Markus List edited this page Feb 25, 2015
·
2 revisions
In version 1.3, OLF introduces a RESTful webservice that provides full programmatic access to DataObjects found in OpenLabFramework. The RESTfulController that has been implemented to this end will only accept SSL connections that provide a valid token (see AppAccessTokens). The RESTful webservice currently offers two methods. Both return their results in JSON format.
#Search using a query The search method utilized the power of the lucene search to offer a list of DataObjects:
Usage: https://.../restful/search?query=${query}&type=${type}&token=${token}
- query: required. Lucene compatible search query. Symbols will be escaped.
- type: optional. If provided, the search will be limited to a specific type of DataObject.
- token: required. Needs to be created by an administrator first.
Output:
{
total: 1,
results: [
{
id: 25,
label: "Hewl"
}
],
data: [
{
class: "org.openlab.genetracker.Gene",
id: 25,
accessionNumber: "3.2.1.17",
alternativeSplicing: true,
creator: null,
dateCreated: "2015-01-23T15:25:07Z",
description: "Hen Egg White Lysozyme",
geneType: "Wildtype",
lastModifier: null,
lastUpdate: "2015-01-23T15:25:07Z",
length: 0,
mutation: true,
name: "Hewl",
notes: "N-acetylmuramide glycanhydrolase",
orfStart: 0,
orfStop: 0,
organism: null,
origin: null,
originDescription: null,
projects: [ ],
sequence: ">gi|212274|gb|J00885.1|CHKLSZ4 Chicken egg white lysozyme gene: exon-4 and 3' flank TCTCCCTCCGCCCAGGGTCGCCTGGCGCAACCGCTGCAAGGGCACCGACGTCCAGGCGTGGATCAGAGGC TGCCGGCTGTGAGGAGCTGCCGCACCCGGCCCGCCCGCTGCACAGCCGGCCGCTTTGCGAGCGCGACGCT ACCCGCTTGGCAGTTTTAAACGCATCCCTCATTAAAACGACTATACGCAAACGCCTT",
wildTypeGene: null
}
],
status: "OK"
}#Get DataObject
Usage: https://.../restful/search?id=${id}&token=${token}
- id: required. DataObject id
- token: required.
Output:
{
result: {
class: "org.openlab.genetracker.Gene",
id: 25,
accessionNumber: "3.2.1.17",
alternativeSplicing: true,
creator: {
class: "User",
id: 1
},
dateCreated: "2015-01-23T15:25:07Z",
description: "Hen Egg White Lysozyme",
geneType: "Wildtype",
lastModifier: {
class: "User",
id: 1
},
lastUpdate: "2015-01-23T15:25:07Z",
length: 0,
mutation: true,
name: "Hewl",
notes: "N-acetylmuramide glycanhydrolase",
orfStart: 0,
orfStop: 0,
organism: {
class: "Organism",
id: 1
},
origin: null,
originDescription: null,
projects: [ ],
sequence: ">gi|212274|gb|J00885.1|CHKLSZ4 Chicken egg white lysozyme gene: exon-4 and 3' flank TCTCCCTCCGCCCAGGGTCGCCTGGCGCAACCGCTGCAAGGGCACCGACGTCCAGGCGTGGATCAGAGGC TGCCGGCTGTGAGGAGCTGCCGCACCCGGCCCGCCCGCTGCACAGCCGGCCGCTTTGCGAGCGCGACGCT ACCCGCTTGGCAGTTTTAAACGCATCCCTCATTAAAACGACTATACGCAAACGCCTT",
wildTypeGene: null
},
status: "OK"
}