Docs Index

Doc

GET /api/pads/:id

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

curl \ -H 'Authorization: Token token="<%= api_key %>"' \ https://app.coderpad.io/api/pads/DM32JWG2
Code language: JavaScript (javascript)

yields:

{ status: "OK", id: "DM32JWG2", title: "Ruby Test", owner_email: "fbueller@gmail.com", language: "ruby", participants: [ "vincent", "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: "me@vincentwoo.com", 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: "https://coderpad.io/DM32JWG2", playback: "https://app.coderpad.io/DM32JWG2/playback", history: "https://coderpad.firebaseio.com/DM32JWG2/history.json", drawing: "https://storage.googleapis.com/..." }
Code language: PHP (php)

Fields returned:

FieldDescription
idPrimary key for the object. Use this to query or modify this resource later.
titleUser-assigned title of the pad.
owner_emailEmail address of the owner of the pad. Will usually just be your email!
languageChosen language for the pad. One of a set list.
participantsArray of strings of the self-reported names of the participants.
contentsLatest contents of the pad editor. Updates in real-time.
notesMarkdown-formatted notes taken by the interviewer.
eventsA log of events created by users during the pad session. See below.
privateWhether the pad is viewable by guests. Private pads will essentially 404 unless you are authorized to view the pad. Defaults to false.
execution_enabledWhether 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_atWhen the pad was created, in UTC ISO 8601, like 2015-01-30T00:22:55.520Z.
updated_atSimilarly, when the pad was last updated.
ended_atThe time when the interview was ended. null if it has not ended yet.
urlConvenience field to link human users to the editing interface for this pad.
playbackConvenience field to link human users to the playback interface for this pad.
historyA URL where you can request the entire edit history of the pad in JSON form. For advanced users only.
drawingA URL where you can download the final state of a drawing made with Drawing Mode. These URLs are signed URLs that are valid for 5 minutes, after which you will need to make another request to our API to get a fresh signed URL.

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:

FieldDescription
messageThe human-readable string version of the event.
kindCan 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>
metadataAdditional 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_nameName of the user performing the event, will always be present.
user_emailIf the user is logged in, this will be their email at the time of the event.
created_atWhen the event occurred.

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