Classroom Management · REST API

Folder Management
in Classroom

Complete reference for managing folders, submitting papers, and retrieving plagiarism & AI reports within the DrillBit Classroom environment. All endpoints require JWT authentication.

Base URL https://s1.drillbitplagiarismcheck.com

🔐 Authentication Required

All endpoints except /authentication/authenticate require the header Authorization: Bearer <token>. Obtain a token by calling the Authenticate endpoint first. Tokens expire and must be refreshed.

🔑
Authentication
POST /authentication/authenticate Authenticate User

Authenticates a user with email and password credentials. Returns a JWT token required for all subsequent API calls, along with user role, profile details, and feature flags.

Request Body — application/json
FieldTypeRequiredDescription
usernamestringrequiredRegistered email address of the user
passwordstringrequiredAccount password
POST /authentication/authenticate
Content-Type: application/json

{
  "username": "admin@example.com",
  "password": "123456"
}
200 OK
Response Fields
FieldTypeDescription
tokenstringJWT Bearer token — include in all subsequent request headers
rolestringUser role (e.g. admin, teacher)
usernamestringAuthenticated user's email
namestringDisplay name of the authenticated user
in_flagbooleanInstitution flag for this account
ai_flagbooleanAI detection feature enabled for account
mfabooleanMulti-factor authentication status
idintegerUnique user identifier
con_typestring|nullConnection type (null if standard login)
{
  "token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbnRlc3Rpbmdl...",
  "role": "admin",
  "username": "admin@example.com",
  "name": "Testing Admin",
  "in_flag": false,
  "ai_flag": false,
  "mfa": false,
  "id": 22201,
  "con_type": null
}
💡 Copy the token value and pass it as Authorization: Bearer <token> in all subsequent requests.
📁
Folder Management
GET /extreme/myFolders List Folders

Returns a paginated list of all folders (assignments) belonging to the authenticated user. Each folder object includes plagiarism check settings, database options, submission count, and excluded-phrase configuration.

Headers
Authorization: Bearer <token>
Query Parameters
ParameterTypeDefaultDescription
pageinteger0Page index (0-based)
sizeinteger24Results per page
fieldstringass_idField to sort by
orderBystringdescasc or desc
GET /extreme/myFolders?page=0&size=24&field=ass_id&orderBy=desc
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
200 OK
Top-level Fields
FieldTypeDescription
grammar_subscriptionstringGrammar check subscription status (YES/NO)
foldersobjectPaginated folder data with links, content array and page metadata
folders.content[ ] — Folder Object
FieldTypeDescription
folder_idintegerUnique folder identifier
folder_namestringDisplay name of the folder
creation_datestringFolder creation timestamp (YYYY-MM-DD HH:mm:ss)
end_datestringFolder expiry date
excludeReferencesstringExclude references section from check
excludeQuotesstringExclude quoted text from check
excludeSmallSourcesstringExclude small matching sources
excludeIncludeSourcesstringInclude/exclude selected sources
grammarCheckstringGrammar check enabled for this folder
excludePhrasesstringExclude specific phrases from matching
phrasesobjectUp to 15 excluded phrases (p1–p15), null if unused
db_studentpaperstringCheck against student paper database
db_publicationsstringCheck against publications database
db_internetstringCheck against internet sources
institution_repositorystringCheck against institution repository
repository_scopestringScope of repository check (e.g. LOCAL)
no_of_submissionsintegerNumber of papers submitted in this folder
exclude_thresholdintegerMinimum word count to exclude a source
folders.page — Pagination
FieldTypeDescription
sizeintegerResults per page
totalElementsintegerTotal number of folders
totalPagesintegerTotal number of pages
numberintegerCurrent page index (0-based)
{
  "grammar_subscription": "YES",
  "folders": {
    "links": [{ "rel": "self", "href": "https://s1.drillbitplagiarismcheck.com:8082/extreme/myFolders?..." }],
    "content": [
      {
        "folder_id": 286208,
        "folder_name": "Moodle",
        "creation_date": "2023-06-08 13:00:39",
        "end_date": "2024-07-31 00:00:00",
        "excludeReferences": "NO",
        "excludeQuotes": "YES",
        "excludeSmallSources": "YES",
        "grammarCheck": "NO",
        "db_studentpaper": "YES",
        "db_publications": "YES",
        "db_internet": "YES",
        "institution_repository": "YES",
        "repository_scope": "LOCAL",
        "no_of_submissions": 28,
        "exclude_threshold": 15
      }
    ],
    "page": {
      "size": 24,
      "totalElements": 18,
      "totalPages": 1,
      "number": 0
    }
  }
}
POST /extreme/folder Create Folder

