-
Notifications
You must be signed in to change notification settings - Fork 0
/
apiary.apib
96 lines (71 loc) · 2.35 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
FORMAT: 1A
HOST: https://builda-ekg.herokuapp.com/
# ekg
Where [Buildasaur](https://github.com/czechboy0/buildasaur) sends its heartbeat.
Latest API version is 1, so all calls need to be made to a url like this
```
https://builda-ekg.herokuapp.com/v1/beep
```
Base url is `https://builda-ekg.herokuapp.com`.
## Events [/v1/beep]
### Post a new event [POST]
+ Request (application/json)
{
"app": "com.honzadvorsky.Buildasaur",
"token": "fdsafdf-12313-fdfsd-34234",
"event_type": "heartbeat",
"version": "0.3",
"build": "12",
"uptime": "5534"
}
+ Response 200 (application/json)
{
"app": "com.honzadvorsky.Buildasaur",
"token": "fdsafdf-12313-fdfsd-34234",
"event_type": "heartbeat",
"version": "0.3",
"build": "12",
"uptime": "5534",
"event_id": 4,
"timestamp": 1441062839788
}
## Dump all data [/v1/beep/all]
### Get all event data [GET]
WARNING: Might be a lot of data!
+ Response 200 (application/json)
[
{
"app": "com.honzadvorsky.Buildasaur",
"build": "12",
"event_id": 3,
"event_type": "heartbeat",
"timestamp": 1441062832605,
"token": "fdsafdf-12313-fdfsd-34234",
"uptime": "5534",
"version": "0.3"
},
{
"app": "com.honzadvorsky.Buildasaur",
"build": "12",
"event_id": 4,
"event_type": "heartbeat",
"timestamp": 1441062839788,
"token": "fdsafdf-12313-fdfsd-34234",
"uptime": "5534",
"version": "0.3"
}
]
## Ping redis [/v1/beep/redis]
### Test that redis is accessible [GET]
+ Response 200 (text/plain)
PONG
# Data Structures
## Base Event (object)
+ app (string) - bundle identifier of the sender
+ token (string) - unique, anonymous identifier
+ event_type: "heartbeat", "launch" (enum) - one of event types
+ version (string) - app version
+ build (string) - app build number
## Heartbeat Event (object) : Base Event
+ uptime (string) - uptime in seconds
+ running_syncers (number) - number of syncers currently running