Docs Index


GET /api/questions/:id

Last updated on

Returns details about a particular question. You can view questions visible to you, which includes your own questions as well as colleagues’ questions where shared is set to true. If you’re an organization owner, you can view all questions in the organization.

curl \ -H 'Authorization: Token token="<%= api_key %>"' \
Code language: JavaScript (javascript)


{ "status": "OK", "id": 42, "title": "Are fruits tomatoes?", "author_name": "Molly Macadamia", "owner_email": "", "language": "postgresql", "description": "Use SQL magic to discover the answer.", "contents": "SELECT * FROM fruits;\n", "shared": true, "used": 0, "created_at": "2019-01-25T02:07:12Z", "updated_at": "2019-01-25T02:07:12Z" }
Code language: JSON / JSON with Comments (json)

Fields returned:

idPrimary key for the object. Use this to query or modify this resource later.
titleUser-assigned title of the question.
author_nameName of the person who authored this question. This is the same person as the owner referenced by owner_email.
owner_emailEmail address of the person who owns the question.
languageChosen language for the question. One of a set list.
descriptionNotes for yourself (or colleagues) on what this question is about, and what good and bad answers might look like.
contentsUser-assigned question contents. This text is inserted into your CoderPad interview session if you choose to use this question.
sharedA boolean specifying whether this question is shared with the user’s organization. Defaults to true.
usedA counter counting the number of times this question was used to create pads.
created_atThe time when the question was created, in UTC ISO 8601, like 2019-01-30T00:22:55.520Z.
updated_atSimilarly, the time when the question was last updated.