You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apiary.apib
+82-9
Original file line number
Diff line number
Diff line change
@@ -17,28 +17,34 @@ A `version` is a string `semver`.
17
17
+ Body
18
18
19
19
[
20
-
"0.0.1"
20
+
"0.0.1",
21
+
"0.0.2",
22
+
"0.0.3",
23
+
"0.0.4"
21
24
]
22
25
23
26
24
27
25
28
# Group Event Buckets
26
29
**Buckets** are groupings of `event` data. They associate events together by a unique `bucketKey`. The `bucketKey`s uniqueness is scoped to an access key, so two buckets with the same bucketKey on two different access keys will result in two unique buckets.
27
30
28
-
## Buckets [/buckets]
31
+
## Buckets JSON [/buckets]
29
32
A `bucket` is a collection of `event` data.
30
33
31
-
Common Scenarios:
34
+
Common Successful Response Scenarios:
32
35
-`201`: If a `POST` is made to `/buckets` with a accessKey/bucketKey combination that is unique, doesn't exist, and can be created, the api will respond with a `201` Created response.
33
36
-`204`: If a `POST` is made to `/buckets` with a accessKey/bucketKey combination that has already been created, the api will respond with a `204` No Content response.
34
37
35
-
**Custom Headers**
38
+
**Authentication**
36
39
37
-
|name|notes|
40
+
Authentication is handled via Access Keys generated from within your [Initial State account](https://www.initialstate.com/app#/account). An example access key looks like this: `fakee8do2JQN3Eos8Ah2FS8uiFD3Ola2`. An Access Key can be provided as an HTTP header, or as a url parameter
41
+
42
+
|type|name/key|
38
43
|----|-----|
39
-
|`X-IS-AccessKey`|This is the access key generated from www.initialstate.com account|
-`201`: If a `POST` is made to `/buckets` with a accessKey/bucketKey combination that is unique, doesn't exist, and can be created, the api will respond with a `201` Created response.
91
+
-`204`: If a `POST` is made to `/buckets` with a accessKey/bucketKey combination that has already been created, the api will respond with a `204` No Content response.
92
+
93
+
**Authentication**
94
+
95
+
Authentication is handled via Access Keys generated from within your [Initial State account](https://www.initialstate.com/app#/account). An example access key looks like this: `fakee8do2JQN3Eos8Ah2FS8uiFD3Ola2`. An Access Key can be provided as an HTTP header, or as a url parameter
+ bucketName (optional, string, `My New Bucket`) ... Friendly Bucket Name
106
+
107
+
### Create a bucket [POST]
108
+
109
+
+Response201(application/json)
110
+
+ Response 204
111
+
+ Response 401
112
+
+ Response 403(text/plain)
113
+
114
+
+ Body
115
+
116
+
"ACCESS_DENIED_KEY"
117
+
118
+
+ Response 500(text/plain)
119
+
120
+
+ Body
121
+
122
+
"CORE_API_ERROR"
123
+
124
+
80
125
# Group Event Data
81
126
These endpoints are related to the `events` resource. An `event` is simply a data point with a timestamp.
82
127
83
-
## Events [/events]
128
+
## Events JSON [/events]
84
129
### Send Events [POST]
85
130
This is the main endpoint for shipping data to Initial State's Events Api. The data is sent in an array of JSON objects that represent individual events. You can submit one event or an array of events where the body size is not larger than 1 megabyte.
86
131
@@ -184,5 +229,33 @@ This is the main endpoint for shipping data to Initial State's Events Api. The d
184
229
{
185
230
"message":"Event limit exceeded for current cycle..."
This route allows for simple URL encoded parameters that represent events. Each url key-value pair represents an event key and event value being sent to Initial State.
+ bucketKey (required, string, `bucket1sfa`) ... Bucket Key representing bucket for the events in request
243
+
+ eventKey0 (optional, string, `eventKey0`) ... An events stream key
244
+
+ eventValue0 (optional, string, `eventValue0`) ... `eventKey0`'s value
245
+
+ eventKey1 (optional, string, `eventKey1`) ... An events stream key
246
+
+ eventValue1 (optional, string, `eventValue1`) ... `eventKey1`'s value
247
+
248
+
### Send Events [GET]
249
+
This is a break in the HTTP/1.1 spec to simplify sending events from devices without JSON serializors or full HTTP libraries with verb support. This route behaves similarly to the JSON route, but doesn't currently allow for overriding timestamps.
250
+
251
+
+ Response 204
252
+
+ Response 401
253
+
+Response402(application/json)
254
+
+ Body
255
+
256
+
{
257
+
"message":"Event limit exceeded for current cycle..."
0 commit comments