Link Search Menu Expand Document

GET /api/pads/:id (show)

Returns detail about a particular pad. Doing a straightforward curl like so:

curl \
  -H 'Authorization: Token token="<%= api_key %>"' \


  status: "OK",
  id: "DM32JWG2",
  title: "Ruby Test",
  owner_email: "",
  language: "ruby",
  participants: [
    "Guest 405"
  contents: "5.times do\n  puts 'Hello, World!'\nend\n",
  notes: "Greg was a *very* gregarious candidate, whom..."
  events: [
      message: "2014-11-14T03:05:11Z: Vincent joined the pad",
      kind: "joined",
      metadata: null,
      user_name: "Vincent",
      user_email: "",
      created_at: "2014-11-14T03:05:11Z"
      message: "2014-11-14T03:06:56Z: Guest joined the pad",
      kind: "joined",
      metadata: null,
      user_name: "Guest",
      user_email: null,
      created_at: "2014-11-14T03:06:56Z"
      message: "2014-11-14T03:07:01Z: Guest ran python code",
      kind: "ran",
      metadata: "python",
      user_name: "Guest",
      user_email: null,
      created_at: "2014-11-14T03:07:01Z"
      message: "2014-11-14T03:40:52Z: Guest left the pad",
      kind: "left",
      metadata: null,
      user_name: "Guest",
      user_email: null,
      created_at: "2014-11-14T03:40:52Z"
  private: false,
  execution_enabled: true,
  created_at: "2014-11-14T03:02:45Z",
  updated_at: "2014-11-14T03:06:39Z",
  ended_at:   "2014-11-14T03:06:39Z",
  url: "",
  playback: "",
  history: ""

Fields returned:

Field Description
id Primary key for the object. Use this to query or modify this resource later.
title User-assigned title of the pad.
owner_email Email address of the owner of the pad. Will usually just be your email!
language Chosen language for the pad. One of a set list.
participants Array of strings of the self-reported names of the participants.
contents Latest contents of the pad editor. Updates in real-time.
notes Markdown-formatted notes taken by the interviewer.
events A log of events created by users during the pad session. See below.
private Whether the pad is viewable by guests. Private pads will essentially 404 unless you are authorized to view the pad. Defaults to false.
execution_enabled Whether to allow running code in this pad. When set to false, this hides the right-hand side of the pad interface. Defaults to true.
created_at When the pad was created, in UTC ISO 8601, like 2015-01-30T00:22:55.520Z.
updated_at Similarly, when the pad was last updated.
ended_at The time when the interview was ended. null if it has not ended yet.
url Convenience field to link human users to the editing interface for this pad.
playback Convenience field to link human users to the playback interface for this pad.
history A URL where you can request the entire edit history of the pad in JSON form. For advanced users only.

The events field contains information about important events that transpired throughout the lifetime of the pad. It is represented as an array of objects with the following fields:

Field Description
message The human-readable string version of the event.
kind Can be one of: <ul><li>joined: when a user browses to a pad</li><li>left: when a user closes the browser tab</li><li>ran: when a user executes code</li><li>enabled: when the pad owner enables code execution</li><li>disabled: when the pad owner disables code execution</li><li>ended: when the pad owner ends the interview</li>
metadata Additional information associated with the event. In the case of a ran event, this will be the programming language run, for joined this can be invisible if a user joins in spectator mode.
user_name Name of the user performing the event, will always be present.
user_email If the user is logged in, this will be their email at the time of the event.
created_at When the event occurred.

All values returned by show are real-time as of the moment you request them.