HackerRank

FREE
By raygorodskij
Updated 4 months ago
Search
2.9/10
Popularity Score
512ms
Latency
100%
Success Rate

HackerRank API Documentation

The HackerRank team is on a mission to match every developer in the world to the right job by providing a technical recruiting platform that assesses developers based on actual coding skills.

View API Details
POSTcreateSubmission
POSTgetProgrammingLanguages
POSTwebhookEvent
POSTcreateSubmission

Allows users to use the HackerRank code checker for their own purposes. Submit source code, which is compiled and run against a list of provided test cases.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
testCasesJSON
REQUIREDA valid JSON, which on parse should result in a list of strings.
sourceCodeSTRING
REQUIREDThe source code, which needs to be compiled and run against the provided test cases.
apiKeyCREDENTIALS
REQUIREDYour HackerRank API key.
languageSTRING
REQUIREDThe language key for the language, the submission is made in. The data about language keys is available through the languages endpoint.
Optional Parameters
callbackUrlSTRING
OPTIONALA callback url, on which the submission response will be posted as a JSON string under `data` parameter.
waitSELECT
OPTIONAL`true` - The response is sent only after the submission is compiled and run.`false` - The request returns immediately and submission response will posted through the callback URL.
Code Snippet
unirest.post("https://HackerRankraygorodskijV1.p.rapidapi.com/createSubmission")
.header("X-RapidAPI-Host", "HackerRankraygorodskijV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://HackerRankraygorodskijV1.p.rapidapi.com/createSubmission
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://HackerRankraygorodskijV1.p.rapidapi.com/createSubmission")
.header("X-RapidAPI-Host", "HackerRankraygorodskijV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication