Newer
Older
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
### Create a new plain account
POST http://localhost:8080/accounts
Content-Type: application/json
{
"id": 1,
"firstName": "Sergi",
"lastName": "Almar"
}
### Find all accounts
GET http://localhost:8080/accounts
Accept: application/json
### Find account 1
GET http://localhost:8080/accounts/1
Accept: application/json
### Create a new account with an unknown field
POST http://localhost:8080/accounts
Content-Type: application/json
{
"id": 2,
"firstName": "Joris",
"lastName": "Kuipers",
"company": "Trifork"
}
### Create a new account using snake-casing
POST http://localhost:8080/accounts
Content-Type: application/json
{
"id": 1,
"first_name": "Sergi",
"last_name": "Almar"
}
### Create some accounts with an address: Joris
POST http://localhost:8080/accounts
Content-Type: application/json
{
"id": 1,
"firstName": "Joris",
"lastName": "Kuipers",
"address": {
"street": "Vlaardingenlaan",
"houseNumber": 15,
"city": "Amsterdam",
"country": "The Netherlands"
}
}
### Create some accounts with an address: Josh
POST http://localhost:8080/accounts
Content-Type: application/json
{
"id": 2,
"firstName": "Josh",
"lastName": "Long",
"address": {
"street": "Some airplane",
"houseNumber": 1,
"city": "Production",
"country": "The Cloud"
}
}