This repository has been archived by the owner on May 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.http
124 lines (91 loc) · 3.72 KB
/
test.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
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
# Basic auth
:example-auth := (format "Basic %s" (base64-encode-string (format "%s:%s" "[email protected]" "foobar")))
:alt-auth := (format "Basic %s" (base64-encode-string (format "%s:%s" "[email protected]" "foobar")))
# Get all problems
GET http://localhost:5000/problems/
# Get a problem to sign
GET http://localhost:5000/problems/1
# Test signature
POST http://localhost:5000/signatures/
Authorization: :example-auth
Content-Type: application/json
{
"entry_id": "http://localhost:5000/problems/1",
"entry_hash": "ac9b434408d6b191445bee649ec250009569301313e0fdefca785016cc2509dd",
"signature": "4c4407ccb079d95ae84a5c0afb80f0e5de7620ed3526e4f00df970224fc6dc34d6efb3b3a387b9fd41934cd3dbc8322cc40aa05ac7da451595e4098ec3cec5b2d8689ed6399909ec97c55e9bd753d91616b99e67c5cea895bdb6740b70c99240651de7fbe75400d2ee5f771a47e8fc8682fa147076a39e8e3260d58a33725f3f82d89cb025488f9062fbd42fb44bb9c786ab6a90940f4e9b5d7de483723645e5d7fa29a92dfd03036a315a05bfe77767cabff43a11b97cc58fc051552faed05127d8d48a6288d39cbed945a53a991c3d5a431c6d1015d17af08ba4cab53cb5b5a20635bb3b3e5429c88a95dc2ff6c44732178ff2230bb8c04a0412e5722333f5"
}
# Signatures
GET http://localhost:5000/signatures/
# Signatures
GET http://localhost:5000/signatures/1
# Delete the signature
DELETE http://localhost:5000/signatures/1
Authorization: :example-auth
# test versioning
GET http://localhost:5000/solutions/1
# test versioning
GET http://localhost:5000/solutions/1?version=1
# test versioning
GET http://localhost:5000/solutions/1?version=2
# Bad version
GET http://localhost:5000/solutions/1?version=42
# Info for user
GET http://localhost:5000/users/1
# New public key for user, using json-merge-patch
PATCH http://localhost:5000/users/1
Authorization: :example-auth
Content-Type: application/merge-patch+json
{
"public_key": "-----BEGIN RSA PUBLIC KEY-----\nMIIBCgKCAQEAtkDV7IsEmQKta0tGv24BtxcSXwExPKcet4euf3WrgnXasvpPSh8i\nLE1vGspxQPCNwiiHal6kMPfEK1s9kN5wkwq5Fuw8gMCvDvKEkrI+zDz5kk4JvPMT\nT5rec8QUeHtMGX5Gbfg/DrdXT7UUORu0C1rLHb9h+5qOqJHS2G0a5CCLtP1/tc4y\nuBvzAktbu6j9zzQ8mh+qmU+qojJxev3OL4uc4rnYwOuZsHHoGkcNJbTID5em744Y\nlRh4AFiCHOfOysv7OUNXxeytVBE4fgI4gIFpOOOYaFtvgSDMUqy5oM7H9uC7YdXV\n4M5rD4raixHtou89nYSwlh151TNhVr/ejQIDAQAB\n-----END RSA PUBLIC KEY-----\n"
}
# New public key for user, using json
PATCH http://localhost:5000/users/1
Authorization: :example-auth
Content-Type: application/json
{
"public_key": "Not a valid Public Key! With JSON!"
}
# New public key for user, using unknown type.
PATCH http://localhost:5000/users/1
Authorization: :example-auth
{
"public_key": "Not a valid Public Key! No content type!"
}
# New public key for user
PUT http://localhost:5000/users/1/public_key
Authorization: :example-auth
Content-Type: application/json
{
"key": "Not a valid Public Key! With JSON and PUT!"
}
# New public key for user, now with extra plain text
PUT http://localhost:5000/users/1/public_key
Authorization: :example-auth
Content-Type: text/plain
"Not a valid Public Key! With plain text and PUT!"
# Can we still get prov json-ld?
GET http://localhost:5000/solutions/1/prov
Accept: application/json
# Can we still get prov ttl?
GET http://localhost:5000/solutions/1/prov?version=2
Accept: text/turtle
# Can we still get prov ttl?
GET http://localhost:5000/users/1/prov
Accept: text/turtle
# Update a problem
PATCH http://localhost:5000/problems/1
Authorization: :example-auth
Content-Type: application/merge-patch+json
{
"published": "true"
}
# test deployment
GET https://sssc-vgl.geoanalytics.csiro.au/problems/5
# test deployment
GET https://sssc-vgl.geoanalytics.csiro.au/solutions/16
# test deployment
GET http://localhost:5000/problems/5
# Get a problem to sign
GET http://localhost:5000/toolboxes/4
# Searching
GET http://localhost:5000/search?search=escript