Creates a new folder (assignment) under the authenticated user's classroom. Returns the new folder ID and a link to the created resource.

Headers
Authorization: Bearer <token>
Content-Type: application/json
POST /extreme/folder
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
200 OK
FieldTypeDescription
statusintegerHTTP status code
messagestringSuccess confirmation message
timeStampstringServer timestamp of the operation
_links.self.hrefstringURL of the newly created folder resource
{
  "status": 200,
  "message": "Folder has been created successfully.",
  "timeStamp": "08-04-2026 11:24:10",
  "_links": {
    "self": {
      "href": "https://s1.drillbitplagiarismcheck.com:8082/extreme/classes/29022/assignments/620232"
    }
  }
}
💡 Save the folder_id (e.g. 620232) from the _links.self.href — you will need it for update, delete, and submission operations.
PUT /extreme/folder/{folder_id} Update Folder

Updates an existing folder's name and plagiarism check settings, including database sources, exclusion options, and similarity threshold. All fields in the payload are applied on save.

Headers
Authorization: Bearer <token>
Content-Type: application/json
Path Parameters
ParameterTypeRequiredDescription
folder_idintegerrequiredThe ID of the folder to update
Request Body Fields
FieldTypeDescription
assignment_namestringNew folder/assignment name
exclude_referencestringExclude references (YES/NO)
exclude_quotesstringExclude quoted text
exclude_small_sourcesstringExclude small sources
grammar_checkstringEnable grammar checking
exclude_phrasesstringEnable phrase exclusion
db_studentpaperstringCheck against student paper DB
db_publicationsstringCheck against publications DB
db_internetstringCheck against internet sources
institution_repositorystringCheck against institution repository
exclude_thresholdintegerMinimum word threshold to exclude a source match
PUT /extreme/folder/620232
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...

{
  "assignment_name": "API Docs",
  "exclude_reference": "NO",
  "exclude_quotes": "NO",
  "exclude_small_sources": "NO",
  "grammar_check": "NO",
  "exclude_phrases": "NO",
  "db_studentpaper": "YES",
  "db_publications": "YES",
  "db_internet": "YES",
  "institution_repository": "YES",
  "exclude_threshold": 14
}
200 OK
{
  "status": 200,
  "message": "Folder has been updated successfully. ",
  "timeStamp": "08-04-2026 12:04:17",
  "_links": {
    "self": {
      "href": "https://s1.drillbitplagiarismcheck.com:8082/extreme/classes/29022/assignments/620232"
    }
  }
}
DELETE /extreme/folder?id={folder_id} Delete Folder

Permanently deletes a folder and all associated submissions. This action is irreversible. Ensure you back up any required data before calling this endpoint.

Headers
Authorization: Bearer <token>
Query Parameters
ParameterTypeRequiredDescription
idintegerrequiredThe folder ID to delete
DELETE /extreme/folder?id=620232
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
200 OK
{
  "status": 200,
  "message": "Folders and all the associated submissions has been deleted successfully.",
  "timeStamp": "08-04-2026 12:08:43"
}
⚠️ This action is irreversible. All submissions inside the folder will be permanently removed. There is no undo.
📄
Submissions
GET /extreme/myFolder/{folder_id}/submissions List Submissions

Returns a paginated list of all paper submissions in a specific folder. Each submission includes the plagiarism percentage, document metadata, word/character/sentence counts, file size, AI detection score, and grammar check URL.

