ApiCorp: Interface Antiplagiat.ApiCorp.IApiCorp
ApiCorp Documentation  3.10.3
Interface Antiplagiat.ApiCorp.IApiCorp

Contract for working with the system API Antiplagiat. More details...

Public members

UploadResult UploadDocument (DocData data, DocAttributes attributes=null, UploadOptions options=null)
 Upload of the document. Both a separate document and an archive of documents can be downloaded. For a list of supported types, see Doc Data.FileType. When downloading an archive, documents of unsupported types inside the archive are ignored. More details...
 
DocAttributes UpdateDocumentAttributes (DocumentId docId, DocAttributes attributes)
 Update the document attributes. Only the specified attributes are changed. To remove a custom attribute, you must specify null, an empty string, or a string of spaces in its value. More details...
 
DocumentId SetExternalId (DocumentId docId, String externalId)
 Set a unique external identifier for the document. As a result of the function, only the external identifier changes, the internal identifier does not change. More details...
 
DocInfo GetDocumentInfo (DocumentId docId, InfoOptions options=null)
 Get information about the document. Parameter options indicates which information interests. More details...
 
DocInfo [] GetDocumentsInfo (DocumentId[] docIds, InfoOptions options=null)
 Get information about the list of documents. Parameter options indicates which information interests. More details...
 
string GetDocumentText (DocumentId docId)
 Get text of the document. More details...
 
void CheckDocument (DocumentId docId, string[] checkServicesList, CheckDocParams checkDocParameters=null)
 Start document check. More details...
 
CheckStatus GetCheckStatus (DocumentId docId)
 Get status of the last document check. More details...
 
CheckStatus [] GetCheckStatuses (DocumentId[] docIds)
 Get status of the last check of documents from the specified list. More details...
 
ReportSummary [] GetReportHistory (DocumentId docId)
 Get document report history. More details...
 
ReportView GetReportView (DocumentId docId, ReportViewOptions options=null)
 Get check report More details...
 
ReportDetails GetSourceView (DocumentId docId, int reportNum, long srcHash, SourceViewOptions options=null)
 Get information about the source in the report. More details...
 
void SetIndexedStatus (DocumentId docId, bool addToIndex)
 Please pay attention to the more general method SetIndexState(DocumentId, IndexState). Add a document to the similarity index or remove a document from the index. After removal from the index, the document stops being a source of similarity (or approved citation) in the checks. When deleting a document from the index, reports made before deletion will remain unchanged. More details...
 
void DeleteDocument (DocumentId docId)
 Delete a previously uploaded document. If an external identifier was set for a document, then after deletion this external identifier is released (it can be used to identify another document). When you delete a document, the audit reports for this document are also deleted. When a document is deleted, it is automatically deleted from the index. When deleting a document, the reports made before deletion, in which the document appears as a source, remain unchanged. More details...
 
DocumentId [] EnumerateDocuments (DocumentId afterDocId, EnumerateDocumentsOptions options=null)
 Please also pay attention to the method EnumerateReportInfos(EnumerateReportsOptions), which allows you to immediately get information about the results of the check. List the document IDs. IDs are listed in bundles - in options you can specify the size of the bundle. To get the next batch, you need to specify the ID of the last document in the received batch. More details...
 
CompanyStats GetCompanyStats ()
 Get statistics on loaded documents. More details...
 
CheckServiceInfo [] GetCheckServices ()
 Get list of checking services. More details...
 
FolderTree GetFolders (string email)
 Get the folder tree. More details...
 
int AddFolder (string email, string name, FolderOptions options=null)
 Add a folder. Please pay attention that the method can only be used in one stream. More details...
 
void DeleteFolder (string email, int folderId)
 Delete the folder. More details...
 
void RenameFolder (string email, int folderId, string name)
 Rename the folder. More details...
 
void MoveFolder (string email, int folderId, int parentId)
 Move the folder. More details...
 
void MoveDocuments (string email, int folderId, DocumentId[] docIds)
 Move the documents to another folder. More details...
 
