Uploading & Downloading Jobs
API Details for the
Text Annotation Platform
1: User Authentication
Common for both uploading and downloading activities
POST
Token generation using manager’s credentials
URL: https://pluto.innodata.com:8443/activiti-opera-auth-server/api/v1/user/token
Method: POST
Body: {"username":"user_name@company.com","password":"user_password","domain":null,"timezone":123,"clientIP":"0.0.0.0"} Response: {"employeeId":"","userId":"user_id","firstName":"first_name","lastName":"last_name","logonName":"user_name@company.com","token":"generated_token","roles":[{"roleId":"role_id","roleName":"role_name"},{"roleId":"role_id"}],"username":"Firstname Lastname","email":"user_name@company.com","projects":project_id,"projectName":project_name,"projectCode":project_code,"rights":user_rights}
Method: POST
Body: {"username":"user_name@company.com","password":"user_password","domain":null,"timezone":123,"clientIP":"0.0.0.0"} Response: {"employeeId":"","userId":"user_id","firstName":"first_name","lastName":"last_name","logonName":"user_name@company.com","token":"generated_token","roles":[{"roleId":"role_id","roleName":"role_name"},{"roleId":"role_id"}],"username":"Firstname Lastname","email":"user_name@company.com","projects":project_id,"projectName":project_name,"projectCode":project_code,"rights":user_rights}
2: Upload Jobs
POST
Register Batch
URL: https://pluto.innodata.com:8443/activiti-opera-auth-server/api/v1/manager/register/batch
Method: POST
Body:{"projectId":"project_id","fileName":"file_name","folderName":"folder_path","fileSize":file_size_byte} Authorization: Bearer JWT Token Response: batch_id
Method: POST
Body:{"projectId":"project_id","fileName":"file_name","folderName":"folder_path","fileSize":file_size_byte} Authorization: Bearer JWT Token Response: batch_id
POST
Register job in loop using batch_id
URL: https://pluto.innodata.com:8443/activiti-opera-auth-server/api/v1/manager/register/job
Method: POST
Body:{"projectId":project_id,"fileName":"file_name","folderName":"folder_name","batchId":batch_id,"jobName":"job_name","referenceFileNames":"","metadata":{"wf_content":"running text as content of the job","wf_taxonomy":"taxonomy_name.json","wf_file_id":""},"receivingDate":"value_date","priority":value_priority,"dueDate":"value_date","workflowMetadata":{"wf_qc_require":"false","wf_due_date":"value_date","wf_tat":1,"wf_file_id":""}} Authorization: Bearer JWT Token Response: process_id
Method: POST
Body:{"projectId":project_id,"fileName":"file_name","folderName":"folder_name","batchId":batch_id,"jobName":"job_name","referenceFileNames":"","metadata":{"wf_content":"running text as content of the job","wf_taxonomy":"taxonomy_name.json","wf_file_id":""},"receivingDate":"value_date","priority":value_priority,"dueDate":"value_date","workflowMetadata":{"wf_qc_require":"false","wf_due_date":"value_date","wf_tat":1,"wf_file_id":""}} Authorization: Bearer JWT Token Response: process_id
POST
Upload file for each job using process_id
URL: https://pluto.innodata.com:8443/activiti-opera-auth-server/api/v1/process-instances/{process_id}/raw-content?isRelatedContent=true
Method: POST
Body: Upload file using form-data Authorization: Bearer JWT Token Response: {"id":file_id,"name":file_name,"created":created_date,"createdBy":{"id":user_id,"firstName":first_name,"lastName":last_name,"email":email_id,"company":company_name},"relatedContent":true,"contentAvailable":true,"link":false,"mimeType":"text/plain","simpleType":"content","previewStatus":"queued","thumbnailStatus":"queued"}
Method: POST
Body: Upload file using form-data Authorization: Bearer JWT Token Response: {"id":file_id,"name":file_name,"created":created_date,"createdBy":{"id":user_id,"firstName":first_name,"lastName":last_name,"email":email_id,"company":company_name},"relatedContent":true,"contentAvailable":true,"link":false,"mimeType":"text/plain","simpleType":"content","previewStatus":"queued","thumbnailStatus":"queued"}
3: Download Completed Jobs
POST
Get Task Info to Retrieve Task
URL: https://pluto.innodata.com:8443/activiti-opera-auth-server/api/v1/tasks
Method: POST
Body: {"assignment":"candidate","size":100,"sort":"created-time","asc":"false","page":"0"} Authorization: Bearer JWT Token Response: [{"projectId":project_id,"taskId":"task_id","taskDefKey":"task_defination","taskName":"task_name","processDefId":"process_def_id","processDefName":"process_name","processDefKey":"process_name","processInstanceId":"process_id","jobName":"job_name","assignee":"assignee_id","dueDate":null,"createdDate":"creation_date","projectName":"project_name","taskType":"task_name","facilityName":"Web","variableList":[{"id":"wf_due_date","type":"date","value":"date_value"},{"id":"wf_process_status","type":"string","value":"value_process_status"},{"id":"wf_tat","type":"integer","value":value_integer},{"id":"wf_file_id","type":"string","value":"value_string"}],"outcomeList":[],"inputFileList":null,"outputFilelList":null,"processInstanceInputFileList":null,"processInstanceReferenceList":null,"assignedDate":"value_date","code":"project_code","userModel":null,"groupInfo":null,"oneTaskAtTime":false,"qaPercentage":0,"outFileNamingConvention":null,"involvedGroups":null,"draftFileList":[],"fileRequired":0,"memberOfCandidateGroup":false,"managerOfCandidateGroup":false}]
Method: POST
Body: {"assignment":"candidate","size":100,"sort":"created-time","asc":"false","page":"0"} Authorization: Bearer JWT Token Response: [{"projectId":project_id,"taskId":"task_id","taskDefKey":"task_defination","taskName":"task_name","processDefId":"process_def_id","processDefName":"process_name","processDefKey":"process_name","processInstanceId":"process_id","jobName":"job_name","assignee":"assignee_id","dueDate":null,"createdDate":"creation_date","projectName":"project_name","taskType":"task_name","facilityName":"Web","variableList":[{"id":"wf_due_date","type":"date","value":"date_value"},{"id":"wf_process_status","type":"string","value":"value_process_status"},{"id":"wf_tat","type":"integer","value":value_integer},{"id":"wf_file_id","type":"string","value":"value_string"}],"outcomeList":[],"inputFileList":null,"outputFilelList":null,"processInstanceInputFileList":null,"processInstanceReferenceList":null,"assignedDate":"value_date","code":"project_code","userModel":null,"groupInfo":null,"oneTaskAtTime":false,"qaPercentage":0,"outFileNamingConvention":null,"involvedGroups":null,"draftFileList":[],"fileRequired":0,"memberOfCandidateGroup":false,"managerOfCandidateGroup":false}]
PUT
Claim Task
URL: https://pluto.innodata.com:8443/activiti-opera-auth-server/api/v1/tasks/{task_id}/action/claim
Method – PUT
Authorization: Bearer JWT Token Response: {"projectId":project_id,"taskId":task_id,"taskDefKey": taskDefKey,"taskName":taskname,"processDefId": processDefId,"processDefName":process_name,"processDefKey": processDefKey,"processInstanceId":process_id,"jobName":job_name,"assignee":"1003","dueDate":null,"createdDate":"2020-03-20T10:38:47.923+0000","projectName":project_name,"applicationName":null,"applicationPath":null,"endDate":null,"inputFolder":null,"outputFolder":null,"taskType":task_type,"facilityName":"Web","variableList":[{"id":"wf_task_var_2","type":"string","value":"First task variable"},{"id":"wf_process_var_1","type":"string","value":"First process variable"},{"id":"wf_process_tat","type":"integer","value":1},{"id":"wf_status","type":"string","value":"Yet to start"},{"id":"wf_process_status","type":"string","value":"In Progress"},{"id":"initiator","type":"string","value":"1003"},{"id":"wf_process_due_date","type":"date","value":"2019-12-01T18:30:00.000+0000"},{"id":"wf_preprocessing","type":"string","value":"false"},{"id":"wf_file_id","type":"string","value":"49219|"},{"id":"wf_manual_annotation","type":"string","value":"true"},{"id":"wf_process_var_2","type":"string","value":"Second process variable"},{"id":"wf_tat","type":"integer","value":1},{"id":"wf_int_tagging","type":"string","value":"false"},{"id":"wf_due_date","type":"date","value":"2019-12-01T18:30:00.000+0000"},{"id":"wf_task_var_1","type":"string","value":"First task variable"},{"id":"wf_conversion","type":"string","value":"false"},{"id":"wf_due_date","type":"OPERA","value":"2019-12-02T00:00:00+05:30"},{"id":"wf_taxonomy","type":"OPERA","value":"bankruptcy_taxonomy.json"},{"id":"wf_conversion","type":"OPERA","value":"false"},{"id":"wf_IA_Selection","type":"OPERA","value":"0"},{"id":"wf_qc_require","type":"OPERA","value":"false"},{"id":"wf_int_tagging","type":"OPERA","value":"false"},{"id":"wf_manual_annotation","type":"OPERA","value":"true"},{"id":"wf_preprocessing","type":"OPERA","value":"false"},{"id":"wf_tat","type":"OPERA","value":1}],"outcomeList":[],"inputFileList":[{"name":"blob","id":49219,"mimeType":"application/octet-stream"}],"outputFilelList":[],"processInstanceInputFileList":[],"processInstanceReferenceList":[{"name":"filefortesting1.xhtml","id":49218,"mimeType":"application/xhtml+xml"},{"name":"blob","id":49219,"mimeType":"application/octet-stream"}],"assignedDate":"2020-03-20T10:39:38.752+0000","code":"Annox","userModel":{"userId":1003,"email":"manager@annox.com","firstName":"William","lastName":"Smith"},"groupInfo":null,"oneTaskAtTime":false,"qaPercentage":0,"outFileNamingConvention":null,"involvedGroups":[{"id":1006,"name":"download","externalId":null,"status":"active","groups":null}],"draftFileList":[],"fileRequired":0,"memberOfCandidateGroup":true,"managerOfCandidateGroup":true}
Method – PUT
Authorization: Bearer JWT Token Response: {"projectId":project_id,"taskId":task_id,"taskDefKey": taskDefKey,"taskName":taskname,"processDefId": processDefId,"processDefName":process_name,"processDefKey": processDefKey,"processInstanceId":process_id,"jobName":job_name,"assignee":"1003","dueDate":null,"createdDate":"2020-03-20T10:38:47.923+0000","projectName":project_name,"applicationName":null,"applicationPath":null,"endDate":null,"inputFolder":null,"outputFolder":null,"taskType":task_type,"facilityName":"Web","variableList":[{"id":"wf_task_var_2","type":"string","value":"First task variable"},{"id":"wf_process_var_1","type":"string","value":"First process variable"},{"id":"wf_process_tat","type":"integer","value":1},{"id":"wf_status","type":"string","value":"Yet to start"},{"id":"wf_process_status","type":"string","value":"In Progress"},{"id":"initiator","type":"string","value":"1003"},{"id":"wf_process_due_date","type":"date","value":"2019-12-01T18:30:00.000+0000"},{"id":"wf_preprocessing","type":"string","value":"false"},{"id":"wf_file_id","type":"string","value":"49219|"},{"id":"wf_manual_annotation","type":"string","value":"true"},{"id":"wf_process_var_2","type":"string","value":"Second process variable"},{"id":"wf_tat","type":"integer","value":1},{"id":"wf_int_tagging","type":"string","value":"false"},{"id":"wf_due_date","type":"date","value":"2019-12-01T18:30:00.000+0000"},{"id":"wf_task_var_1","type":"string","value":"First task variable"},{"id":"wf_conversion","type":"string","value":"false"},{"id":"wf_due_date","type":"OPERA","value":"2019-12-02T00:00:00+05:30"},{"id":"wf_taxonomy","type":"OPERA","value":"bankruptcy_taxonomy.json"},{"id":"wf_conversion","type":"OPERA","value":"false"},{"id":"wf_IA_Selection","type":"OPERA","value":"0"},{"id":"wf_qc_require","type":"OPERA","value":"false"},{"id":"wf_int_tagging","type":"OPERA","value":"false"},{"id":"wf_manual_annotation","type":"OPERA","value":"true"},{"id":"wf_preprocessing","type":"OPERA","value":"false"},{"id":"wf_tat","type":"OPERA","value":1}],"outcomeList":[],"inputFileList":[{"name":"blob","id":49219,"mimeType":"application/octet-stream"}],"outputFilelList":[],"processInstanceInputFileList":[],"processInstanceReferenceList":[{"name":"filefortesting1.xhtml","id":49218,"mimeType":"application/xhtml+xml"},{"name":"blob","id":49219,"mimeType":"application/octet-stream"}],"assignedDate":"2020-03-20T10:39:38.752+0000","code":"Annox","userModel":{"userId":1003,"email":"manager@annox.com","firstName":"William","lastName":"Smith"},"groupInfo":null,"oneTaskAtTime":false,"qaPercentage":0,"outFileNamingConvention":null,"involvedGroups":[{"id":1006,"name":"download","externalId":null,"status":"active","groups":null}],"draftFileList":[],"fileRequired":0,"memberOfCandidateGroup":true,"managerOfCandidateGroup":true}
POST
Start Task
URL: https://pluto.innodata.com:8443/activiti-opera-auth-server/api/v1/tasks/{task_id}/action/start
Method: POST
Authorization: Bearer JWT Token Body: {"comment": "start", "outcome": ""} Response: {"status":"In Progress","comment":null,"outcome":""}
Method: POST
Authorization: Bearer JWT Token Body: {"comment": "start", "outcome": ""} Response: {"status":"In Progress","comment":null,"outcome":""}
Get
Get File Information
URL: https://pluto.innodata.com:8443/activiti-opera-auth-server/api/v1/tasks/{task_id}/files?taskId={jobId}&processInstanceId={process_id}
Method: GET
Authorization: Bearer JWT Token Response: {"projectId":null,"taskId":null,"taskDefKey":null,"taskName":null,"processDefId":null,"processDefName":null,"processDefKey":null,"processInstanceId":null,"jobName":null,"assignee":null,"dueDate":null,"createdDate":null,"projectName":null,"applicationName":null,"applicationPath":null,"endDate":null,"inputFolder":null,"outputFolder":null,"taskType":null,"facilityName":null,"variableList":null,"outcomeList":null,"inputFileList":[{"name":"blob","id":file_id,"mimeType":"application/octet-stream"}],"outputFilelList":[],"processInstanceInputFileList":[],"processInstanceReferenceList":[{"name":"filename.html","id":ref_fileid,"mimeType":"application/xhtml+xml"},{"name":"blob","id":file_id,"mimeType":"application/octet-stream"}],"assignedDate":null,"code":null,"userModel":null,"groupInfo":null,"oneTaskAtTime":false,"qaPercentage":null,"outFileNamingConvention":null,"involvedGroups":null,"draftFileList":[],"fileRequired":null,"memberOfCandidateGroup":false,"managerOfCandidateGroup":false}
Method: GET
Authorization: Bearer JWT Token Response: {"projectId":null,"taskId":null,"taskDefKey":null,"taskName":null,"processDefId":null,"processDefName":null,"processDefKey":null,"processInstanceId":null,"jobName":null,"assignee":null,"dueDate":null,"createdDate":null,"projectName":null,"applicationName":null,"applicationPath":null,"endDate":null,"inputFolder":null,"outputFolder":null,"taskType":null,"facilityName":null,"variableList":null,"outcomeList":null,"inputFileList":[{"name":"blob","id":file_id,"mimeType":"application/octet-stream"}],"outputFilelList":[],"processInstanceInputFileList":[],"processInstanceReferenceList":[{"name":"filename.html","id":ref_fileid,"mimeType":"application/xhtml+xml"},{"name":"blob","id":file_id,"mimeType":"application/octet-stream"}],"assignedDate":null,"code":null,"userModel":null,"groupInfo":null,"oneTaskAtTime":false,"qaPercentage":null,"outFileNamingConvention":null,"involvedGroups":null,"draftFileList":[],"fileRequired":null,"memberOfCandidateGroup":false,"managerOfCandidateGroup":false}
Get
Get File Text
URL: https://pluto.innodata.com:8443/activiti-opera-auth-server/api/v1/content/{file_id}/raw
Method: GET
Authorization: Bearer JWT Token Response: file text
Method: GET
Authorization: Bearer JWT Token Response: file text
POST
Complete Task
URL: https://pluto.innodata.com:8443/activiti-opera-auth-server/api/v1/tasks/{task_id}/action/complete
Method: POST
Authorization: Bearer JWT Token Body: {"comment":"comment","outcome":""}:""} Response: {"status":"Complete","comment":null,"outcome":""}
Method: POST
Authorization: Bearer JWT Token Body: {"comment":"comment","outcome":""}:""} Response: {"status":"Complete","comment":null,"outcome":""}
Darian Schwartz- VP, Financial Data Solutions
Darian has extensive industry knowledge and experience in helping top financial leaders execute large scale, global NLP projects. Using an individual approach, Darian helps clients develop and implement custom data engineering strategies that are specifically tailored to their needs.