...
Table of Contents |
---|
Introduction
See Service API Design for the rationale and design details for this api.
See Developer Bootstrap#DeveloperBootstrap-ServiceDevelopment for instructions on how to run a local instance of this service.
Encoding
The primary request and response encoding for the service is JSON. Here's a handy tool to make a blob of JSON more readable: http://jsonformatter.curiousconcept.com/
...
In
...
responses
...
from
...
the
...
service,
...
dates
...
are
...
serialized
...
as
...
long
...
integers
...
expressing
...
epoch
...
time
...
-
...
the
...
number
...
of
...
seconds
...
elapsed
...
since
...
midnight
...
Coordinated
...
Universal
...
Time
...
(UTC)
...
of
...
January
...
1,
...
1970,
...
not
...
counting
...
leap
...
seconds.
...
Here's
...
a
...
handy
...
tool
...
to
...
convert
...
from
...
epoch
...
time
...
to
...
human
...
readable
...
dates:
...
http://www.epochconverter.com/
...
In
...
requests
...
to
...
the
...
service,
...
dates
...
can
...
be
...
serialized
...
either
...
as
...
long
...
integers
...
expressing
...
epoch
...
time
...
or
...
human
...
readable
...
dates
...
in
...
http://www.ietf.org/rfc/rfc3339.txt
...
format
...
such
...
as
...
'2011-01-31'
...
or
...
'2011-01-31T22:00:00'
...
Security
Eventually these services will be HTTPS only and disallow HTTP. Users will pass something like ?access_token=...
...
as
...
a
...
query
...
parameter
...
for
...
every
...
request
...
to
...
the
...
service
...
Usage
...
Examples
...
This
...
is
...
a
...
REST
...
api
...
(see
...
...
...
...
for
...
more
...
details
...
as
...
to
...
what
...
this
...
means).
...
You
...
can
...
create
...
entities,
...
updated
...
entities,
...
read
...
entities,
...
and
...
delete
...
entities.
...
More
...
advanced
...
querying
...
will
...
be
...
implemented
...
as
...
a
...
separate
...
API.
...
Partial
...
updates
...
(e.g.,
...
just
...
updating
...
two
...
fields
...
in
...
a
...
dataset)
...
are
...
not
...
supported.
...
In
...
a
...
nutshell,
...
when
...
you
...
update
...
something
...
like
...
a
...
dataset,
...
you
...
GET
...
the
...
dataset
...
first,
...
modify
...
the
...
properties
...
you
...
want
...
to
...
change,
...
and
...
then
...
send
...
the
...
entire
...
object
...
back
...
to
...
the
...
service
...
so
...
that
...
this
...
revised
...
entity
...
overwrites
...
the
...
previously
...
stored
...
entity.
...
Get
...
Datasets
...
Optional
...
Parameters
- offset - integer - 1-based
...
- pagination
...
- offset
- limit - integer - maximum number of results to return
- sort - string - the name of the primary field upon which to sort
- ascending - boolean - whether or not to sort ascending
Request
Code Block |
---|
curl -i -H Accept:application/json "http://deflaux-test.appspot.com/repo/v1/dataset?limit=3"
{code}
Response{code} |
Response
Code Block |
---|
HTTP/1.1 200 OK
ETag: 22610276
Content-Type: application/json
Date: Tue, 01 Feb 2011 18:07:45 GMT
Server: Google Frontend
Cache-Control: private, x-gzip-ok=""
Transfer-Encoding: chunked
{
"results":[
{
"name":"Pediatric AML TARGET",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA/annotations",
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA",
"version":"0.0.1",
"description":null,
"status":"In Transition",
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYgvcCDA",
"etag":"1703131409",
"creator":"Soheil Meshinchi",
"creationDate":1296182253120,
"releaseDate":null,
"layers":[
{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"type":"C",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",
"type":"E",
"uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
"type":"G",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
}
]
},
{
"name":"Flint HS Mice",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDA/annotations",
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDA",
"version":"0.0.1",
"description":null,
"status":"Future",
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQY2q0DDA",
"etag":"1025901212",
"creator":"Jonathan Flint",
"creationDate":1296182255070,
"releaseDate":null,
"layers":[
{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"type":"C",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",
"type":"E",
"uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
"type":"G",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
}
]
},
{
"name":"Glioblastoma TCGA",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotations",
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA",
"version":"0.0.1",
"description":null,
"status":"Available",
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA",
"etag":"456728335",
"creator":null,
"creationDate":1296182238229,
"releaseDate":null,
"layers":[
{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"type":"C",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",
"type":"E",
"uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
"type":"G",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
}
]
}
],
"totalNumberOfResults":10,
"paging":{
"next":"/repo/v1/dataset?offset=4&limit=3"
}
}
{code}
h2. Get a Dataset
Request{code} |
Get a Dataset
Request
Code Block |
---|
curl -i -H Accept:application/json "http://deflaux-test.appspot.com/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA"
{code}
Response{code} |
Response
Code Block |
---|
HTTP/1.1 200 OK
ETag: 456728335
Content-Type: application/json
Date: Tue, 01 Feb 2011 18:22:24 GMT
Server: Google Frontend
Cache-Control: private, x-gzip-ok=""
Transfer-Encoding: chunked
{
"name":"Glioblastoma TCGA",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotations",
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA",
"version":"0.0.1",
"description":null,
"status":"Available",
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA",
"etag":"456728335",
"creator":null,
"creationDate":1296182238229,
"releaseDate":null,
"layers":[
{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"type":"C",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",
"type":"E",
"uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
"type":"G",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
}
]
}
{code}
h2. Get Annotations for a Dataset
Request{code} |
Get Annotations for a Dataset
Request
Code Block |
---|
curl -i -H Accept:application/json "http://deflaux-test.appspot.com/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotations"
{code}
Response{code} |
Response
Code Block |
---|
HTTP/1.1 200 OK
ETag: -1919132670
Content-Type: application/json
Date: Tue, 01 Feb 2011 18:24:15 GMT
Server: Google Frontend
Cache-Control: private, x-gzip-ok=""
Transfer-Encoding: chunked
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA",
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYseQDDA/annotations",
"etag":"-1919132670",
"creationDate":null,
"stringAnnotations":{
"Disease":[
"Cancer"
],
"Tumor / Tissue Type":[
"Glioblastoma"
],
"Species":[
"Human"
],
"Institution":[
"TCGA"
],
"Reference / PubMed ID":[
"18772890" ]
},
"floatAnnotations":{
"Number of Samples":[
465.0
]
},
"dateAnnotations":{
}
}
{code}
h2. Create a Dataset
Request:{code} |
Create a Dataset
Request:
Code Block |
---|
curl -i -H Accept:application/json -H Content-Type:application/json
-d '{"name":"test dataset", "creator":"fake creator", "releaseDate":"2009-10-01", "status":"not curated"}'
http://localhost:8080/repo/v1/dataset
{code}
Response{code} |
Response
Code Block |
---|
HTTP/1.1 201 Created
ETag: 1736839268
Location: /repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYBAw
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.x)
{
"name":"test dataset",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations",
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"version":"0.0.1",
"creator":"fake creator",
"description":null,
"creationDate":1296595870715,
"status":"not curated",
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"etag":"1309185941",
"releaseDate":1254355200000,
"layers":[
{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"type":"C",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",
"type":"E",
"uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
"type":"G",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
}
]
}
{code}
h2. Update a Dataset
Note that in the example below the creator and description fields have been changed but all others remain the same.
Request:{code} |
Update a Dataset
Note that in the example below the creator and description fields have been changed but all others remain the same.
Request:
Code Block |
---|
curl -i -H Accept:application/json -H Content-Type:application/json -X PUT -H ETag:1309185941 -d '{
"name":"test dataset",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations",
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"version":"0.0.1",
"creator":"updated creator",
"description":"I just added a description",
"creationDate":1296595870715,
"status":"not curated",
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"etag":"1309185941",
"releaseDate":1254355200000,
"layers":[
{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"type":"C",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",
"type":"E",
"uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
"type":"G",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
}
]
}
' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw
{code}
Response{code} |
Response
Code Block |
---|
HTTP/1.1 200 OK
ETag: -852418664
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.x)
{
"name":"test dataset",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations",
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"version":"0.0.1",
"creator":"updated creator",
"description":"I just added a description",
"creationDate":1296595870715,
"status":"not curated",
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"etag":"-852418664",
"releaseDate":1254355200000,
"layers":[
{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"type":"C",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA",
"type":"E",
"uri":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYiaECDA"
},
{
"id":"agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA",
"type":"G",
"uri":"/datalayer/agxkZWZsYXV4LXRlc3RyFQsSDUdBRUpET0RhdGFzZXQYmfIBDA"
}
]
}
{code}
h2. Add Annotations to a Dataset
First get the empty annotations container for your newly created dataset
Request{code} |
Add Annotations to a Dataset
First get the empty annotations container for your newly created dataset
Request
Code Block |
---|
curl -i http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations
{code}
Response{code} |
Response
Code Block |
---|
HTTP/1.1 200 OK
ETag: 923521
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.x)
{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"creationDate":null,
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations",
"etag":"923521",
"stringAnnotations":{
},
"floatAnnotations":{
},
"dateAnnotations":{
}
}
{code}
|
Then
...
you
...
add/modify
...
the
...
annotations
...
of
...
interest
...
and
...
do
...
a
...
PUT.
...
Note
...
that
...
annotation
...
values
...
must
...
always
...
be
...
list
...
values
...
even
...
if
...
the
...
list
...
is
...
only
...
of
...
length
...
one.
...
Request
...
Code Block |
---|
curl -i -H Accept:application/json -H Content-Type:application/json -X PUT -H ETag:923521 -d '{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw",
"creationDate":null,
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations",
"etag":"923521",
"stringAnnotations":{
"Experimental Design Templates":["exp-122887", "exp-97765"]
},
"floatAnnotations":{
"Number of Samples":[500]
},
"dateAnnotations":{
"Publication Date":["2011-01-15"]
}
}' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw/annotations
{code}
Response{code} |
Response
Code Block |
---|
HTTP/1.1 200 OK
ETag: -1638393853
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.x)
{
"id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYBww",
"creationDate":null,
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYBww/annotations",
"etag":"-1638393853",
"stringAnnotations":{
"Experimental Design Templates":[
"exp-122887",
"exp-97765"
]
},
"floatAnnotations":{
"Number of Samples":[
500.0
]
},
"dateAnnotations":{
"Publication Date":[
1295049600000
]
}
}
{code}
h2. Delete a Dataset
Request{code} |
Delete a Dataset
Request
Code Block |
---|
curl -i -X DELETE http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYAQw
{code}
Response{code} |
Response
Code Block |
---|
HTTP/1.1 204 No Content
Server: Jetty(6.1.x)
{code}
h2. Create a layer
Request{code} |
Get a Layers for a Dataset
Request
Code Block |
---|
curl -i -H Accept:application/json -H Content-Type:application/json -d '{"name":"Flint HS Mice Affy",http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer |
Response
Code Block |
---|
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.x)
{
"results":[
{
"name":"Flint HS Mice Affy",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations",
"id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww",
"type":"E",
"version":"0.0.1",
"description":"this is a description",
"creationDate":1296690778880,
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww",
"etag":"1424771925",
"publicationDate":null,
"releaseNotes":"this is a release note",
"tissueType":"liver",
"platform":null,
"processingFacility":null,
"qcBy":null,
"qcDate":null
},
{
"name":"Flint HS Mice Phenotypes",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjpBww/annotations",
"id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjpBww",
"type":"C",
"version":"0.0.1",
"description":"this is a description",
"creationDate":1296693007167,
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjpBww",
"etag":"1445062754",
"publicationDate":null,
"releaseNotes":"this is a release note",
"tissueType":null,
"platform":null,
"processingFacility":null,
"qcBy":null,
"qcDate":null
}
],
"totalNumberOfResults":2,
"paging":{
}
}
|
Get a Layer
Request
Code Block |
---|
curl -i -H Accept:application/json http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww
|
Response
Code Block |
---|
HTTP/1.1 200 OK ETag: 1240467407 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "name":"Flint HS Mice Affy", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "type":"E", "descriptionversion":"this is a description", "releaseNotes0.0.1", "description":"this is a release note"}' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer {code} Response{code} HTTP/1.1 201 Created ETag: 1240467407 Location: description", "creationDate":1296690778880, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) {", "etag":"1240467407", "publicationDate":null, "releaseNotes":"this is a release note", "tissueType":null, "nameplatform":"Flint HS Mice Affy"null, "processingFacility":null, "qcBy":null, "qcDate"annotations":":null } |
Get annotations for a layer
Request
Code Block |
---|
curl -i http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "type":"E", "version":"0.0.1", |
Response
Code Block |
---|
HTTP/1.1 200 OK ETag: 923521 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "descriptionid":"this is a descriptionagxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "creationDate":1296690778880null, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "etag":"1240467407923521", "publicationDatestringAnnotations":null{ }, "releaseNotesfloatAnnotations":"this is a release note", "tissueType":null, "platform":null, "processingFacility":null, "qcBy":null, "qcDate":null } {code} Now ask for the owning dataset and you can see the preview of the layer Request{code} curl -i{ }, "dateAnnotations":{ } } |
Create a layer
Request
Code Block |
---|
curl -i -H Accept:application/json -H Content-Type:application/json -d '{"name":"Flint HS Mice Affy", "type":"E", "description":"this is a description", "releaseNotes":"this is a release note"}' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww {code} Response{code}/layer |
Response
Code Block |
---|
HTTP/1.1 200201 OKCreated ETag: -801135512: 1240467407 Location: /repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "name":"Flint HS Mice", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/annotations", "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww", "version":"0.0.1", "creator":"Jonathan Flint", "description":null, "creationDate":1296690549675, "status":"Future", "uri chunked Server: Jetty(6.1.x) { "name":"Flint HS Mice Affy", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "etagid":"-801135512", "releaseDate":null, "layers":[ { agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "idtype":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBwwE", "version":"0.0.1", "typedescription":"Ethis is a description", "creationDate":1296690778880, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", },{"etag":"1240467407", "publicationDate":null, "idreleaseNotes":"use this uriis to make a newrelease layernote", "type":"hack", "tissueType":null, "uriplatform":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer"null, "processingFacility":null, } ] } {code} h2. Get a Layer Request{code} "qcBy":null, "qcDate":null } |
Now ask for the owning dataset and you can see the preview of the layer
Request
Code Block |
---|
curl -i -H Accept:application/json http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww {code} Response{code}/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww |
Response
Code Block |
---|
HTTP/1.1 200 OK ETag: 1240467407-801135512 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "name":"Flint HS Mice Affy", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "type":"E",/annotations", "id":"agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww", "version":"0.0.1", "creator":"Jonathan Flint", "description":null, "creationDate":1296690549675, "status":"Future", "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww", "etag":"-801135512", "releaseDate":null, "layers":[ { "versionid":"0.0.1agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "descriptiontype":"E"this, is a description", "creationDate":1296690778880, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "etag":"1240467407",},{ "publicationDate":null, "releaseNotesid":"use this isuri to make a releasenew notelayer", "tissueType":null, "platformtype":null"hack", "processingFacility":null, "qcByuri":null,"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer" "qcDate":null } {code} ] h2.} |
Update
...
a
...
Layer
...
In
...
the
...
example
...
below
...
we
...
updated
...
the
...
tissue
...
type.
...
Request
...
Code Block |
---|
curl -i -H Accept:application/json -H Content-Type:application/json -X PUT -H ETag:1240467407 -d '
{
"name":"Flint HS Mice Affy",
"annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations",
"id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww",
"type":"E",
"version":"0.0.1",
"description":"this is a description",
"creationDate":1296690778880,
"uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww",
"etag":"1240467407",
"publicationDate":null,
"releaseNotes":"this is a release note",
"tissueType":"liver",
"platform":null,
"processingFacility":null,
"qcBy":null,
"qcDate":null
}' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww
{code}
Response{code} |
Response
Code Block |
---|
HTTP/1.1 200 OK ETag: 1424771925 Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { "name":"Flint HS Mice Affy", "annotations":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "type":"E", "version":"0.0.1", "description":"this is a description", "creationDate":1296690778880, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "etag":"1424771925", "publicationDate":null, "releaseNotes":"this is a release note", "tissueType":"liver", "platform":null, "processingFacility":null, "qcBy":null, "qcDate":null } {code} h2. Delete a layer Request{code} } |
Delete a layer
Request
Code Block |
---|
curl -i -X DELETE http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww
{code}
Response{code} |
Response
Code Block |
---|
HTTP/1.1 204 No Content
Server: Jetty(6.1.x)
{code}
h2. Get annotations for a layer
Request{code}curl -i http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations{code}
Response{code}
HTTP/1.1 200 OK
ETag: 923521 |
Add annotations to a layer
Request
Code Block |
---|
curl \-i \-H Accept:application/json \-H Content-Type: application/json Transfer-Encoding: chunked Server: Jetty(6.1.x) { \-X PUT \-H ETag:923521 \-d ' { "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "creationDate":null, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "etag":"923521", "stringAnnotations":{ "stringAnnotations":{ }, notes":["I threw away 6 samples during the curation process due to gender chromosome mismatches"] }, "floatAnnotations":{ }, "dateAnnotations":{ } } {code} h2. Add annotations to a layer Request{code} {code} curl \-i \-H Accept:application/json \-H' [http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations] |
Response
Code Block |
---|
HTTP/1.1 200 OK ETag: -1897035229 Content-Type: application/json \-X PUT \-H ETag:923521 \-d ' { Transfer-Encoding: chunked Server: Jetty(6.1.x) { "id":"agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww", "creationDate":null, "uri":"/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations", "etag":"923521-1897035229", "stringAnnotations":{ "notes":[ "I threw away 6 samples during the curation process due to gender chromosome mismatches" ] }, "floatAnnotations":{ }, "dateAnnotations":{ } }' http://localhost:8080/repo/v1/dataset/agxkZWZsYXV4LXRlc3RyEwsSDUdBRUpET0RhdGFzZXQYUww/layer/agxkZWZsYXV4LXRlc3RyLgsSDUdBRUpET0RhdGFzZXQYUwwLEhRHQUVKRE9JbnB1dERhdGFMYXllchjoBww/annotations {code} |