Skip to content

Instantly share code, notes, and snippets.

HTTP API Design Guide

(Copy of internal Heroku document for sharing with collaborators.)

Introduction

This guide describes the design of RESTful HTTP+JSON APIs conforming to Heroku’s API conventions. It’s based on our design work for the Heroku Platform API.

This guide informs additions to that API and also guides new internal APIs at Heroku. We hope it’s also of interest to API designers outside of Heroku.

package main;
import (
"bytes"
"encoding/xml"
"fmt"
)
var ResponseExample = `
<DescribeInstanceHealthResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/">
#!/bin/bash
set -euo pipefail
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install lxc-docker -y

Keybase proof

I hereby claim:

  • I am mmcgrana on github.
  • I am mmcgrana (https://keybase.io/mmcgrana) on keybase.
  • I have a public key ASDXYWj0J0tYgYI1487IvTW794oGTH7eSp3V7_Ah5-dh1Ao

To claim this, I am signing this object: