forked from coopTilleuls/wse-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apiary.apib
100 lines (74 loc) · 2.4 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
FORMAT: 1A
HOST: private-6d2fc-yuanlog.apiary-proxy.com
# Yuan Activities Log API
Provide services for all Yuan's apps family.
# Group Activities
## My Activity [/activities{?id}]
### One activity [GET]
+ Request
+ Headers
Authorization: Basic dXNlcjpwYXNzd29yZA==
x-api-version: 1.0
+ Parameters
+ id (required, string) - Id of one activity
+ Response 200 (application/json)
## My Activities [/activities{?page,size}]
### List All Activities [GET]
+ Request
+ Headers
Authorization: Basic dXNlcjpwYXNzd29yZA==
x-api-version: 1.0
+ Parameters
+ page (required, number) - Pages number
Default: 1
+ size (required, number) - Page size
Default: 10
+ Response 200 (application/json)
+ Headers
ETag : "jshdjhj34734sfjsdsj"
cache-control: max-age=600
+ Body
{
"page":
{
"number": 1,
"size": 10,
"totalPages": 20
},
"activities":
[
{
"subject": "Play soccer with Renzo",
"planed_at": "2016-02-21T09:30:00.000Z",
"recorded_at": "2016-02-20T08:40:51.620Z",
"tag": [ "enterteiment", "family" ]
},
{
"subject": "Book now romantic meal for two.",
"planed_at": "2016-02-21T09:30:00.000Z",
"recorded_at": "2016-02-19T14:53:11.230Z",
"tag": [ "surprise", "family", "loving" ]
}
]
}
### New Activity [POST]
+ Request
+ Headers
Authorization: Basic dXNlcjpwYXNzd29yZA==
Content-type: application/json
x-api-version: 1.0
+ Body
{
"subject": "Get medical secure for childs",
"planed_at": "2016-02-23T11:30:00.000Z",
"tags": [
"family",
"health"
]
}
+ Response 201 (application/json)
+ Headers
Location: activities/134732
+ Body
{
}