All URIs are relative to https://app-us.turnitin.com/api/v1
Method | HTTP request | Description |
---|---|---|
createSubmission | POST /submissions | Create a new Submission |
deleteSubmission | DELETE /submissions/{id} | Deletes a submission and associated similarity report. |
getSubmiddionDetails | GET /submissions/{id} | Get Submission Details |
recoverSubmission | PUT /submissions/{id}/recover | Recover a soft deleted submission |
uploadSubmittedFile | PUT /submissions/{id}/original | Upload Submitted File |
SimpleSubmissionResponse createSubmission(xTurnitinIntegrationName, xTurnitinIntegrationVersion, data)
Create a new Submission
import TurnitinCoreApi from 'turnitin_core_api';
let defaultClient = TurnitinCoreApi.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new TurnitinCoreApi.SubmissionApi();
let xTurnitinIntegrationName = myintegration; // String | a human readable string representing the type of integration being used
let xTurnitinIntegrationVersion = v1.0.2; // String | the version of the integration platform being used
let data = new TurnitinCoreApi.SubmissionBase(); // SubmissionBase |
apiInstance.createSubmission(xTurnitinIntegrationName, xTurnitinIntegrationVersion, data, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
xTurnitinIntegrationName | String | a human readable string representing the type of integration being used | |
xTurnitinIntegrationVersion | String | the version of the integration platform being used | |
data | SubmissionBase |
- Content-Type: application/json
- Accept: application/json
SuccessMessage deleteSubmission(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id, opts)
Deletes a submission and associated similarity report.
import TurnitinCoreApi from 'turnitin_core_api';
let defaultClient = TurnitinCoreApi.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new TurnitinCoreApi.SubmissionApi();
let xTurnitinIntegrationName = myintegration; // String | a human readable string representing the type of integration being used
let xTurnitinIntegrationVersion = v1.0.2; // String | the version of the integration platform being used
let id = "id_example"; // String | The Submission ID (returned upon a successful POST to /submissions)
let opts = {
'hard': "'false'" // String | Accepts true or false indicating either hard or soft delete. A soft delete removes the associated submission report/index and changes the saved submission state to DELETED. A hard deletion completely removes the submission information from Panda and TCA and removes the associated report/index, which can not be recovered.
};
apiInstance.deleteSubmission(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
xTurnitinIntegrationName | String | a human readable string representing the type of integration being used | |
xTurnitinIntegrationVersion | String | the version of the integration platform being used | |
id | String | The Submission ID (returned upon a successful POST to /submissions) | |
hard | String | Accepts true or false indicating either hard or soft delete. A soft delete removes the associated submission report/index and changes the saved submission state to DELETED. A hard deletion completely removes the submission information from Panda and TCA and removes the associated report/index, which can not be recovered. | [optional] [default to 'false'] |
- Content-Type: Not defined
- Accept: application/json
Submission getSubmiddionDetails(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id)
Get Submission Details
import TurnitinCoreApi from 'turnitin_core_api';
let defaultClient = TurnitinCoreApi.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new TurnitinCoreApi.SubmissionApi();
let xTurnitinIntegrationName = myintegration; // String | a human readable string representing the type of integration being used
let xTurnitinIntegrationVersion = v1.0.2; // String | the version of the integration platform being used
let id = "id_example"; // String | The Submission ID (returned upon a successful POST to /submissions)
apiInstance.getSubmiddionDetails(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
xTurnitinIntegrationName | String | a human readable string representing the type of integration being used | |
xTurnitinIntegrationVersion | String | the version of the integration platform being used | |
id | String | The Submission ID (returned upon a successful POST to /submissions) |
- Content-Type: Not defined
- Accept: application/json
SimpleSubmissionResponse recoverSubmission(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id)
Recover a soft deleted submission
import TurnitinCoreApi from 'turnitin_core_api';
let defaultClient = TurnitinCoreApi.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new TurnitinCoreApi.SubmissionApi();
let xTurnitinIntegrationName = myintegration; // String | a human readable string representing the type of integration being used
let xTurnitinIntegrationVersion = v1.0.2; // String | the version of the integration platform being used
let id = "id_example"; // String | The Submission ID (returned upon a successful POST to /submissions)
apiInstance.recoverSubmission(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
xTurnitinIntegrationName | String | a human readable string representing the type of integration being used | |
xTurnitinIntegrationVersion | String | the version of the integration platform being used | |
id | String | The Submission ID (returned upon a successful POST to /submissions) |
- Content-Type: Not defined
- Accept: application/json
SuccessMessage uploadSubmittedFile(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id, contentType, contentDisposition, file)
Upload Submitted File
import TurnitinCoreApi from 'turnitin_core_api';
let defaultClient = TurnitinCoreApi.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
let apiInstance = new TurnitinCoreApi.SubmissionApi();
let xTurnitinIntegrationName = myintegration; // String | a human readable string representing the type of integration being used
let xTurnitinIntegrationVersion = v1.0.2; // String | the version of the integration platform being used
let id = "id_example"; // String | The Submission ID (returned upon a successful POST to /submissions)
let contentType = "contentType_example"; // String | *Must be 'binary/octet-stream'
let contentDisposition = inline; filename="MyFile.docx"; // String | *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"`. To support UTF-8 filenames, you must URL encode the header
let file = {key: null}; // Object | the user's submitted file
apiInstance.uploadSubmittedFile(xTurnitinIntegrationName, xTurnitinIntegrationVersion, id, contentType, contentDisposition, file, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
xTurnitinIntegrationName | String | a human readable string representing the type of integration being used | |
xTurnitinIntegrationVersion | String | the version of the integration platform being used | |
id | String | The Submission ID (returned upon a successful POST to /submissions) | |
contentType | String | *Must be 'binary/octet-stream' | |
contentDisposition | String | *must include the "filename" parameter, e.g. `inline; filename="MyFile.docx"`. To support UTF-8 filenames, you must URL encode the header | |
file | Object | the user's submitted file |
- Content-Type: binary/octet-stream
- Accept: application/json