Web API

Introduction

Remote Interview provides simple RESTful web API for your data. All endpoints will return results in JSON format.

For example, if you’d like to use the API to get list of candidates in a test, you’d use the following endpoint:

https://api.remoteinterview.io/1/tests/-JrvNKhZ/candidates?key=283h4g4h4h

Notes
- All API requests go to https://api.remoteinterview.io/
- The /1 part of the URI is the API version
- The /tests part means that we’re accessing the tests collection
- The /-JrvNKhZ part is the id of the test that we want to interact with.
- The /candidates part means that we’re accessing the candidates of this test.

Authentication

You will need an API Key for all requests to the API server. Your API key can be accessed by clicking your name on top-right corner and going to Settings.

Note
You can only access the tests you are already part of.

Use your API key as key parameter of every endpoint’s URI.

Example
https://api.remoteinterview.io/1/tests/-JrvNKhZ/candidates?key=283h4g4h4h

End Points

Tests

GET /1/tests

Fetch the list of all tests that have you as a recruiter.

RESPONSE

[
  {
    "title": "Junior JavaScript Engineer",
    "timestamp": 1441241066613,
    "id": "-JyFeLky3OS0amN"
  },
  {
    "title": "Interns Summer 15",
    "timestamp": 1441754302277,
    "id": "-JyjFBLwh0M9e"
  }
]

GET /1/tests/:id/candidates

Fetch the list of all candidates in the selected test in the form of array.

RESPONSE

[
  {
    "id": "X3JpY2FuZF90ZXNldy5pbw~~",
    "status": "accepted",
    "added_at": 1441755717707,
    "email": "luke@rebels.io",
    "name": "Luke",
    "tags": [],
    "score": {
      "total": 100,
      "got": 90
    }
  },
  {
    "id": "X3JpY2FuZ9ucGtAZ21haWwuY29t",
    "status": "completed",
    "added_at": 1441756468443,
    "email": "john@domain.com",
    "name": "John",
    "tags": [],
    "score": {
      "total": 100,
      "got": 80
    }
  }
]

GET /1/tests/:id/candidates/:candidateid/

Similar to above but only to access one candidates information.

RESPONSE

{
  "id": "X3JpY2FuZ9ucGtAZ21haWwuY29t",
  "status": "completed",
  "added_at": 1441756468443,
  "email": "john@domain.com",
  "name": "John",
  "tags": []
}

POST /1/tests/:id/candidates

Create a new candidate in the selected test and generate an invite URL.

REQUEST

Argument Example Required Description
email john@domain.com Required The email address of the candidate you want to invite.

RESPONSE

{
  "message": "success",
  "id": "AjHh1jh4jhKJHJKh424hjt",
  "url": "http://app.remoteinterview.io/tests/#?roomid=JrvNKhZ&candidateemail=AjHh1jh4jhKJHJKh424hjt"
}

Notes

  • API does not prevent duplicate email addresses and will generate a new test URL for the given email.
  • Email invite is not sent to the candidate when using API.
  • The “id” of the candidate can be used to access their detailed report later (see below).

GET /1/tests/:id/candidates/:candidateid/report

Fetch the detailed report of the selected candidate. This includes overall score and individual score breakdown for each task and their test cases. Also includes basic information like name, email, phone, current status, tags, notes, etc.

RESPONSE

{
  "id": "X3JpY2dmlldy5pbw~~",
  "status": "completed",
  "added_at": 1441755717707,
  "email": "luke@rebels.io",
  "name": "Luke",
  "tags": [],
  "tasks": [
    {
      "body": "<p>Write a program, that takes input of a number N, then takes N lines of input sentences. For each sentence it reverses each word. The order of each word is NOT reversed.</p>\n\n<p>&nbsp;</p>\n\n<p>0&lt; Max Number of Inputs &lt;=100</p>\n\n<p>0&lt;Number of Words in one input &lt; 100</p>\n\n<p>0&lt;Length of Word In A Sentence&lt;20</p>\n\n<p><strong>Your output lines should not have any trailing or leading whitespaces</strong></p>\n\n<p>Input<br />\n3<br />\nRemoteIo is awesome<br />\nCandidates give interview<br />\nbest candidates are selected</p>\n\n<p>&nbsp;</p>\n\n<p>Output:</p>\n\n<p>oIetomeR si emosewa<br />\nsetadidnaC evig weivretni<br />\ntseb setadidnac era detceles</p>\n\n<p>&nbsp;</p>\n",
      "last_updated": 1441755715341,
      "tags": [
        "string",
        "reverse",
        "easy"
      ],
      "testcases": [
        {
          "name": "Test Case 1",
          "is_sample": true,
          "is_placeholder": false,
          "points": 10,
          "result": true,
          "output": "...",
          "expected_output": "..."
        },
        {
          "name": "Test Case 2",
          "is_sample": false,
          "is_placeholder": false,
          "points": 10,
          "result": true,
          "output": "...",
          "expected_output": "..."
        },
        {
          "name": "Test Case 3",
          "is_sample": false,
          "is_placeholder": false,
          "points": 20,
          "result": true,
          "output": "...",
          "expected_output": "..."
        },
        {
          "name": "Test Case 4",
          "is_sample": false,
          "is_placeholder": false,
          "points": 20,
          "result": true,
          "output": "...",
          "expected_output": "..."
        },
        {
          "name": "Test Case 5",
          "is_sample": false,
          "is_placeholder": false,
          "points": 10,
          "result": true,
          "output": "...",
          "expected_output": "..."
        },
        {
          "name": "Test Case 6",
          "is_sample": false,
          "is_placeholder": false,
          "points": 10,
          "result": true,
          "output": "...",
          "expected_output": "..."
        },
        {
          "name": "Test Case 7",
          "is_sample": false,
          "is_placeholder": false,
          "points": 10,
          "result": true,
          "output": "...",
          "expected_output": "..."
        },
        {
          "name": "Test Case 8",
          "is_sample": false,
          "is_placeholder": false,
          "points": 10,
          "result": false,
          "output": "...",
          "expected_output": "..."
        }
      ],
      "title": "Reverse words in a sentence",
      "code": {
        "code": "...",
        "codemode": "C#"
      },
      "is_auto_submitted": false
    },
    {
      "body": "<p>Take-home project description</p>\n",
      "last_updated": 1441755715344,
      "title": "JavaScript Take-home Project",
      "submission": [
        {
          "name": "submission.zip",
          "url": "http://uploads-g.remoteinterview.io/uploads/submission.zip",
          "validZip": true
        }
      ],
      "is_auto_submitted": false,
      "is_multiple_choice": false,
      "is_project": true,
      "is_sql": false,
      "is_open_ended": false,
      "id": "-LavdyNutwJP6bidpdIn",
      "total_score": 10,
      "given_score": 0
    }
  ],
  "score": {
    "total": 100,
    "got": 90
  }
}