Headers
Authorization: Bearer <token>
Path Parameters
ParameterTypeRequiredDescription
folder_idintegerrequiredThe folder to list submissions from
Query Parameters
ParameterTypeDefaultDescription
pageinteger0Page index (0-based)
sizeinteger24Results per page
fieldstringpaper_idSort field
orderBystringdescasc or desc
GET /extreme/myFolder/61625/submissions?page=0&size=24&field=paper_id&orderBy=desc
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
200 OK
submissionsList[ ] — Submission Object
FieldTypeDescription
paper_idintegerUnique paper identifier
namestringAuthor/submitter name
mail_idstringSubmitter's email address
titlestringDocument title
date_upstringUpload timestamp
percentstringSimilarity percentage (or NA if pending)
d_keystringReport download key (used in report URLs)
to_char / to_words / to_sens / to_pagesstringCharacter, word, sentence, and page counts
file_lengthstringFile size with unit (e.g. 22 Kb)
original_fnstringOriginal uploaded filename
doc_typestringDocument type (e.g. Thesis, Article, Assignment)
lang / lang1stringPrimary and secondary language of the document
grammar_urlstringGrammar report URL (or NA)
aistringAI-generated content percentage
og_percentstringOriginal similarity score before exclusions
statusstringSubmission status (active / deleted)
{
  "_embedded": {
    "submissionsList": [
      {
        "paper_id": 228306,
        "name": "sathish",
        "title": "test",
        "date_up": "2021-02-19 11:23:57",
        "percent": "NA",
        "d_key": "NA",
        "original_fn": "google.docx",
        "doc_type": "Assignment",
        "ai": "0",
        "status": "active"
      }
    ]
  },
  "page": {
    "size": 24,
    "totalElements": 2,
    "totalPages": 1,
    "number": 0
  }
}
POST /files/myFolder/{folder_id}/singleFile Submit Paper

Uploads a single paper file to a specified folder and queues it for plagiarism and/or grammar analysis. Submit as multipart/form-data. Returns full submission metadata including the new paper_id and report links.

Headers
Authorization: Bearer <token>
Content-Type: multipart/form-data
Path Parameters
ParameterTypeRequiredDescription
folder_idintegerrequiredThe folder to submit the paper into
Form Fields (multipart/form-data)
FieldTypeRequiredDescription
authorNamestringrequiredName of the paper author
titlestringrequiredTitle of the document
documentTypestringrequiredType: Article, Thesis, Assignment, etc.
plagiarismCheckstringrequiredYES or NO
grammarCheckstringrequiredYES or NO
languagestringrequiredDocument language (e.g. English)
guide_emailstringoptionalGuide's email address
guide_namestringoptionalGuide's name
filebinaryrequiredThe document file to upload (PDF, DOCX, etc.)
POST /files/myFolder/61625/singleFile
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
Content-Type: multipart/form-data

authorName:       api docs
title:            api docs
documentType:     Article
plagiarismCheck:  YES
grammarCheck:     NO
language:         English
guide_email:      (empty)
guide_name:       (empty)
file:             (binary)
200 OK
submissions — Submission Object
FieldTypeDescription
paper_idintegerNewly assigned unique paper ID
namestringAuthor name as submitted
titlestringDocument title
date_upstringUpload timestamp
percentstringSimilarity score (-- while processing)
to_pagesstringTotal pages in document
d_keystringReport key used to download reports
original_fnstringOriginal uploaded filename
linksarrayHATEOAS links — self URL and submissions list URL
{
  "submissions": {
    "paper_id": 5443188,
    "name": "api docs",
    "title": "api docs",
    "date_up": "2026-04-08 12:15:16",
    "percent": "--",
    "to_pages": "37",
    "file_length": "5983 Kb",
    "d_key": "AWBLRRKK0HCWGSODRBD0",
    "original_fn": "journal.pone.0323724.pdf",
    "doc_type": "Article",
    "ai": "--",
    "links": [
      { "rel": "self", "href": "https://s1.drillbitplagiarismcheck.com/extreme/myFolder/61625/submissions/5443188" },
      { "rel": "submissions", "href": "https://s1.drillbitplagiarismcheck.com/extreme/myFolder/61625/submissions" }
    ]
  },
  "status": 200,
  "message": "File uploaded successfully.",
  "timeStamp": "08-04-2026 12:15:16"
}
💡 The percent and d_key fields show -- immediately after upload while processing. Poll the Get Submission endpoint until a numeric percent value appears before downloading reports.
GET /pro/folder/{folder_id}/submission/{paper_id} Get Submission