TariffInfo GetTariffInfo ()
 Returns information about the current tariff plan. More details...
 
ExportReportInfo ExportReportToPdf (DocumentId docId, ExportReportOptions options=null)
 Export PDF report. More details...
 
byte [] GetVerificationReport (DocumentId docId, VerificationReportOptions options=null, FormattingOptions formattingOptions=null)
 Export certificate in PDF. More details...
 
ReportInfo [] EnumerateReportInfos (EnumerateReportsOptions options)
 Method returns list of statuses of documents checks filtered by options. options . More details...
 
void SetIndexState (DocumentId docId, IndexState indexState)
 Set the document indexing type: add to the similarity index, add to the approved index or delete document from index. When setting the Index State value.None document stops being a source of similarity (or approved for citation) in the checks. When you change the indexing type of a document, previously made reports remain unchanged. More details...
 
ExtractTextStatus GetTextExtractStatus (DocumentId docId)
 Get status of document text extraction. More details...
 
ExtractTextStatus [] GetTextExtractStatuses (DocumentId[] docIds)
 Get status of documents text extraction. More details...
 
BibliographyText GetBibliographyText (DocumentId docId)
 Extract marked up text of the bibliography. More details...
 
TimeSpan Ping ()
 Check the availability of the service. More details...
 

Detailed description

Contract for working with the system API Antiplagiat.

Methods

◆ AddFolder()

int Antiplagiat.ApiCorp.IApiCorp.AddFolder ( string  email,
string  name,
FolderOptions  options = null 
)

Add a folder. Please pay attention that the method can only be used in one stream.

Arguments
emailE-mail of the user. Empty string means storage.
nameName of the folder.
optionsOptions of addition.
Returns
ID of created folder.
Exceptions
UserNotFoundExceptionThe user with the specified e-mail email was not found.
InvalidArgumentException
  • Invalid value is set options.ParentId . The folder with specified ID doesn't exist.
  • Invalid value is set name . The name of the folder can't be an empty string or null.
ApiCorpExceptionInternal service error.

◆ CheckDocument()

void Antiplagiat.ApiCorp.IApiCorp.CheckDocument ( DocumentId  docId,
string []  checkServicesList,
CheckDocParams  checkDocParameters = null 
)

Start document check.

Arguments/dt>
docIdDocument ID
checkServicesListList of codes of checking services check by which is required. It can be null - in this case search occurs by all the available collections.
checkDocParametersSimilarity search settings.
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentException
  • Argument is not specified. docId .
  • In the list of codes of checking services checkServicesList there is an unknown service code.
PermissionExceptionThis check can't be started due to the restrictions of the current tariff.
ImmediateExceptionThe check of the specified document cannot be started at the moment
ApiCorpExceptionInternal service error.

◆ DeleteDocument()

void Antiplagiat.ApiCorp.IApiCorp.DeleteDocument ( DocumentId  docId)

Delete a previously uploaded document. If an external identifier was set for a document, then after deletion this external identifier is released (it can be used to identify another document). When you delete a document, the audit reports for this document are also deleted. When a document is deleted, it is automatically deleted from the index. When deleting a document, the reports made before deletion, in which the document appears as a source, remain unchanged.

Arguments
docIdDocument ID
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentExceptionThe argument isn't specifieddocId
ImmediateExceptionThe operation cannot be performed at the moment. For example, the current check has not been completed for this document
ApiCorpExceptionInternal service error.

◆ DeleteFolder()

void Antiplagiat.ApiCorp.IApiCorp.DeleteFolder ( string  email,
int  folderId 
)

Delete the folder.

Arguments
emailE-mail of the user. Empty string means storage.
folderIdFolder ID
Exceptions
UserNotFoundExceptionThe user with the specified e-mail email was not found.
InvalidArgumentExceptionInvalid value is set folderId. The folder with specified ID doesn't exist.
ApiCorpExceptionInternal service error.

◆ EnumerateDocuments()

DocumentId [] Antiplagiat.ApiCorp.IApiCorp.EnumerateDocuments ( DocumentId  afterDocId,
EnumerateDocumentsOptions  options = null 
)

