-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathexample_requests.http
42 lines (35 loc) · 1.26 KB
/
example_requests.http
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
### Get a thing as JSON
GET https://atomicdata.dev/properties/isA HTTP/1.1
Accept: application/json
### Get a thing as JSON-AD
GET https://atomicdata.dev/properties/isA HTTP/1.1
Accept: application/ad+json
### Get a thing as JSON-LD
GET https://atomicdata.dev/properties/isA HTTP/1.1
Accept: application/ld+json
### Get a thing as turtle
GET https://atomicdata.dev/properties/isA HTTP/1.1
Accept: text/turtle
### Full text search
GET http://localhost:9883/search?q=Foo HTTP/1.1
Accept: application/ld+json
### Full text search, return full resource bodies. A bit slower, but could actually result in a faster UX.
GET http://localhost:9883/search?q=Foo&include=true HTTP/1.1
Accept: application/ld+json
### Send a Commit
### The hard part here is setting the correct signature.
### Use a library (@tomic/lib for JS, and atomic_lib for Rust).
POST http://localhost:9883/commit HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"subject": "http://localhost:9883/test",
"created_at": 1601239744,
"signer": "http://localhost:9883/agents/root",
"set": {
"https://atomicdata.dev/properties/requires": "[\"http/properties/requires\"]"
},
"remove": ["https://atomicdata.dev/properties/shortname"],
"destroy": false,
"signature": "correct_signature"
}