Closed Bug 1092299 Opened 8 years ago Closed 8 years ago

build API endpoint for heartbeat v2


(Input Graveyard :: Backend, defect, P1)



(Not tracked)



(Reporter: willkg, Assigned: willkg)



(Whiteboard: u=gregg c=heartbeat p=3 s=input.2014q4)

We created an API endpoint for Heartbeat v1. We're going to scrap that endpoint and create a new one for Heartbeat v2.

This bug covers:

1. scrapping the api/v1/hb/ endpoint and associated documentation
2. creating a new api/v2/hb/ endpoint and associated documentation
Priority: -- → P1
Depends on: 1092296
Need to document the following:

1. endpoint
2. all fields, field types, field validation and examples of field values
3. curl example of usage
4. example of flow updates
If the API successfully creates a hb record:

1. send a thing to statsd, return a 201

If the API throws a data validation error, we do the following:

1. invalid survey id? send a thing to statsd and return a 400 "bad survey_id"
2. anything else invalid? send a thing to statsd, log it in the error log and return a 400 message

We need a "health" dashboard that shows the various graphite numbers and error message histogram.
Grabbing this to work on now. Pretty sure it'll take me the rest of the week to do so making it 3 points.
Assignee: nobody → willkg
Whiteboard: u=gregg c=heartbeat p= s=input.2014q4 → u=gregg c=heartbeat p=3 s=input.2014q4
I've got most of the API written, I have a bunch of tests written and I have some docs written.

Outstanding things to do:

1. a few more tests for edge cases
2. implement data validation error handling
3. statsd calls so we can track frequencies of events
4. error logging for "bad data" situations

I wrote up rough docs and send a link to Gregg Friday night. Waiting to see if that's along the lines of what he's thinking or whether we need to change things.

Probably 2/3 done at this point.
I've got it mostly written now.

The statsd data will be coarse (success/error). We can think about that later if we decide we need finer data.

This doesn't include views for things--that's covered in bug #1092300.

In a PR:
Pushed to prod just now. Marking as FIXED.
Closed: 8 years ago
Resolution: --- → FIXED
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.