Please pay attention also to the method EnumerateReportInfos(EnumerateReportsOptions), which allows you to immediately get information about the results of the check. List the document IDs. Identifiers are listed in bundles - in options you can specify the size of the bundle. To get the next bundle, you need to specify the ID of the last document in the received bundle.

Arguments
afterDocIdID of the last document from previous bundle. In case of null enumeration starts from the beginning of the list of uploaded documents
optionsEnumeration options
Returns
Documents IDs, added after the document afterDocId. The documents are listed in the order they were added to the service. An empty list means that there are no documents added after afterDocId.
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentException
  • Argument afterDocId is not specified.
  • An invalid set of values options.FromUser and options.InStorage is set. InStorage must be true, if options.FromUser is null.
  • An invalid set of values options.FolderId and options.InStorage is set. InStorage can't be null, if options.FolderId is not null.
  • An invalid set of values options.FolderId , options.InStorage andoptions.FromUser is set. options.InStorage can't be false, but options.FromUser is null, if options.FolderId is not null.
UserNotFoundExceptionThe user with e-mail options.FromUser is not found.
ApiCorpExceptionInternal service error.

◆ EnumerateReportInfos()

ReportInfo [] Antiplagiat.ApiCorp.IApiCorp.EnumerateReportInfos ( EnumerateReportsOptions  options)

Method returns list of statuses of documents filtered by options .

Arguments
optionsParameters of check results filtration
Returns
Array of report descriptions for the specified filtering options.

◆ ExportReportToPdf()

ExportReportInfo Antiplagiat.ApiCorp.IApiCorp.ExportReportToPdf ( DocumentId  docId,
ExportReportOptions  options = null 
)

Export report in PDF.

Arguments
docIdDocument ID
optionsOptions of report export.
Information about report export.
Exceptions
DocumentIdExceptionInvalid document ID.
InvalidArgumentException
  • Argument is not set. docId .
  • In options invalid number of report is specified.
PermissionExceptionReserved for future tariffs.
ApiCorpExceptionInternal service error.

◆ GetBibliographyText()

BibliographyText Antiplagiat.ApiCorp.IApiCorp.GetBibliographyText ( DocumentId  docId)

Extract marked up text of the bibliography.

Arguments
docIdDocument ID.
Exceptions
DocumentIdExceptionInvalid document ID.
InvalidArgumentExceptionThe argument docId is not set.
ApiCorpExceptionInternal service error.
ImmediateExceptionMethod can't be called at the moment (text extraction is not completed or method is called too often for the same document).
PermissionExceptionThe company doesn't have access to the specified method.

◆ GetCheckServices()

CheckServiceInfo [] Antiplagiat.ApiCorp.IApiCorp.GetCheckServices ( )

Get the list of checking services.

Returns
List of checking services by which checks can be performed.
Exceptions
ApiCorpExceptionInternal service error.

◆ GetCheckStatus()

CheckStatus Antiplagiat.ApiCorp.IApiCorp.GetCheckStatus ( DocumentId  docId)

Get status of the last document check.

Arguments
docIdDocument ID
Returns
Current check status of the specified document.
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentException
  • The argument docId is not specified.
ApiCorpExceptionInternal service error.

◆ GetCheckStatuses()

CheckStatus [] Antiplagiat.ApiCorp.IApiCorp.GetCheckStatuses ( DocumentId []  docIds)

Get last check report status for documents from the specified list

Arguments
docIdsList of documents for receiving the last check status
Returns
List of statuses of the last check for the specified list of documents
Exceptions
DocumentIdExceptionThe list docIds contains invalid document ID
InvalidArgumentException
  • Argument docIds is not specified.
  • The list docIds doesn't contain any elements.
ApiCorpExceptionInternal service error.

◆ GetCompanyStats()

CompanyStats Antiplagiat.ApiCorp.IApiCorp.GetCompanyStats ( )

Get statistics on the uploaded documents.

Returns
Statistics on uploaded documents.
Exceptions
ApiCorpExceptionInternal service error.

◆ GetDocumentInfo()

