API Reference

Here is our API for all you enthusiasts who want to develop a CodeInterview plugin for unsupported IDEs.

After you have succeeded in creating a plugin, please let us know on support@codeinterview.me, so we can share your work to the rest of the world on our website.


  1. Testing connection with CodeInterview
  2. Pushing data from IDE to CodeInterview
  3. Pulling data from CodeInterview to IDE

1. Test connection

Communication is done via HTTP POST request against https://codeinterview.me/api/test-connection

HTTP request parameters:

Parameter
Example
Description
pin
0002E30D8F
Pin received via "Try it out" link

HTTP response in JSON:
{
success: true
}

Parameter
Example
Description
success
true
Returns true if request was successful, false otherwise
message
Invalid request method
Request failure reason, not present if request successful

2. Pushing data

Communication is done via HTTP POST request against https://codeinterview.me/api/push

HTTP request parameters:

Parameter
Example
Description
pin
0002E30D8F
Pin received via "Try it out" link
data
System.out.println('Hello World!');
Contents of file
file
path/to/file/main.java
Relative (to project root) path to file being edited
ide
0
IDE code (provided by us). Use 0 for testing purposes

HTTP response in JSON:
{
success: true
}

Parameter
Example
Description
success
true
Returns true if request was successful, false otherwise
message
Invalid request method
Request failure reason, not present if request successful

3. Pulling data

Communication is done via HTTP GET request against https://codeinterview.me/api/pull

HTTP request parameters:

Parameter
Example
Description
pin
0002E30D8F
Pin received via "Try it out" link

HTTP response in JSON:
{
success: true,
data: {
ide: "eclipse",
date: "2011-08-25 13:38:14",
files: [
{
name: "/file/one.java",
code: "System.out.println(\"Hello World One!\")"
}
{
name: "/file/two.java",
code: "System.out.println(\"Hello World Two!\")"
}
]
}
}

Parameter
Example
Description
success
true
Returns true if request was successful, false otherwise
message
Interview with PIN code 0002E30D8F not found
Request failure reason, not present if request successful
data
Object
  ide
eclipse
IDE identifier
  date
2011-08-25 13:38:14
Last push date
  files
Array
Array of objects with name and code, sorted by descending order of last update
    name
/file/one.java
Name of file
    code
System.out.println('Hello World!')
Last known contents of file