Turnitin Core API
- API version: 1.0.258
- Build date: 2022-11-17T18:44:23.150387Z[Etc/UTC]
Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our developer portal documentation page.
TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA.
First, login to Admin Console UI as an Admin user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing)
- Click
Integrations
in the side bar -->+ Add Integration
at top the top of the page --> Enter a name -->Add
Button API Keys - Click
Integrations
in the side bar -->Create API Key
Button next to a given Integration Scope --> Enter a name --> clickCreate and View button
- Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show)
- Register a webhook
- Create a submission
- Upload a file for the submission
- Wait for the submission upload to process
- If you registered a webhook, a callback will be sent to it when upload is complete
- The status of the submission will also update to
COMPLETE
- Request a Similarity Report
- Wait for similarity report to process
- If you registered a webhook, a callback will be sent to it when report is complete
- The status of the report will also be updated to
COMPLETE
- Request a URL with parameters to view the Similarity Report
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-java-client</artifactId>
<version>1.0.258</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'openapi-java-client' jar has been published to maven central.
mavenLocal() // Needed if the 'openapi-java-client' jar has been published to the local maven repo.
}
dependencies {
implementation "org.openapitools:openapi-java-client:1.0.258"
}
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/openapi-java-client-1.0.258.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.EulaApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://app-us.turnitin.com/api/v1");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
EulaApi apiInstance = new EulaApi(defaultClient);
String xTurnitinIntegrationName = "myintegration"; // String | a human readable string representing the type of integration being used
String xTurnitinIntegrationVersion = "v1.0.2"; // String | the version of the integration platform being used
String versionId = "latest"; // String | The EULA version ID (or `latest`)
EulaAcceptRequest data = new EulaAcceptRequest(); // EulaAcceptRequest |
try {
EulaAcceptListItem result = apiInstance.eulaVersionIdAcceptPost(xTurnitinIntegrationName, xTurnitinIntegrationVersion, versionId, data);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EulaApi#eulaVersionIdAcceptPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
All URIs are relative to https://app-us.turnitin.com/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
EulaApi | eulaVersionIdAcceptPost | POST /eula/{version_id}/accept | Accepts a particular EULA version on behalf of an external user |
EulaApi | eulaVersionIdAcceptUserIdGet | GET /eula/{version_id}/accept/{user_id} | Queries the acceptences of a particular EULA version on behalf of an external user |
EulaApi | eulaVersionIdGet | GET /eula/{version_id} | Gets information about a particular EULA version |
EulaApi | eulaVersionIdViewGet | GET /eula/{version_id}/view | Gets the text of a particular EULA version |
FeaturesApi | featuresEnabledGet | GET /features-enabled | Get information about what features are allowed by the current license |
GroupsApi | addGroupAttachment | POST /groups/{group_id}/attachments | Add attachment to a group. will create a group if it does not exist. |
GroupsApi | deleteGroupAttachment | DELETE /groups/{group_id}/attachments/{attach_id} | Hard delete group attachment |
GroupsApi | getGroup | GET /groups/{group_id} | Get group, group context and group context owners info |
GroupsApi | getGroupAttachment | GET /groups/{group_id}/attachments/{attach_id} | Get group attachment |
GroupsApi | getGroupAttachments | GET /groups/{group_id}/attachments | Get all attachments |
GroupsApi | groupsGroupIdPut | PUT /groups/{group_id} | upsert group, group context and group context owners info |
GroupsApi | updateGroupAttachment | PATCH /groups/{group_id}/attachments/{attach_id} | Patch a group attachment |
GroupsApi | uploadGroupAttachment | PUT /groups/{group_id}/attachments/{attach_id}/original | Upload Submitted File |
IndexApi | getIndexStatus | GET /submissions/{id}/index | Return index state of submission |
IndexApi | indexSubmission | PUT /submissions/{id}/index | Index and return index state of submission |
SimilarityApi | downloadSimilarityReportPdf | GET /submissions/{id}/similarity/pdf/{pdf_id} | GET download pdf |
SimilarityApi | getSimilarityReportPdfStatus | GET /submissions/{id}/similarity/pdf/{pdf_id}/status | GET pdf download status |
SimilarityApi | getSimilarityReportResults | GET /submissions/{id}/similarity | Get Similarity Report Results |
SimilarityApi | getSimilarityReportUrl | POST /submissions/{id}/viewer-url | Returns a URL to access Cloud Viewer |
SimilarityApi | requestSimilarityReport | PUT /submissions/{id}/similarity | Request Similarity Report generation |
SimilarityApi | requestSimilarityReportPdf | POST /submissions/{id}/similarity/pdf | Request Pdf download and returns the Pdf Id |
SubmissionApi | createSubmission | POST /submissions | Create a new Submission |
SubmissionApi | deleteSubmission | DELETE /submissions/{id} | Deletes a submission and associated similarity report. |
SubmissionApi | getSubmiddionDetails | GET /submissions/{id} | Get Submission Details |
SubmissionApi | recoverSubmission | PUT /submissions/{id}/recover | Recover a soft deleted submission |
SubmissionApi | uploadSubmittedFile | PUT /submissions/{id}/original | Upload Submitted File |
WebhookApi | deleteWebhook | DELETE /webhooks/{id} | Delete Webhook endpoint |
WebhookApi | getWebhook | GET /webhooks/{id} | Get Webhook endpoint info |
WebhookApi | updateWebhook | PATCH /webhooks/{id} | Update Webhook endpoint info |
WebhookApi | webhooksGet | GET /webhooks | List registered Webhook endpoints |
WebhookApi | webhooksPost | POST /webhooks | Register a Webhook endpoint |
- AddGroupAttachmentRequest
- AddGroupAttachmentResponse
- AggregateGroup
- AnnotationsSettings
- AuthorMetadataOverride
- Error
- Eula
- EulaAcceptListItem
- EulaAcceptRequest
- EulaVersion
- FeaturesEnabled
- FeaturesGenerationSettings
- FeaturesSimilarity
- FeaturesSimilarityViewSettings
- FeaturesTenant
- FeaturesViewerModes
- GenerateSimilarityPDF
- GetGroupAttachments200Response
- Group
- GroupAttachmentResponse
- GroupContext
- IndexStateSettings
- IndexingSettings
- PDFStatusWebhookRequest
- PdfStatusResponse
- RateLimitError
- RequestPdfResponse
- Sidebar
- SimilarityCompleteWebhookRequest
- SimilarityGenerationSettings
- SimilarityMetadata
- SimilarityMetadataAllOf
- SimilarityMetadataAllOfTopMatches
- SimilarityPutRequest
- SimilarityScoreData
- SimilaritySettings
- SimilaritySettingsModes
- SimilaritySettingsViewSettings
- SimilarityViewSettings
- SimilarityViewerUrlResponse
- SimilarityViewerUrlSettings
- SimpleSubmissionResponse
- SimpleSubmissionResponseAllOf
- Submission
- SubmissionAllOf
- SubmissionBase
- SubmissionBaseMetadata
- SubmissionCompleteWebhookRequest
- SubmissionCompleteWebhookRequestAllOf
- SubmissionCompleteWebhookRequestAllOfMetadata
- SubmissionSizeError
- SuccessMessage
- Users
- ViewerPermissions
- Webhook
- WebhookAllOf
- WebhookBase
- WebhookPathRequest
- WebhookWithSecret
- WebhookWithSecretAllOf
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.