DocInfo Antiplagiat.ApiCorp.IApiCorp.GetDocumentInfo ( DocumentId  docId,
InfoOptions  options = null 
)

Get information about the document. Parameter options specifies what information interests.

Arguments
docIdDocument ID
optionsContent of required information about the document
Returns
Information about the document
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentException
  • The argument docId is not specified.
ApiCorpExceptionInternal service error.

◆ GetDocumentsInfo()

DocInfo [] Antiplagiat.ApiCorp.IApiCorp.GetDocumentsInfo ( DocumentId []  docIds,
InfoOptions  options = null 
)

Get information about the list of documents. Parameter options specifies what information interests.

Arguments
docIdsList of document IDs
optionsContent of required information about the document
Returns
Information about documents
Exceptions
DocumentIdExceptionList docIds contains invalid document ID.
InvalidArgumentException
  • Argument docIds is not specified.
  • The list docIds doesn't contain any elements.
ApiCorpExceptionInternal service error.

◆ GetDocumentText()

string Antiplagiat.ApiCorp.IApiCorp.GetDocumentText ( DocumentId  docId)

Get text of the document.

Arguments
docIdDocument ID
Returns
Text of the document
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentException
  • Argument docId is not specified.
ApiCorpExceptionInternal service error.

◆ GetFolders()

FolderTree Antiplagiat.ApiCorp.IApiCorp.GetFolders ( string  email)

Get folder tree.

Arguments
emailE-mail of user. Empty string means storage.
Returns
User's/storage folder tree.
Exceptions
UserNotFoundExceptionUser with specified e-mail email is not found.
ApiCorpExceptionInternal service error.

◆ GetReportHistory()

ReportSummary [] Antiplagiat.ApiCorp.IApiCorp.GetReportHistory ( DocumentId  docId)

Get document report history.

Arguments
docIdDocument ID.
Returns
Report history. List of annotations of completed reports
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentException
  • Argument docId is not specified.
ApiCorpExceptionInternal service error.

◆ GetReportView()

ReportView Antiplagiat.ApiCorp.IApiCorp.GetReportView ( DocumentId  docId,
ReportViewOptions  options = null 
)

Get check report

Arguments
docIdDocument ID.
optionsReport options
Returns
Check report presentation
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentException
  • Argument docId is not specified.
  • In options invalid report number is specified.
PermissionExceptionReserved for future tariffs.
ApiCorpExceptionInternal service error.

◆ GetSourceView()

ReportDetails Antiplagiat.ApiCorp.IApiCorp.GetSourceView ( DocumentId  docId,
int  reportNum,
long  srcHash,
SourceViewOptions  options = null 
)

Get information about the source in the report.

Arguments
docIdDocument ID.
reportNumReport number
srcHashSource ID in the report
optionsOptions of report on source
Returns
The position of the citation blocks inside the source text
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentException
  • Argument docId is not specified.
  • Invalid value reportNum is set.
  • Invalid value srcHash is set. Source ID in the report should be taken from SourceInfo.SrcHash
PermissionExceptionReserved for future tariffs.
ApiCorpExceptionInternal service error.

◆ GetTariffInfo()

TariffInfo Antiplagiat.ApiCorp.IApiCorp.GetTariffInfo ( )

Returnes information about the current tariff.

Returnes
Information about the current tariff.
Exceptions
ApiCorpExceptionInternal service error.

◆ GetTextExtractStatus()

ExtractTextStatus Antiplagiat.ApiCorp.IApiCorp.GetTextExtractStatus ( DocumentId  docId)

Get status of document text extraction.

Arguments
docIdDocument ID.
Exception
DocumentIdExceptionInvalid document ID.
InvalidArgumentExceptionArgument docId is not specified.
ApiCorpExceptionInternal service error.

◆ GetTextExtractStatuses()

ExtractTextStatus [] Antiplagiat.ApiCorp.IApiCorp.GetTextExtractStatuses ( DocumentId []  docIds)

Get status of documents text extraction.

