-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapiary.apib
116 lines (74 loc) · 2.13 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
FORMAT: 1A
HOST: https://api.palaverapp.com/
# Palaver
# Group Devices
## Devices [/1/devices]
### Register a new device [POST]
+ Request (application/json)
+ Attributes
+ `device_token`: 255b34ece6bf163b24474359bc74582ddf2c6726 (required)
+ Response 201 (application/json)
+ Attributes
+ `device_token`: 255b34ece6bf163b24474359bc74582ddf2c6726 (required)
+ `push_token`: 83437b46a8f38a444092d81b0d1779d86cc8ea23
## Notifications [/1/push]
### Send a new notification [POST]
+ Request (application/json)
+ Headers
Authorization: token 83437b46a8f38a444092d81b0d1779d86cc8ea23
+ Attributes
+ One Of
+ message: `Hello World!`
+ private: true (fixed)
+ sender: kylef
+ channel: `#palaver`
+ badge: 1 (number)
+ intent (enum)
+ ACTION
+ Response 202
## Device [/device]
### View [GET]
+ Response 200 (application/json)
+ Attributes
+ `apns_token`: 255b34ece6bf163b24474359bc74582ddf2c6726
+ `created_at`
### Update a Device [PATCH]
+ Request (application/json)
+ Attributes
+ `apns_token`
+ Response 204
### Delete the Device [DELETE]
+ Request
+ Headers
Authorization: token 255b34ece6bf163b24474359bc74582ddf2c6726
+ Response 204
## Authorisations [/authorisations]
### List all authorisations [GET]
+ Response 200 (application/json)
+ Attributes (array[Authorisation], fixed-type)
### Create new authorisation [POST]
+ Attributes
+ token
+ scopes
+ Request
+ Headers
Authorization: token 255b34ece6bf163b24474359bc74582ddf2c6726
+ Response 201 (application/json)
+ Attributes (Authorisation)
+ token: d73e2636cca9e25cf636cca9e
## Authorisation [/authorisations/{id}]
+ Parameters
+ id: 636cca9e
### View an authorisation [GET]
+ Response 200 (application/json)
+ Attributes (Authorisation)
### Delete an authorisation [DELETE]
+ Response 204
## Data Structures
### Scope (enum)
+ all
+ push
### Authorisation
+ url: `/authorisations/636cca9e`
+ scopes (array[Scope], fixed-type)
+ `token_last_eight`: 636cca9e