Code Plagiarism & Similarity API

Integrate your existing software with Codequiry's source code plagiarism checker.

API Demonstration

Connect your account to run the live examples.

9. Detailed Submission Results

Now that you are able to get an overview of the submission results, it's time to drill down into a specific submission's results. You should have access to the submission id's from the overview request (pt. 8), we will go into a specific submission to see the results for it.

Endpoint for detailed submission results

Getting result data for a submission

Retrieve files, parsed file content, peer matches, submission scores, web matches and more. Note that result data may be updated, more data might be returned as engine features are added.

When sending the request, we will need to send the following:

check_id - The id of the check you wish get results for
submission_id - The id of the submission you wish get detailed results for

				curl -X POST \
  'https://codequiry.com/api/v1/check/results?check_id=YOUR_CHECK_ID&submission_id=THE_SUBMISSION_ID' \
    -H 'apikey:  YOUR_API_KEY_HERE '
				
cURL Command
Sample Response (JSON Array)
				{
    "submission": {
        "id": 14589,
        "filename": "MiniFactorial-T3-VariableBigInt",
        "status_id": 4,
        "created_at": "2019-05-31 15:55:23",
        "updated_at": "2019-05-31 16:39:43",
        "result1": "0.00",
        "result2": "0.00",
        "result3": "0.00",
        "total_result": "48.65",
        "submissionresults": [],
        "submissionfiles": [
            {
                "id": 128042,
                "submission_id": 14589,
                "filedir": "MiniFactorial-T3-VariableBigInt/src/main.java",
                "content": "import java.math.BigInteger;\n\n\npublic class main {\n\t\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(factorial(10));\n\t}\n\t\n\tpublic static BigInteger factorial(int n)\n    {\n\t\tBigInteger newNameForBigI = BigInteger.ONE;\n        for (int j = 1; j <= n; ++j) {\n        \tnewNameForBigI = newNameForBigI.multiply(BigInteger.valueOf(j));\n        }\n        return newNameForBigI;\n    }\n}\n",
                "created_at": null,
                "updated_at": null,
                "language_id": 1
            }
        ]
    },
    "avg": 32.43,
    "max": "48.65",
    "min": "0.00",
    "peer_matches": [
        {
            "id": 616853,
            "submission_id": 14589,
            "submission_id_matched": 14587,
            "similarity": "45.00",
            "matched_similarity": "52.94",
            "file": "MiniFactorial-T3-VariableBigInt/src/main.java",
            "file_matched": "MiniFactorial-T3-ForWhile/src/main.java",
            "line_start": 4,
            "line_end": 12,
            "tokens": 9,
            "created_at": null,
            "updated_at": null,
            "line_matched_start": 2,
            "line_matched_end": 8,
            "match_type": 1
        }
    ],
    "other_matches": [],
    "related_submissions": [
        {
            "id": 14587,
            "filename": "MiniFactorial-T3-ForWhile",
            "status_id": 4,
            "created_at": "2019-05-31 15:55:23",
            "updated_at": "2019-05-31 16:39:43",
            "result1": "0.00",
            "result2": "0.00",
            "result3": "0.00",
            "total_result": "48.65",
            "submissionresults": [
                {
                    "id": 463587,
                    "submission_id": 14587,
                    "submission_id_compared": 14588,
                    "score": "0.00",
                    "created_at": null,
                    "updated_at": null
                },
                {
                    "id": 463588,
                    "submission_id": 14587,
                    "submission_id_compared": 14589,
                    "score": "48.65",
                    "created_at": null,
                    "updated_at": null
                }
            ]
        },
        {
            "id": 14588,
            "filename": "MiniFactorial-T3-JumpLabel",
            "status_id": 4,
            "created_at": "2019-05-31 15:55:23",
            "updated_at": "2019-05-31 16:39:43",
            "result1": "0.00",
            "result2": "0.00",
            "result3": "0.00",
            "total_result": "0.00",
            "submissionresults": [
                {
                    "id": 463589,
                    "submission_id": 14588,
                    "submission_id_compared": 14589,
                    "score": "0.00",
                    "created_at": null,
                    "updated_at": null
                }
            ]
        },
        {
            "id": 14589,
            "filename": "MiniFactorial-T3-VariableBigInt",
            "status_id": 4,
            "created_at": "2019-05-31 15:55:23",
            "updated_at": "2019-05-31 16:39:43",
            "result1": "0.00",
            "result2": "0.00",
            "result3": "0.00",
            "total_result": "48.65",
            "submissionresults": []
        }
    ],
    "related_files": [
        {
            "id": 128043,
            "submission_id": 14587,
            "filedir": "MiniFactorial-T3-ForWhile/src/main.java",
            "content": "\npublic class main {\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(factorial(10));\n\t}\n\tpublic static int factorial(int n)\n    {\n\t\tint ret = 1;\n\t\tint i = 1;\n\t\twhile (i <= n) {\n\t\t\tret *= i;\n\t\t\ti++;\n\t\t}\n        return ret;\n    }\n}\n",
            "created_at": null,
            "updated_at": null,
            "language_id": 1
        },
        {
            "id": 128042,
            "submission_id": 14589,
            "filedir": "MiniFactorial-T3-VariableBigInt/src/main.java",
            "content": "import java.math.BigInteger;\n\n\npublic class main {\n\t\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(factorial(10));\n\t}\n\t\n\tpublic static BigInteger factorial(int n)\n    {\n\t\tBigInteger newNameForBigI = BigInteger.ONE;\n        for (int j = 1; j <= n; ++j) {\n        \tnewNameForBigI = newNameForBigI.multiply(BigInteger.valueOf(j));\n        }\n        return newNameForBigI;\n    }\n}\n",
            "created_at": null,
            "updated_at": null,
            "language_id": 1
        }
    ]
}
				
JSON Array
Error Format Response (422 error)
                {
    "error": "Invalid submission_id provided"
}
                
JSON Array

What's next

For optimal understanding of API usage, we recommend following this guide.

The API and documentation are constantly being updated during Beta. Please make sure to check the changelog regularly.
Our Mission

Codequiry aims to achieve an equally fair environment for fields relating to computer science by preventing the use of unoriginal code. The first step to preserving academic integrity and original source code starts here.

Codequiry

© 2018-2024 Codequiry, LLC.