Arguments/dt>
docIdsList of documents to get the status of text extraction.
Returns
List of statuses of text extraction.
Exceptions
DocumentIdExceptionList docIds contains invalid document ID.
InvalidArgumentException
  • Argument docIds is not specified.
  • List docIds doesn't contain any elements.
ApiCorpExceptionInternal service error.

◆ GetVerificationReport()

byte [] Antiplagiat.ApiCorp.IApiCorp.GetVerificationReport ( DocumentId  docId,
VerificationReportOptions  options = null,
FormattingOptions  formattingOptions = null 
)

Export certificate in PDF.

Arguments
docIdDocument ID.
optionsCertificate export options.
formattingOptionsCustom options for exported document.
Returns
Certificate in PDF.
Exceptions
DocumentIdExceptionInvalid document ID.
InvalidArgumentException
  • Argument docId is not specified.
PermissionExceptionReserved for future tariffs.
ApiCorpExceptionInternal service error.

◆ MoveDocuments()

void Antiplagiat.ApiCorp.IApiCorp.MoveDocuments ( string  email,
int  folderId,
DocumentId []  docIds 
)

Move documents to another folder.

Arguments
emailUser's e-mail. Empty string means storage.
folderIdID of the folder in which the documents should be moved.
docIdsIDs of documents which should be moved.
Exceptions
UserNotFoundExceptionThe user with e-mail email is not found.
DocumentIdExceptionInvalid document ID.
InvalidArgumentException
  • Argument docIds is not specified.
  • List docIds doesn't contain eny elements.
  • List docIds contains IDs of non-existent documents.
  • List docIds contains documents IDs which don't belong to the user.
ApiCorpExceptionInternal service error.

◆ MoveFolder()

void Antiplagiat.ApiCorp.IApiCorp.MoveFolder ( string  email,
int  folderId,
int  parentId 
)

Move folder.

Arguments
emailE-mail of the user. Empty string means storage.
folderIdID of the folder being modified.
parentIdID of the parent folder (inside of which is going to be the modified folder).
Exceptions
UserNotFoundExceptionUser with the specified e-mail email is not found.
InvalidArgumentException
  • Invalid value is specified folderId . Folder with the specified ID doesn't exist.
  • Invalid value is specified parentId . Folder with the specified ID doesn't exist.
  • Invalid value is specified parentId . Folder with the specified ID is a subfolder for the folder being modified.
ApiCorpExceptionInternal service error.

◆ Ping()

TimeSpan Antiplagiat.ApiCorp.IApiCorp.Ping ( )

Check the availability of the service.

Returns
The response time of the service. Meaningful meaning is only when using a native client.
Exceptions
ApiCorpExceptionInternal service error.

◆ RenameFolder()

void Antiplagiat.ApiCorp.IApiCorp.RenameFolder ( string  email,
int  folderId,
string  name 
)

Rename the folder.

Arguments
emailE-mail of the user. Empty string means storage.
folderIdID of the folder.
nameNew name of the folder.
Exceptions
UserNotFoundExceptionUser with the e-mail email is not found.
InvalidArgumentException
  • Invalid value is specified folderId . Folder with the specified ID doesn't exist.
  • Invalid value is specified name . Name of the folder can't be an empty string or null.
ApiCorpExceptionInternal service error.

◆ SetExternalId()

DocumentId Antiplagiat.ApiCorp.IApiCorp.SetExternalId ( DocumentId  docId,
String  externalId 
)

Set a unique external ID for the document. As a result of the function, only the external ID changes, the internal ID does not change.

Arguments
docIdDocument ID
externalIdExternal ID of the document which should be specified. If the value is null or "", external ID will be deleted.
Returns
Updated document ID
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentException
  • Argument docId is not specified.
  • There is already a document with the specified external ID among the uploaded documents
ApiCorpExceptionInternal service error.

◆ SetIndexedStatus()

void Antiplagiat.ApiCorp.IApiCorp.SetIndexedStatus ( DocumentId  docId,
bool  addToIndex 
)

