Get all tests

  • Description

    Returns the list of all tests
  • URL structure

    https://api.interviewmocha.com/v2/org/tests

  • Request Method

    GET

  • Request Data

    Parameters
    Parameter Description Default Data Type Is Mandatory
    page_size Number of tests to return per page 20 Integer No
    page_no To retrieve test based on page number 1 Integer No
  • Response Data

    Object result contains tests array, which consists of metadata of each test that is associated with user account.
    Parameters
    Argument Name Description Return Data Type
    statuscode Status code returned with every response. String
    description Status code message. String
    result Wrapper Object Object
    result.tests[N].accesskey Access key of Test String
    result.tests[N].testId ID of Test Int64
    result.tests[N].testName Name of Test String
    result.tests[N].duration Duration of Test in minutes Integer
    result.tests[N].questions Number of question in test Integer
    result.tests[N].testStatus Status of a test (Active/Inactive) String
    result.testsCount Count of all tests Integer
  • Sample Code

    Example Curl request will look like this:

    curl -i -H "x-api-key:YOUR_API_KEY_HERE"
    -H "content-type:application/json;charset=utf-8"
    -X GET https://api.interviewmocha.com/v2/org/tests?page_no=1&page_size=5

    Response Body:
    {
      "statuscode": "200.1",
      "description": "The request has succeeded.",
      "result": {
        "tests": [
          {
            "testId": 840799,
            "testName": "C/ C++ Assessment",
            "accessKey": "cf8fdd2d0eef",
            "duration": 50,
            "questions": 50,
            "testStatus": "Active"
          },
          {
            "testId": 840800,
            "testName": "Testing Assessment",
            "accessKey": "49069090313b",
            "duration": 50,
            "questions": 50,
            "testStatus": "Active"
          },
          {
            "testId": 840801,
            "testName": "Java Assessment",
            "accessKey": "b3d9e0d22127",
            "duration": 50,
            "questions": 50,
            "testStatus": "Active"
          },
          {
            "testId": 840802,
            "testName": "Dot Net Assessment",
            "accessKey": "54bd59a77d1b",
            "duration": 80,
            "questions": 52,
            "testStatus": "Active"
          },
          {
            "testId": 840803,
            "testName": "Android",
            "accessKey": "c9ef34059106",
            "duration": 50,
            "questions": 50,
            "testStatus": "Active"
          }
        ],
        "testsCount": 49
      }
    }