Retrieves detailed metadata and analysis results for a single submission, including the final similarity percentage, AI detection score, word/character counts, and language information.

Headers
Authorization: Bearer <token>
Path Parameters
ParameterTypeRequiredDescription
folder_idintegerrequiredFolder containing the submission
paper_idintegerrequiredUnique paper identifier
GET /pro/folder/61625/submission/5443188
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
200 OK
FieldTypeDescription
paper_idintegerUnique paper identifier
folder_idintegerContaining folder ID
folder_namestringFolder display name
percentstringFinal similarity percentage
total_char / total_wordsstringTotal character and word counts
total_pagesstringTotal page count
aistringAI-generated content percentage
og_percentstringSimilarity score before exclusions applied
d_keystringReport download key for report endpoints
document_typestringDocument classification type
language / language1stringPrimary and secondary languages
original_file_namestringOriginal uploaded filename
exclude_references / exclude_quotes / small_sourcesstringApplied exclusion flags for this submission
{
  "paper_id": 5443188,
  "folder_id": 61625,
  "folder_name": "Testing",
  "title": "api docs",
  "percent": "98",
  "total_char": "117668",
  "total_words": "17149",
  "total_pages": "37",
  "d_key": "AWBLRRKK0HCWGSODRBD0",
  "document_type": "Article",
  "language": "English",
  "original_file_name": "journal.pone.0323724 (1).pdf",
  "ai": "3",
  "og_percent": "98",
  "ai_sup": 1
}
DELETE /extreme/myFolder/{folder_id}/submissions?paperId={paper_id} Delete Paper

Permanently deletes a specific paper submission from a folder, including all associated reports. This action cannot be undone.

Headers
Authorization: Bearer <token>
Path & Query Parameters
ParameterTypeRequiredDescription
folder_idintegerrequiredThe folder containing the paper (path param)
paperIdintegerrequiredThe paper to delete (query param)
DELETE /extreme/myFolder/61625/submissions?paperId=5443188
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
200 OK
{
  "status": 200,
  "message": "File(s) deleted successfully.",
  "timeStamp": "08-04-2026 12:50:54"
}
🔔
Webhooks

Callback-Based — No Polling Required

DrillBit processes submissions asynchronously (typically 10–15 minutes). Once analysis is complete, DrillBit sends a PUT request to your registered callback endpoint with full results. Contact support@drillbit.in to register your callback URL.

PUT {your_callback_endpoint} Analysis complete callback

When plagiarism analysis is complete, DrillBit sends a PUT request to your registered callback URL. Your endpoint must accept this payload and return 200 OK.

Workflow
① Upload file
② DrillBit processes
(10–15 min)
③ PUT callback sent
to your endpoint
Callback Payload Fields
FieldTypeDescription
paper_idintegerUnique identifier for the processed document
similaritystringSimilarity percentage (e.g. "23%")
download_urlstringURL to download the similarity report
flagintegerError flag — 1 = error, 0 = no error
PUT https://partner-api.example.com/drillbit/callback
Content-Type: application/json

{
  "paper_id":       200101,
  "similarity":     "18%",
  "download_url":   "https://s1.drillbitplagiarismcheck.com/reports/200101",
  "flag":           0
}
Expected Response from Your Endpoint
Status CodeMeaning
200 OKPayload received — DrillBit considers delivery complete
4XX / 5XXError — DrillBit will treat the callback as failed
💡 Your endpoint must respond with 200 OK within a reasonable timeout. No specific response body is required.
📊
Reports
GET /analysis-gateway/api/download2/{paper_id}/{d_key} Similarity Report

Downloads the full similarity/plagiarism report PDF for a submitted paper. The d_key is the report download key returned in the submission response.

