-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapiary.apib
2526 lines (2033 loc) · 101 KB
/
apiary.apib
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FORMAT: 1A
HOST: repository.lab.fiware.org:80/FiwareRepository/v2
TITLE: FIWARE Repository Open API Specification
DATE: 30 September 2015
VERSION: v4.4.3
PREVIOUS_VERSION: v3.2.1
APIARY_PROJECT: fiwarerepository
# FIWARE Repository
This document describes the basic concepts regarding the Repository GE and explains
the necessary steps to develop applications which makes use of the Repository backend
functionality. The Repository API is based on REST principles and generally returns XML
or JSON encoded responses. Since REST is independent of a concrete programming language,
you just have to know how to make an HTTP request in the programming language of your choice.
## Editors
* Francisco de la Vega, Universidad Politénica de Madrid
* Javier Ortiz Sancho, Universidad Politénica de Madrid
## Status
This is a work in progress and is changing on a daily basis. You can check the latest
available version on: <https://github.com/conwetlab/Repository-RI/tree/develop>.
Please send your comments to <[email protected]>.
This specification is licensed under the [FIWARE Open Specification License](https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FI-WARE_Open_Specification_Legal_Notice_%28implicit_patents_license%29)
## Acknowledgements
The editors would like to express their gratitude to the following people who actively contributed to this specification:
Aitor Magán and Álvaro Arranz García
## Copyright
* Copyright © 2015 by Universidad Politénica de Madrid
## Specification
### Authentication
HTTP requests against the Repository API require the inclusion of specific authentication credentials when OAuth2 authentication is enabled.
Repository-RI provides support for OAuth2 authentication being the default one in FIWARE Lab.
### Synchronous Faults
Checked erros can be returned in two different formats depending on `Accept` header
of the request. The two possible formats are `application/json` and `application/xml`, being the default format is `application/json`.
JSON errors
{
"errorCode":Error Code,
"description":"Description of the mensaje error.",
"reasonPhrase":"Reason Phrase Error"
}
XML errors
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<exception>
<description>Description of the mensaje error.</description>
<errorCode>Error Code</errorCode>
<reasonPhrase>Reason Phrase Error</reasonPhrase>
</exception>
### Used HTTP Codes
| HTTP Code | Type | Description |
|:---------:|:-----|:------------|
| 200 | OK | Your request has been completed properly. |
| 201 | Created | Your resource has been created. The `location` header will contain the final URL that users can use to access this collection. |
| 204 | No Content | Your request has been processed, but a response is not available. |
| 400 | Bad Request | The content of your request is not correct (e.g. There is a missing field) |
| 401 | Unauthorized | You are not logged in or the Authorization token you are providing is not valid |
| 403 | Forbidden | The request was a valid request, but the server is refusing to respond to it. |
| 404 | Not Found | The resource with the given path has not been found. |
| 406 | Not Acceptable | The request can not be generated in the given format. |
| 409 | Conflict | The resource you are tring to create already exists. |
| 415 | Unsopported Media Type | The request entity has a media type which the server does not support. |
| 500 | Internal Server Error | There was an internal error in the system so your request cannot be completed. |
## Group Collections
Collections are ways to organise resources and other collections. Because of this, it is possible
to create, get and delete collections, and thus, it is possible to manage different collections
within the repository.
Hereafter, it is described the format of a collection and some examples of its representations
in the following formats: `application/json` y `application/xml`.
+ **Collection atributes**
+ **id** `string` - Path that identifies the collection.
+ **name** `string` - Name that identifies the collection and also the collection which it is positioned in. Every collection name must comply the regular expresion `[a-zA-Z0-9_-]+`.
+ **creationDate** `date` - Date when the collection was created.
+ **modificationDate** `date` - Date of the last mofication of the collection.
+ **creator** `string` - Name of the creator of the collection.
+ **collections** `collection` - List of collections that includes the collection.
+ **resources** `resource` - List of resources that includes the collection.
When a collection is **created**, the user can not provide the following atributes: *id, modificationDate,
collection and resources*.
+ **Collection** `application/json`
{
"type":"collection",
"id":"exampleCollectionA/exampleCollectionB",
"name":"exampleCollectionB",
"creationDate":1437405229936,
"modificationDate":null,
"creator":"creatorExample",
"collections":[],
"resources":[]
}
###### **Note**: It is necessary the attribute `type` to specify that the object is a collection.
+ **Collection** `application/xml`
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<collection id="exampleCollectionA/exampleCollectionB" xmlns:atom="http://www.w3.org/2005/Atom">
<creationDate>2015-07-20T17:13:49.936+02:00</creationDate>
<modificationDate></modificationDate>
<creator>creatorExample</creator>
<name>exampleCollectionB</name>
<collections/>
<resources/>
</collection>
## Manage Collections [/collec/{collection}]
### Get a Collection [GET]
+ Parameters
+ collection: `exampleCollectionA` (required, string) - Collection ID.
+ Request
+ Headers
Accept: application/json
+ Response 200 (application/json)
+ Body
{
"type":"collection",
"id":"exampleCollectionA",
"name":"exampleCollectionA",
"creationDate":1437405229936,
"modificationDate":null,
"creator":"Me",
"collections":[ {
"type":"collection",
"id":"exampleCollectionA/exampleCollectionB",
"name":"exampleCollectionB",
"creationDate":1437405245917,
"modificationDate":null,
"creator":"Me",
"collections":[],
"resources":[]},
{
"type":"collection",
"id":"exampleCollectionA/exampleCollectionC",
"name":"exampleCollectionC",
"creationDate":1437405266139,
"modificationDate":null,
"creator":"Me",
"collections":[],
"resources":[]
}
],
"resources":[]
}
+ Request
+ Headers
Accept: application/xml
+ Response 200 (application/xml)
+ Body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<collection id="exampleCollectionA" xmlns:atom="http://www.w3.org/2005/Atom">
<creationDate>2015-07-20T17:13:49.936+02:00</creationDate>
<creator>Me</creator>
<name>exampleCollectionA</name>
<collections>
<collections id="exampleCollectionA/exampleCollectionB">
<creationDate>2015-07-20T17:14:05.917+02:00</creationDate>
<creator>Me</creator>
<name>exampleCollectionB</name>
<collections/>
<resources/>
</collections>
<collections id="exampleCollectionA/exampleCollectionC">
<creationDate>2015-07-20T17:14:26.139+02:00</creationDate>
<creator>Me</creator>
<name>exampleCollectionC</name>
<collections/>
<resources/>
</collections>
</collections>
<resources/>
</collection>
+ Request
+ Headers
Accept: application/json
+ Response 404 (application/json)
+ Body
{
errorCode: 404
description: "Resource or Collection not found"
reasonPhrase: "Not Found"
}
+ Request
+ Headers
Accept: data/binary
+ Response 406 (application/json)
+ Body
{
errorCode: 406
description: ""
reasonPhrase: "Not Acceptable"
}
### Create a Collection [POST]
+ Parameters
+ collection: `exampleCollectionA` (optional, string) - Collection ID.
+ Request (application/json)
+ Headers
Accept: application/json
+ Body
{
"type":"collection",
"creator":"creatorExample",
"creationDate":"",
"modificationDate":"",
"name":"exampleCollectionA"
}
+ Response 201
+ Headers
Content-Location: http://localhost:8080/FiwareRepository/v2/collec/exampleCollectionA
+ Request (application/xml)
+ Headers
Accept: application/json
+ Body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<collection id="exampleCollectionA" xmlns:atom="http://www.w3.org/2005/Atom">
<creationDate>2015-07-20T17:13:49.936+02:00</creationDate>
<creator>creatorExample</creator>
<name>exampleCollectionA</name>
<collections/>
<resources/>
</collection>
+ Response 201
+ Headers
Content-Location: http://localhost:8080/FiwareRepository/v2/collec/exampleCollectionA
+ Request (application/json)
+ Headers
Accept: application/json
+ Body
{
"type":"collection",
"creator":"Creator",
"creationDate":"",
"modificationDate":"",
"name":"exampleCollectionA.meta"
}
+ Response 400 (application/json)
+ Body
{
errorCode: 400
description: "Field name do not comply the pattern."
reasonPhrase: "Bad Request"
}
+ Request (application/json)
+ Headers
Accept: application/json
+ Body
{
"type":"collection",
"creator":"Creator",
"creationDate":"",
"modificationDate":"",
"name":"exampleCollectionA"
}
+ Response 409 (application/json)
+ Body
{
errorCode: 409
description: "Path is a resource."
reasonPhrase: "Conflict"
}
+ Request (text/plain)
+ Headers
Accept: application/json
+ Body
{
"type":"collection",
"creator":"Creator",
"creationDate":"",
"modificationDate":"",
"name":"exampleCollectionA"
}
+ Response 415
### Remove a Collection [DELETE]
+ Parameters
+ collection: `exampleCollectionA` (required, string) - Collection ID.
+ Request
+ Headers
Accept: application/json
+ Response 204
+ Response 404 (application/json)
+ Body
{
errorCode: 404
description: "Resource or Collection not found."
reasonPhrase: "Not Found"
}
## Group Resources
Resources are ways to store date in the repository. This resources are composed by metadata
and the content. It is possible to create, get, update and delete resources, and thus,
it is possible to manage different resources within the repository.
Hereafter, it is described the format of a resource and some examples of its representations
in the following formats: `application/json` y `application/xml`.
+ **Resource atributes**
+ **id** `string` - Path that identifies the resource.
+ **name** `string` - Name that identifies the resource and also the collection which it is positioned in. Every resource name must comply the regular expresion `((.*[^a-zA-Z0-9._-]+.*)|(.*.meta$))+`.
+ **creationDate** `date` - Date when the resource was created.
+ **modificationDate** `date` - Date of the last mofication of the resource.
+ **creator** `string` - Name of the creator of the resource.
+ **contentUrl** `string` - URL of the resource content. It can not be updated.
+ **contentMimeType** `string` - Type of the resource content stored. It can not be updated manually.
+ **contentFileName** `string` - Name of the file.
+ **content** `byte[]` - The stored content in bytes array representation.
When a resource is **created**, the user can not provide the following atributes: *id, modificationDate,
contentMimeType and content*.
When a resource is **modified**, the user can not provide and modify the following atributes: *id,
creationDate, modificationDate, contentUrl, contentMimeType, and content*.
+ **Resource** `application/json`
{
type: "resource"
id: "exampleCollectionA/exampleResource"
name: "exampleResource"
creationDate: 1437491920036
modificationDate: 1437491920038
creator: "creatorExample"
contentUrl: "http://exampleUrl.com"
contentMimeType: "application/rdf+json"
contentFileName: "resourceFileName"
content: null
}
###### **Note**: It is necessary the attribute `type` to specify that the object is a resource.
+ **Resource** `application/xml`
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<resource id="exampleCollectionA/exampleResource">
<creationDate>2015-07-21T17:18:40.036+02:00</creationDate>
<creator>creatorExample</creator>
<modificationDate>2015-07-21T17:18:40.038+02:00</modificationDate>
<name>exampleResource</name>
<contentFileName>resourceFileName</contentFileName>
<contentMimeType>application/rdf+json</contentMimeType>
<contentUrl>http://exampleUrl.com</contentUrl>
</resource>
## Manage Resources Metadata [/collec/{collection}/{resource}.meta]
### Get a Resource [GET]
+ Parameters
+ collection: `exampleCollectionA` (required, string) - Collection ID.
+ resource: `exampleResource` (required, string) - Resource name.
+ Request
+ Headers
Accept: application/json
+ Response 200 (application/json)
+ Body
{
type: "resource"
id: "exampleCollectionA/exampleResource"
name: "exampleResource"
creationDate: 1437491920036
modificationDate: 1437491920038
creator: "Yo"
contentUrl: "http://exampleUrl.com"
contentMimeType: ""
contentFileName: "resourceFileName"
content: null
}
+ Request
+ Headers
Accept: application/xml
+ Response 200 (application/xml)
+ Body
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<resource id="exampleCollectionA/exampleResource">
<creationDate>2015-07-21T17:18:40.036+02:00</creationDate>
<creator>Yo</creator>
<modificationDate>2015-07-21T17:18:40.038+02:00</modificationDate>
<name>exampleResource</name>
<contentFileName>resourceFileName</contentFileName>
<contentMimeType />
<contentUrl>http://exampleUrl.com</contentUrl>
</resource>
+ Request
+ Headers
Accept: text/plain, application/json
+ Response 200 (text/plain)
+ Body
Resource Information:
Resource Id: exampleCollectionA/exampleResource
Creation Date: Tue Jul 21 17:18:40 CEST 2015
Modification Date: Tue Jul 21 17:18:40 CEST 2015
Filename: resourceFileName
Mime Type:
+ Request
+ Headers
Accept: text/html, application/json
+ Response 200 (text/plain)
+ Body
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Resource: exampleCollectionA/exampleResource</title>
<link rel="stylesheet" type="text/css" href="http://localhost:8080/FiwareRepository/v2/../style/style.css">
</head>
<body>
<h1>Resource: exampleCollectionA/exampleResource</h1>
<table class="tab">
<th>Resource Id</th>
<th>Creation Date</th>
<th>Modification Date</th>
<th>Content URL</th>
<th>Filename</th>
<th>Mime Type</th>
<tr>
<td><a href="http://localhost:8080/FiwareRepository/v2/collec/exampleCollectionA/exampleResource">exampleCollectionA/exampleResource</a></td>
<td>Tue Jul 21 17:18:40 CEST 2015</td>
<td>Tue Jul 21 17:18:40 CEST 2015</td>
<td>http://exampleUrl.com</td>
<td>resourceFileName</td>
<td></td>
</tr>
</table>
<br />
</body>
</html>
+ Request
+ Headers
Accept: application/rdf+xml, application/json
+ Response 200 (application/rdf+xml)
+ Body
<rdf:RDF>
<rdf:Description rdf:about="http://localhost:8080/FiwareRepository/v2/collec/exampleCollectionA/exampleResource.meta">
<j.0:format />
<j.0:title>resourceFileName</j.0:title>
<j.0:modified>not specified</j.0:modified>
<j.0:date>Tue Jul 21 17:18:40 CEST 2015</j.0:date>
</rdf:Description>
</rdf:RDF>
+ Request
+ Headers
Accept: application/json
+ Response 404 (application/json)
+ Body
{
"errorCode":404,
"description":"Resource not found",
"reasonPhrase":"Not Found"
}
+ Request
+ Headers
Accept: application/rdf+json, application/json
+ Response 406 (application/json)
+ Body
{
"errorCode":406,
"description":"",
"reasonPhrase":"Not Acceptable"
}
### Create a Resource [POST]
+ Parameters
+ collection: `exampleCollectionA` (required, string) - Collection ID.
+ resource: `exampleResource` (required, string) - Resource name.
+ Request (application/xml)
+ Headers
Accept: application/json
+ Body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resource id="exampleCollectionA/exampleResource">
<creator>Creator</creator>
<creationDate></creationDate>
<modificationDate></modificationDate>
<name>exampleResource</name>
<contentUrl>http://exampleUrl.com</contentUrl>
<contentFileName>resourceFileName</contentFileName>
</resource>
+ Response 201
+ Headers
Content-Location: http://localhost:8080/FiwareRepository/v2/collec/exampleCollection/exampleResource
+ Request (application/json)
+ Headers
Accept: application/json
+ Body
{
"type":"resource",
"creator":"Creator",
"creationDate":"",
"modificationDate":"",
"name":"exampleResource",
"contentUrl":"http://exampleUrl.com",
"contentFileName":"resourceFileName"
}
+ Response 201
+ Headers
Content-Location: http://localhost:8080/FiwareRepository/v2/collec/exampleCollection/exampleResource
+ Request (application/json)
+ Headers
Accept: application/json
+ Body
{
"type":"resource",
"creator":"Creator",
"creationDate":"",
"modificationDate":"",
"name":"exampleResource.meta",
"contentUrl":"http://exampleUrl.com",
"contentFileName":"resourceFileName"
}
+ Response 400 (application/json)
+ Body
{
errorCode: 400
description: "Field name do not comply the pattern."
reasonPhrase: "Bad Request"
}
+ Request (application/json)
+ Headers
Accept: application/json
+ Body
{
"type":"resource",
"creator":"Creator",
"creationDate":"",
"modificationDate":"",
"name":"exampleResource",
"contentUrl":"http://exampleUrl.com",
"contentFileName":"resourceFileName"
}
+ Response 409 (application/json)
+ Body
{
errorCode: 409
description: "Path is a resource."
reasonPhrase: "Conflict"
}
+ Request (application/data)
+ Body
{
"type":"resource",
"creator":"Creator",
"creationDate":"",
"modificationDate":"",
"name":"exampleResource",
"contentUrl":"http://exampleUrl.com",
"contentFileName":"resourceFileName"
}
+ Response 415
### Update a Resource [PUT]
+ Request (application/xml)
+ Body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resource id="collectionA/collectionB/resource">
<creator>Creator</creator>
<name>exampleResource</name>
<contentFileName>resourceFileName</contentFileName>
</resource>
+ Response 200
+ Request (application/json)
+ Body
{
"type":"resource",
"creator":"Creator",
"name":"exampleResource",
"contentFileName":"resourceFileName"
}
+ Response 200
+ Request (application/json)
+ Body
{
"type":"resource"
"creator":"Creator",
"name":"exampleResource",
"contentFileName":"resourceFileName"
}
+ Response 400
+ Request (application/json)
+ Body
{
"type":"resource",
"creator":"Creator",
"name":"exampleResource",
"contentUrl":"http://exampleUrl.com",
"contentFileName":"resourceFileName"
}
+ Response 403
+ Request (application/data)
+ Body
{
"type":"resource",
"creator":"Creator",
"name":"exampleResource",
"contentFileName":"resourceFileName"
}
+ Response 415
### Remove a Resource [DELETE]
+ Parameters
+ collection: exampleCollectionA (required, string) - Collection ID.
+ resource: exampleResource (required, string) - Resource name.
+ Response 204
+ Response 404 (application/json)
+ Body
{
errorCode: 404
description: "Collection or resource not found"
reasonPhrase: "Not Found"
}
## Manage Resources Content [/collec/{collection}/{resource}]
In a resource it is posible to Get and Insert or Update resource content, and thus, it is posible to manage
different collections within the repository. Also it is posible to storage RDF content, to make
queries and get this content in RDF formats.
The repository accepts the following RDF formats:
`application/rdf+json`, `application/rdf+xml`, `application/rdf+json`, `text/turtle`, `application/x-turtle`,
`text/rdf+n3`, `text/n-triples`, `text/n3`.
### Get a Resource Content [GET]
+ Parameters
+ collection: exampleCollectionA (required, string) - Collection ID.
+ resource: exampleResource (required, string) - Resource name.
+ Request
+ Headers
Accept: application/rdf+json, application/json
+ Response 200 (application/rdf+json)
+ Body
{
"http://www.app.fake/app/tictactoe" : {
"http://www.app.fake/app#name" : [ {
"type" : "literal" ,
"value" : "Tictactoe"
}
] ,
"http://www.app.fake/app#year" : [ {
"type" : "literal" ,
"value" : "2010"
}
] ,
"http://www.app.fake/app#country" : [ {
"type" : "literal" ,
"value" : "USA"
}
] ,
"http://www.app.fake/app#company" : [ {
"type" : "literal" ,
"value" : "Company1"
}
] ,
"http://www.app.fake/app#price" : [ {
"type" : "literal" ,
"value" : "0.99"
}
]
}
,
"http://www.app.fake/app/parchis" : {
"http://www.app.fake/app#name" : [ {
"type" : "literal" ,
"value" : "Parchis"
}
] ,
"http://www.app.fake/app#year" : [ {
"type" : "literal" ,
"value" : "2010"
}
] ,
"http://www.app.fake/app#country" : [ {
"type" : "literal" ,
"value" : "Spain"
}
] ,
"http://www.app.fake/app#company" : [ {
"type" : "literal" ,
"value" : "Company2"
}
] ,
"http://www.app.fake/app#price" : [ {
"type" : "literal" ,
"value" : "0.99"
}
]
}
}
+ Request
+ Headers
Accept: application/rdf+xml, application/json
+ Response 200 (application/rdf+xml)
+ Body
<rdf:RDF>
<rdf:Description rdf:about="http://www.app.fake/app/tictactoe">
<app:name>Tictactoe</app:name>
<app:country>USA</app:country>
<app:company>Company1</app:company>
<app:price>0.99</app:price>
<app:year>2010</app:year>
</rdf:Description>
<rdf:Description rdf:about="http://www.app.fake/app/parchis">
<app:name>Parchis</app:name>
<app:country>Spain</app:country>
<app:company>Company2</app:company>
<app:price>0.99</app:price>
<app:year>2010</app:year>
</rdf:Description>
</rdf:RDF>
+ Request
+ Headers
Accept: text/turtle, application/json
+ Response 200 (text/turtle)
+ Body
@prefix rdfdf: <http://www.openlinksw.com/virtrdf-data-formats#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions/#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix yago: <http://dbpedia.org/class/yago/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix ogc: <http://www.opengis.net/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ogcgsf: <http://www.opengis.net/def/function/geosparql/> .
@prefix protseq: <http://purl.org/science/protein/bysequence/> .
@prefix xslwd: <http://www.w3.org/TR/WD-xsl> .
@prefix sql: <sql:> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix sc: <http://purl.org/science/owl/sciencecommons/> .
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix ogcsf: <http://www.opengis.net/ont/sf#> .
@prefix nci: <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#> .
@prefix virtrdf: <http://www.openlinksw.com/schemas/virtrdf#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix ogcgml: <http://www.opengis.net/ont/gml#> .
@prefix ogcgsr: <http://www.opengis.net/def/rule/geosparql/> .
@prefix rdfa: <http://www.w3.org/ns/rdfa#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@prefix scovo: <http://purl.org/NET/scovo#> .
@prefix virtcxml: <http://www.openlinksw.com/schemas/virtcxml#> .
@prefix dbpprop: <http://dbpedia.org/property/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix mesh: <http://purl.org/commons/record/mesh/> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix xsl10: <http://www.w3.org/XSL/Transform/1.0> .
@prefix product: <http://www.buy.com/rss/module/productV2/> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix dawgt: <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> .
@prefix go: <http://purl.org/obo/owl/GO#> .
@prefix dbpedia: <http://dbpedia.org/resource/> .
@prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> .
@prefix xsl1999: <http://www.w3.org/1999/XSL/Transform> .
@prefix xf: <http://www.w3.org/2004/07/xpath-functions> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix vcard2006: <http://www.w3.org/2006/vcard/ns#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix math: <http://www.w3.org/2000/10/swap/math#> .
@prefix ogcgs: <http://www.opengis.net/ont/geosparql#> .
@prefix obo: <http://www.geneontology.org/formats/oboInOwl#> .
@prefix bif: <bif:> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
<http://www.app.fake/app/parchis>
<http://www.app.fake/app#company>
"Company2" ;
<http://www.app.fake/app#country>
"Spain" ;
<http://www.app.fake/app#name> "Parchis" ;
<http://www.app.fake/app#price>
"0.99" ;
<http://www.app.fake/app#year> "2010" .
<http://www.app.fake/app/tictactoe>
<http://www.app.fake/app#company>
"Company1" ;
<http://www.app.fake/app#country>
"USA" ;
<http://www.app.fake/app#name> "Tictactoe" ;
<http://www.app.fake/app#price>