Docs Index
Doc
POST /api/questions
Last updated on
Create a new question.
curl \
--data title="Are avocados fruity?" \
--data description="Fruit puzzler round 2" \
--data language="ruby" \
--data contents="def is_fruity?(thing);\n end\n" \
-H 'Authorization: Token token="<%= api_key %>"' \
https://app.coderpad.io/api/questions
Code language: JavaScript (javascript)
returns the question just created:
{
"status": "OK",
"id": 7,
"title": "Are avocados fruity?",
"owner_email": "alice@fruits-party.io",
"language": "ruby",
"description": "Fruit puzzler round 2",
"contents": "def is_fruity?(thing);\n end\n",
"shared": true,
"used": 0,
"created_at": "2019-01-28T21:21:16Z",
"updated_at": "2019-01-28T21:21:16Z"
}
Code language: JSON / JSON with Comments (json)
The available paramters you have to configure are detailed below:
Field | Description |
---|---|
id | Primary key for the object. Use this to query or modify this resource later. |
title | Title for this question. |
language | One of a set list. |
description | Notes for yourself (or colleagues) on what this question is about, and what good and bad answers might look like. |
contents | This text is inserted into your CoderPad interview session if you choose to use this question. |