Headers
Authorization: Bearer <token>
Path Parameters
ParameterTypeRequiredDescription
paper_idintegerrequiredUnique paper identifier
d_keystringrequiredReport download key from submission response
GET /analysis-gateway/api/download2/5443527/6AJGFYOG4AIK7W6OOKRE
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
200 OK
PDF binary stream — similarity/plagiarism report
GET /analysis-gateway/api/ai/download2/{paper_id}/{d_key} AI Detection Report

Downloads the AI-generated content detection report PDF for a submitted paper. Identifies sections likely written by AI language models and provides an overall AI percentage score.

Headers
Authorization: Bearer <token>
Path Parameters
ParameterTypeRequiredDescription
paper_idintegerrequiredUnique paper identifier
d_keystringrequiredReport download key from submission response
GET /analysis-gateway/api/ai/download2/5443527/6AJGFYOG4AIK7W6OOKRE
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
200 OK
PDF binary stream — AI detection report
💡 AI detection is available only when ai_sup is 1 in the submission response. Confirm the ai field is a numeric value (not --) before downloading.
GET /analysis-gateway/api/download/summary/{paper_id}/{d_key} Summary Report

Downloads the one-page summary report PDF for a submitted paper. Provides a concise overview of the similarity analysis, source breakdown, and key metrics.

Headers
Authorization: Bearer <token>
Path Parameters
ParameterTypeRequiredDescription
paper_idintegerrequiredUnique paper identifier
d_keystringrequiredReport download key from submission response
GET /analysis-gateway/api/download/summary/5443527/6AJGFYOG4AIK7W6OOKRE
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
200 OK
PDF binary stream — summary report
GET /analysis-gateway/api/quality/download/{paper_id} Grammar Quality Report

Downloads the grammar quality report PDF for a submitted paper. Returns a detailed analysis of grammatical errors, style issues, and writing quality metrics. Only available when grammar check was enabled for the submission.

Headers
Authorization: Bearer <token>
Path Parameters
ParameterTypeRequiredDescription
paper_idintegerrequiredUnique paper identifier returned on submission
GET /analysis-gateway/api/quality/download/5443527
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...
200 OK — Report Available
PDF binary stream — grammar quality report
400 Bad Request — Report Not Available
{
  "status": 400,
  "description": "BAD_REQUEST",
  "timestamp": "08-04-2026 01:07:09",
  "message": "The quality report is either not yet ready or not available.",
  "debugMessage": "The quality report is either not yet ready or not available.",
  "subErrors": null,
  "path": "/analysis-gateway/api/quality/download/5443527"
}
💡 Only the paper_id is required — no d_key needed for grammar reports. A 400 response means grammar check was not enabled for that submission or the report is still processing.
⚠️
Error Codes
Status CodeErrorDescriptionCommon Cause
200 OKSuccessRequest completed successfully.
400 Bad RequestBad RequestThe request was malformed or missing required fields.Missing payload fields, grammar report not ready
401 UnauthorizedUnauthorizedAuthentication token is missing, expired, or invalid.Missing or expired JWT token
403 ForbiddenForbiddenThe user does not have permission to access this resource.Accessing another user's folder or paper
404 Not FoundNot FoundThe requested resource does not exist.Invalid folder_id, paper_id, or d_key
409 ConflictConflictThe request conflicts with the current state of the server.Duplicate submission or folder name
413 Payload Too LargePayload Too LargeThe uploaded file exceeds the maximum allowed size.File too large for single upload
422 UnprocessableUnprocessable EntityRequest was well-formed but contains semantic errors.Invalid field values or unsupported file type
429 Too Many RequestsRate LimitedToo many requests sent in a short period.Exceeded API rate limit
500 Server ErrorInternal Server ErrorAn unexpected error occurred on the DrillBit server.Contact support if this persists
503 UnavailableService UnavailableThe server is temporarily unable to handle requests.Maintenance or high server load
💡 All error responses include a JSON body with a message or description field. For persistent 5XX errors, contact support@drillbit.in.

That's all for Classroom Management

Explore other DrillBit API products — Folder Management and LMS Integration.

Back to all products