Outgoing Webhooks

Get reports in real-time

Remote Interview can also send POST to the URLs you specify in your Settings > Outgoing Webhooks. This can be used to integrate Remote Interview with your ATS or other internal tools.

POST on candidate test submission [test.report]

This will send candidate’s report as JSON.

EXAMPLE

{
  "type": "test.report",
  "data": {
    "id": "X3JpY2dmlldy5pbw~~",
    "status": "completed",
    "added_at": 1441755717707,
    "email": "luke@rebels.io",
    "name": "Luke",
    "tags": [],
    "tasks": [
      {
        "body": "<p>Write a program, that takes input of a number N, then takes N lines of input sentences. For each sentence it reverses each word. The order of each word is NOT reversed.</p>\n\n<p>&nbsp;</p>\n\n<p>0&lt; Max Number of Inputs &lt;=100</p>\n\n<p>0&lt;Number of Words in one input &lt; 100</p>\n\n<p>0&lt;Length of Word In A Sentence&lt;20</p>\n\n<p><strong>Your output lines should not have any trailing or leading whitespaces</strong></p>\n\n<p>Input<br />\n3<br />\nRemoteIo is awesome<br />\nCandidates give interview<br />\nbest candidates are selected</p>\n\n<p>&nbsp;</p>\n\n<p>Output:</p>\n\n<p>oIetomeR si emosewa<br />\nsetadidnaC evig weivretni<br />\ntseb setadidnac era detceles</p>\n\n<p>&nbsp;</p>\n",
        "last_updated": 1441755715341,
        "tags": [
          "string",
          "reverse",
          "easy"
        ],
        "testcases": [
          {
            "name": "Test Case 1",
            "is_sample": true,
            "is_placeholder": false,
            "points": 10,
            "result": true,
            "output": "...",
            "expected_output": "..."
          },
          {
            "name": "Test Case 2",
            "is_sample": false,
            "is_placeholder": false,
            "points": 10,
            "result": true,
            "output": "...",
            "expected_output": "..."
          },
          {
            "name": "Test Case 3",
            "is_sample": false,
            "is_placeholder": false,
            "points": 20,
            "result": true,
            "output": "...",
            "expected_output": "..."
          },
          {
            "name": "Test Case 4",
            "is_sample": false,
            "is_placeholder": false,
            "points": 20,
            "result": true,
            "output": "...",
            "expected_output": "..."
          },
          {
            "name": "Test Case 5",
            "is_sample": false,
            "is_placeholder": false,
            "points": 10,
            "result": true,
            "output": "...",
            "expected_output": "..."
          },
          {
            "name": "Test Case 6",
            "is_sample": false,
            "is_placeholder": false,
            "points": 10,
            "result": true,
            "output": "...",
            "expected_output": "..."
          },
          {
            "name": "Test Case 7",
            "is_sample": false,
            "is_placeholder": false,
            "points": 10,
            "result": true,
            "output": "...",
            "expected_output": "..."
          },
          {
            "name": "Test Case 8",
            "is_sample": false,
            "is_placeholder": false,
            "points": 10,
            "result": false,
            "output": "...",
            "expected_output": "..."
          }
        ],
        "title": "Reverse words in a sentence",
        "code": {
          "code": "...",
          "codemode": "C#"
        },
        "is_auto_submitted": false
      },
      {
        "body": "<p>Take-home project description</p>\n",
        "last_updated": 1441755715344,
        "title": "JavaScript Take-home Project",
        "submission": [
          {
            "name": "submission.zip",
            "url": "http://uploads-g.remoteinterview.io/uploads/submission.zip",
            "validZip": true
          }
        ],
        "is_auto_submitted": false,
        "is_multiple_choice": false,
        "is_project": true,
        "is_sql": false,
        "is_open_ended": false,
        "id": "-LavdyNutwJP6bidpdIn",
        "total_score": 10,
        "given_score": 0
      }
    ],
    "score": {
      "total": 100,
      "got": 90
    }
  }
}

CodeInterview

GET /1/pads

Fetch the list of all pads that are owned by you and your team.

RESPONSE

[
  {
    "id": "82388c2b7e632",
    "name": "Interview with Luke",
    "timestamp": 1441755717707
  },
  {
    "id": "9727633b7e632",
    "name": "Interview with Solo",
    "timestamp": 1441755738380
  }
]

POST /1/pads/new

Create a new pad and return id and URL.

REQUEST

Argument Example Required Description
name Interview with Luke Optional A name/title for this new pad.

RESPONSE

{
  "message": "success",
  "id": "82388c2b7e632",
  "url": "https://codeinterview.io/82388c2b7e632"
}