Please pay attention to the more general method SetIndexState(DocumentId, IndexState). Add a document to the similarity index or remove a document from the index. After removal from the index, the document stops being a source of similarity (or approved citation) in the checks. When deleting a document from the index, reports made before deletion will remain unchanged.

Arguments
docIdDocument ID.
addToIndexActions with the document: true - add the document to similarity index; false - remove document from index.
Exceptions
DocumentIdExceptionInvalid document ID.
InvalidArgumentExceptionThe argument docId is not specified.
PermissionExceptionAdding a document to the index is not provided by the tariff.
ApiCorpExceptionInternal service error.

◆ SetIndexState()

void Antiplagiat.ApiCorp.IApiCorp.SetIndexState ( DocumentId  docId,
IndexState  indexState 
)

Set the type of document indexing: add to the similarity index, add to the index of approved documents, or remove a document from the index. When setting the IndexState.None document ceases to be as a source of similarity (approved for citation) in the checks. When you change the indexing type of a document, previously made reports remain unchanged.

Arguments
docIdDocument ID.
indexStateType of indexing.
Exceptions
DocumentIdExceptionInvalid document ID.
InvalidArgumentExceptionArgument docId is not specified.
PermissionExceptionAdding a document to the index is not provided by the tariff.
ApiCorpExceptionInternal service error.

◆ UpdateDocumentAttributes()

DocAttributes Antiplagiat.ApiCorp.IApiCorp.UpdateDocumentAttributes ( DocumentId  docId,
DocAttributes  attributes 
)

Update document attributes. Only the specified attributes are changed. To remove a custom attribute, you must specify null, an empty string, or a string of spaces in its value.

Arguments
docIdDocument ID
attributesFull attributes of the document after updating
Returns
Updated document attributes
Exceptions
DocumentIdExceptionInvalid document ID
InvalidArgumentException
  • Argument docId is not specified.
  • Argument attributes is not specified.
  • The value of one of the document attributes exceeds the allowed length. See DocAttributes.
  • Name of one of document attributes exceeds the allowed length. See DocAttributes.
Exceptions
ApiCorpExceptionInternal service error.

◆ UploadDocument()

UploadResult Antiplagiat.ApiCorp.IApiCorp.UploadDocument ( DocData  data,
DocAttributes  attributes = null,
UploadOptions  options = null 
)

Upload of the document. Both a separate document and an archive of documents can be downloaded. For a list of supported types, see Doc Data.FileType. When downloading an archive, documents of unsupported types inside the archive are ignored.

Arguments
dataDescription of the uploaded file
attributesAttributes of the uploaded document. Filling in this field affects the display of the document in the search results (if it is added to the index), and filling in various fields in reports, references, etc. If an archive with several documents is loaded, these attributes are attributed to each of the documents in the archive. The file name will be formed as "archive name"\"archive file name".
optionsOptional options
Returns
Upload results. Includes a list of document IDs. When uploading an archive, if the text could not be extracted from any of the files contained in the archive, the result will contain an empty list of downloaded documents. Unfortunately, in version 3.3, for problematic files inside the archive, it is not possible to issue diagnostics for what reason the text was not extracted from the file.
Exceptions
InvalidArgumentException
  • Argument data is not specified.
  • The data argument does not have one of the required fields set: DocData.FileType, DocData.Data, DocData.ExternalUserID.
  • Argument data for the field DocData.FileType contains invalid or wrong value.
  • Argument data for the field DocData.Encoding contains invalid value.
  • Argument data for the field DocData.Languages contains invalid value.
  • Argument data for the field DocData.ExternalUserID contains invalid value.
  • The value of one of the document attributes exceeds the allowed length. See DocAttributes.
  • The name of one of the document attributes exceeds the allowed length. See DocAttributes.
  • The number of allowed document attributes exceeds the allowed one. See DocAttributes.
UserNotFoundExceptionArgument options for the field UploadOptions.FromUser contains invalid or wrong value.
PermissionExceptionUser was blocked because of the suspicious activity.
OperationDenialExceptionThe user violated the provisions of the "Principles of Fair Use". The operation of adding a document is not available.
ApiCorpExceptionInternal service error.