TCAClient - the Ruby gem for the Turnitin Core API
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. ### Admin Console UI 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 the 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
This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.249
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen
To build the Ruby code into a gem:
gem build tca_client.gemspec
Then either install the gem locally:
gem install ./tca_client-1.0.0.gem
(for development, run gem install --dev ./tca_client-1.0.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'tca_client', '~> 1.0.0'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'tca_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'tca_client'
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = ENV['TCA_API_KEY']
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
config.api_key_prefix['Authorization'] = 'Bearer'
config.host = ENV['TCA_HOST']
config.base_path = 'api/v1'
end
api_instance = TCAClient::EULAApi.new
x_turnitin_integration_name = 'integration-name' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = '1.0' # String | the version of the integration platform being used
latest_eula = api_instance.eula_version_id_get(x_turnitin_integration_name, x_turnitin_integration_version, 'latest')
p latest_eula.version
version_id = latest_eula.version # String | The EULA version ID (or `latest`)
user_id = 'a_user'
begin
result = api_instance.eula_version_id_accept_user_id_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, user_id)
rescue TCAClient::ApiError => e
false
end
begin
body = TCAClient::EulaAcceptRequest.new # EulaAcceptRequest
body.user_id = 'a_user'
body.language = 'en-us'
body.accepted_timestamp = DateTime.now
body.version = latest_eula.version
#Accepts a particular EULA version on behalf of an external user
result = api_instance.eula_version_id_accept_post(body, x_turnitin_integration_name, x_turnitin_integration_version, version_id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling EULAApi->eula_version_id_accept_post: #{e}"
end
begin
#Queries the acceptences of a particular EULA version on behalf of an external user
result = api_instance.eula_version_id_accept_user_id_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, user_id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling EULAApi->eula_version_id_accept_user_id_get: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::EULAApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
version_id = 'version_id_example' # String | The EULA version ID (or `latest`)
opts = {
lang: 'lang_example' # String | The desired language of the specified EULA version
}
begin
#Gets information about a particular EULA version
result = api_instance.eula_version_id_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, opts)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling EULAApi->eula_version_id_get: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::EULAApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
version_id = 'version_id_example' # String | The EULA version ID (or `latest`)
opts = {
lang: 'lang_example' # String | The desired language of the specified EULA version
}
begin
#Gets the text of a particular EULA version
result = api_instance.eula_version_id_view_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, opts)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling EULAApi->eula_version_id_view_get: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::FeaturesApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
begin
#Get information about what features are allowed by the current license
result = api_instance.features_enabled_get(x_turnitin_integration_name, x_turnitin_integration_version)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling FeaturesApi->features_enabled_get: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::GroupsApi.new
body = TCAClient::AddGroupAttachmentRequest.new # AddGroupAttachmentRequest |
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id
begin
#Add attachment to a group. will create a group if it does not exist.
result = api_instance.add_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling GroupsApi->add_group_attachment: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::GroupsApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request)
begin
#Hard delete group attachment
api_instance.delete_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id)
rescue TCAClient::ApiError => e
puts "Exception when calling GroupsApi->delete_group_attachment: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::GroupsApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id
begin
#Get group, group context and group context owners info
result = api_instance.get_group(x_turnitin_integration_name, x_turnitin_integration_version, group_id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling GroupsApi->get_group: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::GroupsApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request)
begin
#Get group attachment
result = api_instance.get_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling GroupsApi->get_group_attachment: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::GroupsApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id
begin
#Get all attachments
result = api_instance.get_group_attachments(x_turnitin_integration_name, x_turnitin_integration_version, group_id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling GroupsApi->get_group_attachments: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::GroupsApi.new
body = TCAClient::AggregateGroup.new # AggregateGroup |
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id
begin
#upsert group, group context and group context owners info
result = api_instance.groups_group_id_put(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling GroupsApi->groups_group_id_put: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::GroupsApi.new
body = TCAClient::AddGroupAttachmentRequest.new # AddGroupAttachmentRequest |
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request)
begin
#Patch a group attachment
result = api_instance.update_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling GroupsApi->update_group_attachment: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::GroupsApi.new
body = nil # Object | the attachment file
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | The Group ID (required to already exist)
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request)
content_disposition = 'content_disposition_example' # String | *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"`
begin
#Upload Submitted File
result = api_instance.upload_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling GroupsApi->upload_group_attachment: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::IndexApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
begin
#Return index state of submission
result = api_instance.get_index_status(x_turnitin_integration_name, x_turnitin_integration_version, id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling IndexApi->get_index_status: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::IndexApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
begin
#Index and return index state of submission
result = api_instance.index_submission(x_turnitin_integration_name, x_turnitin_integration_version, id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling IndexApi->index_submission: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SimilarityApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
pdf_id = 'pdf_id_example' # String | The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
begin
#GET download pdf
result = api_instance.download_similarity_report_pdf(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SimilarityApi->download_similarity_report_pdf: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SimilarityApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
pdf_id = 'pdf_id_example' # String | The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
begin
#GET pdf download status
result = api_instance.get_similarity_report_pdf_status(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SimilarityApi->get_similarity_report_pdf_status: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SimilarityApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
begin
#Get Similarity Report Results
result = api_instance.get_similarity_report_results(x_turnitin_integration_name, x_turnitin_integration_version, id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SimilarityApi->get_similarity_report_results: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SimilarityApi.new
body = TCAClient::SimilarityViewerUrlSettings.new # SimilarityViewerUrlSettings |
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
begin
#Returns a URL to access Cloud Viewer
result = api_instance.get_similarity_report_url(body, x_turnitin_integration_name, x_turnitin_integration_version, id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SimilarityApi->get_similarity_report_url: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SimilarityApi.new
body = TCAClient::SimilarityPutRequest.new # SimilarityPutRequest |
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
begin
#Request Similarity Report generation
result = api_instance.request_similarity_report(body, x_turnitin_integration_name, x_turnitin_integration_version, id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SimilarityApi->request_similarity_report: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SimilarityApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
begin
#Request Pdf download and returns the Pdf Id
result = api_instance.request_similarity_report_pdf(x_turnitin_integration_name, x_turnitin_integration_version, id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SimilarityApi->request_similarity_report_pdf: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SubmissionApi.new
body = TCAClient::SubmissionBase.new # SubmissionBase |
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
begin
#Create a new Submission
result = api_instance.create_submission(body, x_turnitin_integration_name, x_turnitin_integration_version)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SubmissionApi->create_submission: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SubmissionApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
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.
}
begin
#Deletes a submission and associated similarity report.
result = api_instance.delete_submission(x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SubmissionApi->delete_submission: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SubmissionApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
begin
#Get Submission Details
result = api_instance.get_submission_details(x_turnitin_integration_name, x_turnitin_integration_version, id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SubmissionApi->get_submission_details: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SubmissionApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
begin
#Recover a soft deleted submission
result = api_instance.recover_submission(x_turnitin_integration_name, x_turnitin_integration_version, id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SubmissionApi->recover_submission: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::SubmissionApi.new
body = nil # Object | the user's submitted file
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
content_type = 'content_type_example' # String | *Must be 'binary/octet-stream'
content_disposition = 'content_disposition_example' # String | *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"`. To support UTF-8 filenames, you must URL encode the header
begin
#Upload Submitted File
result = api_instance.upload_submitted_file(body, x_turnitin_integration_name, x_turnitin_integration_version, id, content_type, content_disposition)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling SubmissionApi->upload_submitted_file: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::WebhookApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String |
begin
#Delete Webhook endpoint
api_instance.delete_webhook(x_turnitin_integration_name, x_turnitin_integration_version, id)
rescue TCAClient::ApiError => e
puts "Exception when calling WebhookApi->delete_webhook: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::WebhookApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String |
begin
#Get Webhook endpoint info
result = api_instance.get_webhook(x_turnitin_integration_name, x_turnitin_integration_version, id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling WebhookApi->get_webhook: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::WebhookApi.new
body = TCAClient::WebhookPathRequest.new # WebhookPathRequest |
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String |
begin
#Update Webhook endpoint info
result = api_instance.update_webhook(body, x_turnitin_integration_name, x_turnitin_integration_version, id)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling WebhookApi->update_webhook: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::WebhookApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
begin
#List registered Webhook endpoints
result = api_instance.webhooks_get(x_turnitin_integration_name, x_turnitin_integration_version)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling WebhookApi->webhooks_get: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = TCAClient::WebhookApi.new
body = TCAClient::WebhookWithSecret.new # WebhookWithSecret |
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
begin
#Register a Webhook endpoint
result = api_instance.webhooks_post(body, x_turnitin_integration_name, x_turnitin_integration_version)
p result
rescue TCAClient::ApiError => e
puts "Exception when calling WebhookApi->webhooks_post: #{e}"
end
All URIs are relative to https://{tenantName}.{hostName}/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
TCAClient::EULAApi | eula_version_id_accept_post | POST /eula/{version_id}/accept | Accepts a particular EULA version on behalf of an external user |
TCAClient::EULAApi | eula_version_id_accept_user_id_get | GET /eula/{version_id}/accept/{user_id} | Queries the acceptences of a particular EULA version on behalf of an external user |
TCAClient::EULAApi | eula_version_id_get | GET /eula/{version_id} | Gets information about a particular EULA version |
TCAClient::EULAApi | eula_version_id_view_get | GET /eula/{version_id}/view | Gets the text of a particular EULA version |
TCAClient::FeaturesApi | features_enabled_get | GET /features-enabled | Get information about what features are allowed by the current license |
TCAClient::GroupsApi | add_group_attachment | POST /groups/{group_id}/attachments | Add attachment to a group. will create a group if it does not exist. |
TCAClient::GroupsApi | delete_group_attachment | DELETE /groups/{group_id}/attachments/{attach_id} | Hard delete group attachment |
TCAClient::GroupsApi | get_group | GET /groups/{group_id} | Get group, group context and group context owners info |
TCAClient::GroupsApi | get_group_attachment | GET /groups/{group_id}/attachments/{attach_id} | Get group attachment |
TCAClient::GroupsApi | get_group_attachments | GET /groups/{group_id}/attachments | Get all attachments |
TCAClient::GroupsApi | groups_group_id_put | PUT /groups/{group_id} | upsert group, group context and group context owners info |
TCAClient::GroupsApi | update_group_attachment | PATCH /groups/{group_id}/attachments/{attach_id} | Patch a group attachment |
TCAClient::GroupsApi | upload_group_attachment | PUT /groups/{group_id}/attachments/{attach_id}/original | Upload Submitted File |
TCAClient::IndexApi | get_index_status | GET /submissions/{id}/index | Return index state of submission |
TCAClient::IndexApi | index_submission | PUT /submissions/{id}/index | Index and return index state of submission |
TCAClient::SimilarityApi | download_similarity_report_pdf | GET /submissions/{id}/similarity/pdf/{pdf_id} | GET download pdf |
TCAClient::SimilarityApi | get_similarity_report_pdf_status | GET /submissions/{id}/similarity/pdf/{pdf_id}/status | GET pdf download status |
TCAClient::SimilarityApi | get_similarity_report_results | GET /submissions/{id}/similarity | Get Similarity Report Results |
TCAClient::SimilarityApi | get_similarity_report_url | POST /submissions/{id}/viewer-url | Returns a URL to access Cloud Viewer |
TCAClient::SimilarityApi | request_similarity_report | PUT /submissions/{id}/similarity | Request Similarity Report generation |
TCAClient::SimilarityApi | request_similarity_report_pdf | POST /submissions/{id}/similarity/pdf | Request Pdf download and returns the Pdf Id |
TCAClient::SubmissionApi | create_submission | POST /submissions | Create a new Submission |
TCAClient::SubmissionApi | delete_submission | DELETE /submissions/{id} | Deletes a submission and associated similarity report. |
TCAClient::SubmissionApi | get_submission_details | GET /submissions/{id} | Get Submission Details |
TCAClient::SubmissionApi | recover_submission | PUT /submissions/{id}/recover | Recover a soft deleted submission |
TCAClient::SubmissionApi | upload_submitted_file | PUT /submissions/{id}/original | Upload Submitted File |
TCAClient::WebhookApi | delete_webhook | DELETE /webhooks/{id} | Delete Webhook endpoint |
TCAClient::WebhookApi | get_webhook | GET /webhooks/{id} | Get Webhook endpoint info |
TCAClient::WebhookApi | update_webhook | PATCH /webhooks/{id} | Update Webhook endpoint info |
TCAClient::WebhookApi | webhooks_get | GET /webhooks | List registered Webhook endpoints |
TCAClient::WebhookApi | webhooks_post | POST /webhooks | Register a Webhook endpoint |
- TCAClient::AddGroupAttachmentRequest
- TCAClient::AddGroupAttachmentResponse
- TCAClient::AggregateGroup
- TCAClient::AuthorMetadataOverride
- TCAClient::Error
- TCAClient::Eula
- TCAClient::EulaAcceptListItem
- TCAClient::EulaAcceptRequest
- TCAClient::EulaVersion
- TCAClient::FeaturesEnabled
- TCAClient::FeaturesGenerationSettings
- TCAClient::FeaturesSimilarity
- TCAClient::FeaturesSimilarityViewSettings
- TCAClient::FeaturesTenant
- TCAClient::FeaturesViewerModes
- TCAClient::Group
- TCAClient::GroupAttachmentResponse
- TCAClient::GroupContext
- TCAClient::IndexStateSettings
- TCAClient::IndexingSettings
- TCAClient::InlineResponse200
- TCAClient::PdfStatusResponse
- TCAClient::RateLimitError
- TCAClient::RequestPdfResponse
- TCAClient::Sidebar
- TCAClient::SimilarityGenerationSettings
- TCAClient::SimilarityMetadata
- TCAClient::SimilarityMetadataTopMatches
- TCAClient::SimilarityPutRequest
- TCAClient::SimilarityScoreData
- TCAClient::SimilaritySettings
- TCAClient::SimilaritySettingsModes
- TCAClient::SimilaritySettingsViewSettings
- TCAClient::SimilarityViewSettings
- TCAClient::SimilarityViewerUrlResponse
- TCAClient::SimilarityViewerUrlSettings
- TCAClient::SimpleSubmissionResponse
- TCAClient::Submission
- TCAClient::SubmissionBase
- TCAClient::SubmissionBaseMetadata
- TCAClient::SubmissionSizeError
- TCAClient::SuccessMessage
- TCAClient::Users
- TCAClient::ViewerPermissions
- TCAClient::Webhook
- TCAClient::WebhookBase
- TCAClient::WebhookPathRequest
- TCAClient::WebhookWithSecret
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header