API Guide¶
Creates a new project based on configuration settings provided in the JSON body.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_name |
body |
string |
The name of the project to create.The name must be unique. |
project_type |
body |
String |
The type of project to create |
enable_text_mode_option |
body |
Boolean |
1.When Admin enable it ,Text check box is added in ‘Default toolbar checkbox values’. 2.’Show text position’ icon is displayed in task. |
prevent_annotation_overlap |
body |
Boolean |
1.When it is enabled, it is not allowing overlapping annotation. 2.When it is disabled, it is allowing overlapping annotation. |
allow_new_label_input |
body |
Boolean |
Toggles for allowing new label input in the task. |
annotator_full_list_mode |
body |
Boolean |
1.If it is enabled all tasks are available to Annotators and Reviewers. 2.If it is disabled.Annotators and Reviewers will get tasks successively. |
maximum_annotators_per_task |
body |
string |
Set the maximum no of Annotators per task as per requirement |
models |
body |
dict |
List of models used for Auto label in NER projects |
use_textract_ocr |
body |
Boolean |
Toggles for Textract |
disable_auto_key_pairs |
body |
Boolean |
Toggles for Automatic key-value pairing.If it is True,user has to relate key value manually. |
disable_reviewer_flow |
body |
Boolean |
1.When Admin disable it,Qc may request adjustment is displaying in list of Project attributes and document status is ‘Submitted for review’. 2.When admin enable it,Qc may request adjustment is not displaying in list of Project attributes and document status is ‘Submitted’. |
reviewer_may_request_adjustment |
body |
Boolean |
1.When Admin disable it,’Annotations are ok’ and ‘Reject annotations’are available for reviewer. 2.When Admin enable it ,additional ‘Request Adjustment’ option is available for reviewer. |
allow_table_mode |
body |
Boolean |
Toggles for Table icon in task. If it is True ,user can draw tables clicking Table icon in task. |
use_keypair_dictionary |
body |
Boolean |
Toggles for key pair detection in task after uploading of task |
dictionary_match_only_keys |
body |
Boolean |
Toggles for key detection in task after uploading of task |
ignore_generic_key_pairs |
body |
Boolean |
Toggles for ignoring generic key pairs |
labels |
body |
dict |
Admin has to set all Key-value pairs of labels, with color and alias setting for each label |
document_attributes |
body |
list |
List of document attributes |
page_attributes |
body |
list |
List of page attributes |
webhooks |
body |
dict |
Webhook URI for taskUpdate / projectUpdate |
checkboxes_set |
body |
dict |
preset list containing “labels”, “text”, “relationships” |
extract_tables_using_textract |
body |
Boolean |
Toggles for Extraction of tables |
extract_key_pairs_using_textract |
body |
Boolean |
Toggles for Extraction of key-pairs |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
body={
"project_name": "OCR-API",
"project_type": "NER"|"Comprehend NER"|"OCR"|"Classification"||"Media Transcription"|
"Bulk Image Classification"|"Pose Estimation"|
"enable_text_mode_option": False,
"prevent_annotation_overlap": False,
"allow_new_label_input": False,
"annotator_full_list_mode": True,
"maximum_annotators_per_task": "1",
"models": {
"Comprehend-Detect-Entities": False,
"Huggingface-BERT-NER": False,
"Medical-Comprehend-DetectEntitiesV2": False
},
"use_textract_ocr": True,
"disable_auto_key_pairs": False,
"disable_reviewer_flow": False,
"reviewer_may_request_adjustment": False,
"allow_table_mode":True,
"use_keypair_dictionary": False,
"dictionary_match_only_keys": False,
"ignore_generic_key_pairs": False,
"labels": {
"Name": {
"color": "#04be3c",
"keyset": True,
"alias": "Name",
"dictionary": "",
"name": "Name"
},
"Date": {
"color": "#ef8534",
"keyset": True,
"alias": "Date",
"dictionary": "",
"name": "Date"
},
"Address": {
"color": "#0091ff",
"keyset": True,
"alias": "",
"dictionary": "",
"name": "Address"
},
"Test Label Stand Alone": {
"color": "#e350f7",
"keyset": False,
"alias": "",
"dictionary": "",
"name": "Test Label Stand Alone"
}
},
"document_attributes": [
{
"optional": False,
"allowNew": True,
"options": [
"ok",
"not ok"
],
"label": "Is Document Ok?"
}
],
"page_attributes": [
{
"optional": False,
"allowNew": True,
"options": [
"ok",
"not ok"
],
"label": "Is Page Ok?"
}
],
"aws_credentials_enabled": False,
"webhooks": {
"taskUpdate": "www.taskwebhook.com",
"projectUpdate": "www.projectwebhook.com"
},
"checkboxes_set": [
"labels"
],
"extract_tables_using_textract": True,
"extract_key_pairs_using_textract": True
}
pprint(client.create_project(body))
After creation of Project,it returns the Response body as per below and it is having Attirbutes which are in Payload.
Sample Response Body
{
"project_id": "6db37024c3685668cf0022c8",
"project_name": "OCR-API-10",
"project_type": "OCR",
"company": "60f38299446de8dabe9207e5",
"enable_text_mode_option": false,
"prevent_annotation_overlap": false,
"allow_new_label_input": false,
"annotator_full_list_mode": true,
"maximum_annotators_per_task": 1,
"models": {
"Comprehend-Detect-Entities": false,
"Huggingface-BERT-NER": false,
"Medical-Comprehend-DetectEntitiesV2": false
},
"use_textract_ocr": true,
"disable_auto_key_pairs": false,
"disable_reviewer_flow": false,
"reviewer_may_request_adjustment": false,
"allow_table_mode": true,
"use_keypair_dictionary": false,
"dictionary_match_only_keys": false,
"ignore_generic_key_pairs": false,
"labels": {
"Name": {
"color": "#04be3c",
"keyset": true,
"alias": "Name",
"dictionary": "",
"name": "Name"
},
"Date": {
"color": "#ef8534",
"keyset": true,
"alias": "Date",
"dictionary": "",
"name": "Date"
},
"Address": {
"color": "#0091ff",
"keyset": true,
"alias": "",
"dictionary": "",
"name": "Address"
},
"Test Label Stand Alone": {
"color": "#e350f7",
"keyset": false,
"alias": "",
"dictionary": "",
"name": "Test Label Stand Alone"
}
},
"document_attributes": [
{
"optional": false,
"allowNew": true,
"options": [
"ok",
"not ok"
],
"label": "Is Document Ok?"
}
],
"page_attributes": [
{
"optional": false,
"allowNew": true,
"options": [
"ok",
"not ok"
],
"label": "Is Page Ok?"
}
],
"aws_credentials_enabled": false,
"webhooks": {
"taskUpdate": "www.taskwebhook.com",
"projectUpdate": "www.projectwebhook.com"
},
"checkboxes_set": [
"labels"
],
"extract_tables_using_textract": true,
"extract_key_pairs_using_textract": true
}
Fetches configuration details of an existing project in the workbench based on the provided project_id parameter.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
query |
string |
Internal project_id assigned to the Project within Newton Workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
body={
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
# Invoke get_project method
response = client.get_project(project_id="449354de1168469a8229f605")
}
pprint(response)
After fetching the Project,it returns the Response body as per in JSON format.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
body |
string |
Internal project_id assigned to the Project within Newton Workbench |
project_name |
body |
string |
It is Name of the project.The name must be unique. |
project_type |
body |
String |
Types of Projects availabel for creation of project |
company |
body |
string |
It is the code for Comapny |
company_name |
body |
string |
It is the name of the company for which Admin belongs to. |
enable_text_mode_option |
body |
Boolean |
1.When Admin enable it ,Text check box is added in ‘Default toolbar checkbox values’. 2.’Show text position’ icon is displayed in task. |
prevent_annotation_overlap |
body |
Boolean |
1.When it is enabled ,it is not allowing overlapping annotation. 2.When it is disbled ,it is allowing overlapping annotation. |
allow_new_label_input |
body |
Boolean |
Toggles for allowing new label input in the task. |
annotator_full_list_mode |
body |
Boolean |
1.If it is enabled all tasks are available to Annotators and Reviewers. 2.If it is disabled.Annotators and Reviewers will get tasks succesively. |
maximum_annotators_per_task |
body |
string |
Set the maximum no of Annotators per task as per requirement |
models |
body |
dictionary |
List of models used for Autolabel in NER projects |
use_textract_ocr |
body |
Boolean |
Toggles for Textract |
disable_auto_key_pairs |
body |
Boolean |
Toggles for Automatic key-value pairing.If it is True,user has to relate key value manually. |
disable_reviewer_flow |
body |
Boolean |
1.When Admin disable it,Qc may request adjustment is displaying in list of Project attributes and document status is ‘Submitted for review’. 2.When admin enable it,Qc may request adjustment is not displaying in list of Project attributes and document status is ‘Submitted’. |
reviewer_may_request_adjustment |
body |
Boolean |
1.When Admin disable it,’Annotations are ok’ and ‘Reject annotations’are available for reviewer. 2.When Admin enable it ,additional ‘Request Adjustmet’ option is available for reviewer. |
allow_table_mode |
body |
Boolean |
Toggles for Table icon in task.If it is True ,user can draw tables clicking Table icon in task. |
use_keypair_dictionary |
body |
Boolean |
Toggles for key pair detection in task after uploading of task |
dictionary_match_only_keys |
body |
Boolean |
Toggles for key detection in task after uploading of task |
ignore_generic_key_pairs |
body |
Boolean |
Toggles for ignoring generic key pairs |
labels |
body |
dict |
Admin has to set all Key-value pairs of labels, with color and alias setting for each label |
document_attributes |
body |
list |
List of document attributes |
page_attributes |
body |
list |
List of page attributes |
webhooks |
body |
dict |
Webhook URI for taskUpdate / projectUpdate |
checkboxes_set |
body |
dict |
preset list containing “labels”, “text”, “relationships” |
extract_tables_using_textract |
body |
Boolean |
Toggels for Extraction of tabels |
extract_key_pairs_using_textract |
body |
Boolean |
Toggels for Extraction of key-pairs |
Sample Response Body
{
"project_id": "22c5d79c0f007faacdd687c0",
"project_name": "OCR-API",
"project_type": "OCR",
"company": "60f38299446de8dabe9207e5",
"company_name": "Objectways",
"enable_text_mode_option": false,
"prevent_annotation_overlap": false,
"allow_new_label_input": false,
"annotator_full_list_mode": true,
"maximum_annotators_per_task": 1,
"models": {
"Comprehend-Detect-Entities": false,
"Huggingface-BERT-NER": false,
"Medical-Comprehend-DetectEntitiesV2": false
},
"use_textract_ocr": true,
"disable_auto_key_pairs": false,
"disable_reviewer_flow": false,
"reviewer_may_request_adjustment": false,
"allow_table_mode": true,
"use_keypair_dictionary": false,
"dictionary_match_only_keys": false,
"ignore_generic_key_pairs": false,
"labels": {
"Name": {
"color": "#04be3c",
"keyset": true,
"alias": "Name",
"dictionary": "",
"name": "Name"
},
"Date": {
"color": "#ef8534",
"keyset": true,
"alias": "Date",
"dictionary": "",
"name": "Date"
},
"Address": {
"color": "#0091ff",
"keyset": true,
"alias": "",
"dictionary": "",
"name": "Address"
},
"Test Label Stand Alone": {
"color": "#e350f7",
"keyset": false,
"alias": "",
"dictionary": "",
"name": "Test Label Stand Alone"
}
},
"document_attributes": [
{
"optional": false,
"allowNew": true,
"options": [
"ok",
"not ok"
],
"label": "Is Document Ok?"
}
],
"page_attributes": [
{
"optional": false,
"allowNew": true,
"options": [
"ok",
"not ok"
],
"label": "Is Page Ok?"
}
],
"aws_credentials_enabled": false,
"webhooks": {
"taskUpdate": "www.taskwebhook.com",
"projectUpdate": "www.projectwebhook.com"
},
"checkboxes_set": [
"labels"
],
"extract_tables_using_textract": true,
"extract_key_pairs_using_textract": true
}
Updates configuration of an existing project in the workbench based on the provided project_id and body JSON parameter.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
querry |
string |
Internal project_id assigned to the Project within Newton Workbench |
project_name |
body |
string |
It is Name of the project.The name must be unique. |
project_type |
body |
String |
Types of Projects availabel for creation of project |
enable_text_mode_option |
body |
Boolean |
1.When Admin enable it ,Text check box is added in ‘Default toolbar checkbox values’. 2.’Show text position’ icon is displayed in task. |
prevent_annotation_overlap |
body |
Boolean |
1.When it is enabled, it is not allowing overlapping annotation. 2.When it is disbled, it is allowing overlapping annotation. |
allow_new_label_input |
body |
Boolean |
Toggles for allowing new label input in the task. |
annotator_full_list_mode |
body |
Boolean |
1.If it is enabled all tasks are available to Annotators and Reviewers. 2.If it is disabled.Annotators and Reviewers will get tasks succesively. |
maximum_annotators_per_task |
body |
string |
Set the maximum no of Annotators per task as per requirement |
models |
body |
dict |
List of models used for Autolabel in NER projects |
use_textract_ocr |
body |
Boolean |
Toggles for Textract |
disable_auto_key_pairs |
body |
Boolean |
Toggles for Automatic key-value pairing.If it is True,user has to relate key value manually. |
disable_reviewer_flow |
body |
Boolean |
1.When Admin disable it,Qc may request adjustment is displaying in list of Project attributes and document status is ‘Submitted for review’. 2.When admin enable it,Qc may request adjustment is not displaying in list of Project attributes and document status is ‘Submitted’. |
reviewer_may_request_adjustment |
body |
Boolean |
1.When Admin disable it,’Annotations are ok’ and ‘Reject annotations’are available for reviewer. 2.When Admin enable it ,additional ‘Request Adjustmet’ option is available for reviewer. |
allow_table_mode |
body |
Boolean |
Toggles for Table icon in task. If it is True ,user can draw tables clicking Table icon in task. |
use_keypair_dictionary |
body |
Boolean |
Toggles for key pair detection in task after uploading of task |
dictionary_match_only_keys |
body |
Boolean |
Toggles for key detection in task after uploading of task |
ignore_generic_key_pairs |
body |
Boolean |
Toggles for ignoring generic key pairs |
labels |
body |
dict |
Admin has to set all Key-value pairs of labels, with color and alias setting for each label |
document_attributes |
body |
dict |
List of document attributes |
page_attributes |
body |
dictionary |
List of page attributes |
webhooks |
body |
dict |
Webhook URI for taskUpdate / projectUpdate |
checkboxes_set |
body |
dict |
preset list containing “labels”, “text”, “relationships” |
extract_tables_using_textract |
body |
Boolean |
Toggels for Extraction of tabels |
extract_key_pairs_using_textract |
body |
Boolean |
Toggels for Extraction of key-pairs |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
# Set the JSON config in body
body =
{
"project_name": "OCR-API",
"project_type": "OCR",
"enable_text_mode_option": true,
"prevent_annotation_overlap": true,
"allow_new_label_input": true,
"annotator_full_list_mode": true,
"maximum_annotators_per_task": "1",
"models": {
"Comprehend-Detect-Entities": true,
"Huggingface-BERT-NER": true,
"Medical-Comprehend-DetectEntitiesV2": true
},
"use_textract_ocr": true,
"disable_auto_key_pairs": true,
"disable_reviewer_flow": false,
"reviewer_may_request_adjustment": true,
"allow_table_mode":true,
"use_keypair_dictionary": false,
"dictionary_match_only_keys": false,
"ignore_generic_key_pairs": false,
"labels": {
"Name": {
"color": "#04be3c",
"keyset": true,
"alias": "Name",
"dictionary": "",
"name": "Name"
},
"Date": {
"color": "#ef8534",
"keyset": true,
"alias": "Date",
"dictionary": "",
"name": "Date"
},
"Address": {
"color": "#0091ff",
"keyset": true,
"alias": "",
"dictionary": "",
"name": "Address"
},
"Test Label Stand Alone": {
"color": "#e350f7",
"keyset": false,
"alias": "",
"dictionary": "",
"name": "Test Label Stand Alone"
}
},
"document_attributes": [
{
"optional": false,
"allowNew": true,
"options": [
"ok",
"not ok"
],
"label": "Is Document Ok?"
}
],
"page_attributes": [
{
"optional": true,
"allowNew": true,
"options": [
"ok",
"not ok"
],
"label": "Is Page Ok?"
}
],
"aws_credentials_enabled": false,
"webhooks": {
"taskUpdate": "www.taskwebhook.com",
"projectUpdate": "www.projectwebhook.com"
},
"checkboxes_set": [
"labels"
],
"extract_tables_using_textract": true,
"extract_key_pairs_using_textract": true
}
# Invoke update_project method
response = client.update_project(project_id="22c5d79c0f007faacdd687c0",body=body)
pprint(response)
After updating the Project,it returns the Response body as per in JSON format.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
body |
string |
Internal project_id assigned to the Project within Newton Workbench |
project_name |
body |
string |
It is Name of the project.The name must be unique. |
project_type |
body |
string |
Types of Projects availabel for creation of project |
company |
body |
string |
It is the code for Comapny |
company_name |
body |
string |
It is the name of the company for which Admin belongs to. |
enable_text_mode_option |
body |
Boolean |
1.When Admin enable it ,Text check box is added in ‘Default toolbar checkbox values’. 2.’Show text position’ icon is displayed in task. |
prevent_annotation_overlap |
body |
Boolean |
1.When it is enabled ,it is not allowing overlapping annotation. 2.When it is disbled ,it is allowing overlapping annotation. |
allow_new_label_input |
body |
Boolean |
Toggles for allowing new label input in the task. |
annotator_full_list_mode |
body |
Boolean |
1.If it is enabled all tasks are available to Annotators and Reviewers. 2.If it is disabled.Annotators and Reviewers will get tasks succesively. |
maximum_annotators_per_task |
body |
string |
Set the maximum no of Annotators per task as per requirement |
models |
body |
dict |
List of models used for Autolabel in NER projects |
use_textract_ocr |
body |
Boolean |
Toggles for Textract |
disable_auto_key_pairs |
body |
Boolean |
Toggles for Automatic key-value pairing.If it is True,user has to relate key value manually. |
disable_reviewer_flow |
body |
Boolean |
1.When Admin disable it,Qc may request adjustment is displaying in list of Project attributes and document status is ‘Submitted for review’. 2.When admin enable it,Qc may request adjustment is not displaying in list of Project attributes and document status is ‘Submitted’. |
reviewer_may_request_adjustment |
body |
Boolean |
1.When Admin disable it,’Annotations are ok’ and ‘Reject annotations’are available for reviewer. 2.When Admin enable it ,additional ‘Request Adjustmet’ option is available for reviewer. |
allow_table_mode |
body |
Boolean |
Toggles for Table icon in task.If it is True ,user can draw tables clicking Table icon in task. |
use_keypair_dictionary |
body |
Boolean |
Toggles for key pair detection in task after uploading of task |
dictionary_match_only_keys |
body |
Boolean |
Toggles for key detection in task after uploading of task |
ignore_generic_key_pairs |
body |
Boolean |
Toggles for ignoring generic key pairs |
labels |
body |
dict |
Admin has to set all Key-value pairs of labels, with color and alias setting for each label |
document_attributes |
body |
dict |
List of document attributes |
page_attributes |
body |
dict |
List of page attributes |
webhooks |
body |
dict |
Webhook URI for taskUpdate / projectUpdate |
checkboxes_set |
body |
dict |
preset list containing “labels”, “text”, “relationships” |
extract_tables_using_textract |
body |
Boolean |
Toggels for Extraction of tabels |
extract_key_pairs_using_textract |
body |
Boolean |
Toggels for Extraction of key-pairs |
Sample Response Body
{
"project_id": "22c5d79c0f007faacdd687c0",
"project_name": "OCR-API",
"project_type": "OCR",
"company": "60f38299446de8dabe9207e5",
"enable_text_mode_option": true,
"prevent_annotation_overlap": true,
"allow_new_label_input": true,
"annotator_full_list_mode": true,
"maximum_annotators_per_task": 1,
"models": {
"Comprehend-Detect-Entities": true,
"Huggingface-BERT-NER": true,
"Medical-Comprehend-DetectEntitiesV2": true
},
"use_textract_ocr": true,
"disable_auto_key_pairs": true,
"disable_reviewer_flow": false,
"reviewer_may_request_adjustment": true,
"allow_table_mode": true,
"use_keypair_dictionary": false,
"dictionary_match_only_keys": false,
"ignore_generic_key_pairs": false,
"labels": {
"Name": {
"color": "#04be3c",
"keyset": true,
"alias": "Name",
"dictionary": "",
"name": "Name"
},
"Date": {
"color": "#ef8534",
"keyset": true,
"alias": "Date",
"dictionary": "",
"name": "Date"
},
"Address": {
"color": "#0091ff",
"keyset": true,
"alias": "",
"dictionary": "",
"name": "Address"
},
"Test Label Stand Alone": {
"color": "#e350f7",
"keyset": false,
"alias": "",
"dictionary": "",
"name": "Test Label Stand Alone"
}
},
"document_attributes": [
{
"optional": false,
"allowNew": true,
"options": [
"ok",
"not ok"
],
"label": "Is Document Ok?"
}
],
"page_attributes": [
{
"optional": true,
"allowNew": true,
"options": [
"ok",
"not ok"
],
"label": "Is Page Ok?"
}
],
"aws_credentials_enabled": false,
"webhooks": {
"taskUpdate": "www.taskwebhook.com",
"projectUpdate": "www.projectwebhook.com"
},
"checkboxes_set": [
"labels"
],
"extract_tables_using_textract": true,
"extract_key_pairs_using_textract": true
}
Fetches a list of projects that meet the criteria defined by the parameters (project_id or project_name or active status)
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
list |
querry |
list |
list of parameters |
project_id |
querry parram |
string |
Internal project_id assigned to the Project within Newton Workbench |
project_name |
querry parram |
string |
Project Name defined for this project in Newton workbench. |
active |
querry parram |
Boolean |
Project state is active or not. |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
# Invoke get_projects method
response = client.get_projects(project_id=None,project_name="OCR-API",active=True)
pprint(response)
After fetching the Project,it returns the Response body as per in JSON format.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
body |
string |
Internal project_id assigned to the Project within Newton Workbench |
project_name |
body |
string |
It is Name of the project.The name must be unique. |
project_type |
body |
string |
Types of Projects availabel for creation of project |
company |
body |
string |
It is the code for Comapny |
company_name |
body |
string |
It is the name of the company for which Admin belongs to. |
Sample Response Body
[
{
"project_id": "22c5d79c0f007faacdd687c0",
"project_name": "OCR-API",
"project_type": "OCR",
"company": "60f38299446de8dabe9207e5",
"company_name": "Objectways"
}
]
Deletes an existing project in the workbench based on the provided project_id parameter.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
querry |
string |
Internal project_id assigned to the Project within Newton Workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
# Invoke delete_project method
response = client.delete_project(project_id="8bc05ec26ab161e218a0e842",)
pprint(response)
Status of the delete operation is returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
Status |
body |
Integer |
Action is done |
message |
body |
string |
Gets the confirmation message for Project Deletion |
Sample Response Body
{
"status": 1,
"message": "project deleted"
}
Add a list of task items to a given project
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
body |
string |
project to which the task needs to be added |
notes |
body |
string |
Note adde by user |
dataset_items |
body |
list |
List of dataset items |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
body= {
"project_id": "a28aedc450e845523d4bfa10",
"note": "test note",
"dataset_items": [
"15542b60229da3f94f82d1a2",
"09f5dd6f24b057615f9c583c",
"e8cbb47f599c99b28a5d3466"
]
}
pprint(client.add_bulk_tasks(body))
Task details returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
value |
body |
string |
Count of tasks added in project |
status |
body |
integer |
Action is done |
Sample Response Body
{
"value": "3 item(s) added to project",
"status": 1
}
Add a single task item to a given project
Request¶ FIELD
In
TYPE
DESCRIPTION
project_id
body
string
project to which the task needs to be added
item_id
body
string
Id of item in Dataset
Sample Request Body
from pprint import pprint from objectways import newton # Initialize Newton client client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY") body= { "project_id": "179cd15e334f9a63e2a9632a", "item_id": "5835e22985bb0ca47a9fa96e" } pprint(client.add_task(body))
Status of operation is returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
value |
body |
string |
Count of tasks added in projetc |
status |
body |
Integer |
Action is done |
Sample Response Body
{
"value": "1 item(s) added to project",
"status": 1
}
Add labels to a given task
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
task_id |
querry |
string |
Internal task_id assigned to the task in the Project within Newton Workbench |
annotations |
body |
list |
annotations to be added to the task item |
content |
body |
list |
content of task |
tags |
body |
list |
list of tags to be added to the task metadata |
page_offsets |
body |
list |
list of offsets |
attributes |
body |
list |
It gives information related to Document Attributes |
Page attributes |
body |
list |
It gives information related to Page Attributes |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
task_id = "4d572fef4ec4bc9d86bd7b2f"
body = {
"annotations": [
{
"content": {
"pdf_fingerprint": "4ea5f2833097c04cc8d46bfffc7e4965",
"meta_data": {
"File": "AVVISO DI GARA - TAG.PDF",
"TaskId": "3d57d3bd96d6f64bf6892828"
},
"tags": [
{
"page": 1,
"range": [
0,
17
],
"text": "REGIONE SICILIANA",
"id": 1,
"type": "aaaa",
"box": [
0.3741068447412354,
0.08150904704463213,
0.658875859766277,
0.09719059107358263
]
}
],
"pageOffsets": [
0,
1061
],
"attributes": {
"Doc Ok?": "Yes"
},
"pageAttributes": [
{
"Page OK?": "Yes"
}
]
}
}
]}
pprint(client.add_labels_to_task(task_id=task_id,body=body))
Status of the operation is returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
task_id |
body |
string |
Internal task_id assigned to the task in the Project within Newton Workbench |
Sample Response Body
{'task_id': '4d572fef4ec4bc9d86bd7b2f'}
Retrieve a task
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
task_id |
querry |
String |
Internal task_id assigned to the task in the Project within Newton Workbench |
trail |
querry |
Boolean |
Toggles to fetch Annotation trails as per requirement |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
data = client.get_task(task_id="449354de1168469a8229f605",trail= False)
pprint(data)
Status of the operation is returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
body |
String |
Internal project_id for the given project in Newton workbench |
project_name |
body |
string |
name of the project |
project_type |
body |
string |
type of project |
dataset_id |
body |
string |
Id of the Dataset from which this item is uploaded |
task_id |
body |
string |
Internal task_id assigned to the task in the Project within Newton Workbench |
item_id |
body |
string |
Id of item in Dataset |
file_name |
body |
string |
file_name metadata assigned to the task |
source |
body |
string |
internal source file reference on local storage disk |
meta_data |
body |
list |
meta-data of task |
annotations |
body |
list |
annotations to be added to the task item |
tags |
body |
list |
list of tags to be added to the task metadata |
page_offsets |
body |
list |
list of offsets |
links |
body |
list |
List if links added in tasks |
attributes |
body |
list |
It gives information related to Document Attributes |
Page attributes |
body |
list |
It gives information related to Page Attributes |
Plain Text |
body |
string |
It gives the text of task with page numbers |
annotator_id |
body |
string |
It is the id of annotator |
state |
body |
Integer |
Numerical representation of state of task |
state_description |
body |
String |
Status of task |
comprehend_blocks_source |
body |
string |
OCR blocks from Aamazon extract or pdf plumber depending on the OCR settings |
labels |
body |
Integer |
It gives the count of labels and relationships added in task |
Sample Response Body
{
"project_id": "46c165230e44e4ba3954b407",
"project_name": "OCRTest_UX",
"project_type": "OCR",
"dataset_id": "781555718520b47b0b96bb0f",
"task_id": "f43faa1a5168f5fa5204c16e",
"item_id": "4dc320a225eec89248d36222",
"file_name": "ABSTRACT - Axia (3).pdf",
"file_type": "application/pdf",
"source": "file:781555718520b47b0b96bb0f/4dc320a225eec89248d36222",
"meta_data": {
"pages": "1",
"use-textract-only": "true",
"source_ref": "/uploads/781555718520b47b0b96bb0f/4dc320a225eec89248d36222",
"document_id": "4dc320a225eec89248d36222"
},
"annotations": [
{
"email": "q1@qc.com",
"messages": [],
"role": "nlp_qc",
"elapsedTime": 6,
"date": "2023-03-09T11:23:18.347Z",
"content": {
"pdf_fingerprint": "d87db914dbc61f4aa5862aa8ad985a27",
"meta_data": {
"File": "ABSTRACT - Axia (3).pdf",
"TaskId": "f43faa1a5168f5fa5204c16e",
"pages": "1",
"use-textract-only": "true",
"source_ref": "/uploads/781555718520b47b0b96bb0f/4dc320a225eec89248d36222",
"document_id": "4dc320a225eec89248d36222"
},
"tags": [
{
"page": 1,
"text": "N A M E",
"id": 1,
"type": "Name:KEY",
"words": [
"N",
"A",
"M",
"E"
],
"boxes": [
[
0.06370855122804642,
0.1150721088051796,
0.07367695216089487,
0.12368563283234835
],
[
0.06318750977516174,
0.12923260033130646,
0.07374117616564035,
0.13768847472965717
],
[
0.06265914440155029,
0.14248283207416534,
0.07497677113860846,
0.15084837935864925
],
[
0.0638703778386116,
0.15575741231441498,
0.07314794510602951,
0.1642366135492921
]
],
"range": [
[
69,
70
],
[
124,
125
],
[
163,
164
],
[
191,
192
]
]
},
{
"page": 1,
"text": "Axia Women's Health",
"id": 2,
"type": "Name:VAL",
"words": [
"Axia",
"Women's",
"Health"
],
"boxes": [
[
0.09221025556325912,
0.11518685519695282,
0.11892414651811123,
0.12385093700140715
],
[
0.12125269323587418,
0.11461909860372543,
0.176913034170866,
0.12410781811922789
],
[
0.1796904355287552,
0.1151067465543747,
0.21836195141077042,
0.12390749622136354
]
],
"range": [
[
71,
75
],
[
76,
83
],
[
84,
90
]
]
},
{
"page": 1,
"text": "Regional Womens Health Managemnet",
"id": 3,
"type": "Name:VAL",
"rawBox": true,
"words": [
"Regional Womens Health Managemnet"
],
"boxes": [
[
0.5453895639742673,
0.10386740331491713,
0.7676912080057183,
0.1287292817679558
]
],
"range": []
},
{
"page": 1,
"text": "Bill TO",
"id": 4,
"type": "Name:KEY",
"rawBox": true,
"words": [
"Bill TO"
],
"boxes": [
[
0.49749821300929237,
0.10883977900552486,
0.536097212294496,
0.1712707182320442
]
],
"range": []
}
],
"pageOffsets": [
0,
3330,
5924
],
"links": [
{
"page": 1,
"id1": 1,
"id2": 2,
"relationship": "key-pair"
},
{
"page": 1,
"id1": 4,
"id2": 3,
"relationship": "key-pair"
}
],
"attributes": {
"Is Document Ok?": "ok"
},
"pageAttributes": [
{
"Is Page Ok?": "ok"
},
{
"Is Page Ok?": "ok"
}
],
"plainText": {
"1": "Lease Id: PR0001 000222 Lease Profile Master Occupant Id: 00000162-1 N Axia Women's Health B Regional Womens Health Managem A HP Main Line LLC I T 227 Laurel Road M L O Echelon One Suite 300 E Bryn Mawr PA 19010 L Voorhees NJ 08043 Legal Name: Regional Womens Health Management Tenant Id: Contact Name: Jenni Witters Tenant Type Id: Phone No: SIC Group: Fax No: NAICS Code Lease Stop: No Suite Information Current Recurring Charges Building Id: PR0001 Execution 3/15/2021 Effective Monthly Annual Amount Suite Id: 401 Beginning 6/15/2021 Cat. Description Sqft Date Amount Amount PSF Lease Id: 000222 Occupancy 9/1/2021 ABA Rent Abatements/Cor 4,850 6/15/2021 -12,125.00 -145,500.00 -30.00 Leased Sqft: 4,850 Rent Start 6/15/2021 ABA Rent Abatements/Cor 4,850 12/1/2021 0.00 0.00 0.00 Pro-Rata Share 0.17 Expiration 9/30/2028 ROF Base Rent Office 4,850 6/15/2021 12,125.00 145,500.00 30.00 Ann. Mkt Rent PSF: 0.00 Vacate TIC Tenant Improvement 4,850 11/1/2021 3,059.54 36,714.48 7.57 UTI Occupancy Status: Current Utility Reimbursement 4,850 6/15/2021 808.33 9,699.96 2.00 Rate Change Schedule Effective Monthly Annual Amount Cat. Description Sqft Date Amount Amount PSF ABA Rent Abatements/Cor 4,850 11/1/2021 -2,575.00 -30,900.00 -6.37 ROF Base Rent Office 4,850 7/1/2022 12,367.50 148,410.00 30.60 ROF Base Rent Office 4,850 7/1/2023 12,614.04 151,368.48 31.21 ROF Base Rent Office 4,850 7/1/2024 12,868.67 154,424.04 31.84 ROF Base Rent Office 4,850 7/1/2025 13,123.29 157,479.48 32.47 ROF Base Rent Office 4,850 7/1/2026 13,386.00 160,632.00 33.12 ROF Base Rent Office 4,850 7/1/2027 13,652.75 163,833.00 33.78 ROF Base Rent Office 4,850 7/1/2028 13,927.58 167,130.96 34.46 Lease Notes Effective Date Ref 1 Ref 2 Note 3/15/2021 ALTERTN Article 8 of Lease Landlord's consent required for any alterations other than cosmetic Alterations which do not cost more than $1,000 per alteration and which do not affect (i) the structural portions or roof of the Premises or the 3/15/2021 ASGNSUB Article 9 Landlord consent required for any assignment/sublease Landlord has 30 days after receipt of notice from Tenant to either approve assignment/sublease. not approve assignment/sublease. recapture the Premises 3/15/2021 DEFAULT Article 18 of Lease 1. If Tenant does not make payment within 5 days after date due provided that, Landlord shall not more than 1 time per 12 full calendar month period of the term deliver written notice to Tenant with respect to 3/15/2021 ESTOPEL Article 17 of Lease Estoppel required to be provided within 10 days after request in the form set forth in Exhibit D 3/15/2021 HOLDOVR Section 19 (b) of Lease Landlord may either (i) increase Rent to 200% of the highest monthly aggregate Fixed Rent and additional 3/15/2021 INS Article 11 Landlord responsible for repairs to all plumbing and other fixtures, equipment and systems (including replacement if necessary) in or serving the Premises Landlord to provide janitorial services (Exhibit E) and pest control as needed 3/15/2021 LATECHG Article 3 of Lease Tenant shall pay Landlord a service and handling charge equal to five percent (5%) of any Rent not paid within five (5) days after the date first due. which shall apply cumulatively each month with respect to Report Id WEBX PROFILE Database HAVERFORD Reported by Joe Staugaard 1/7/2022 11:50 Page 1"
},
"dimensions": [
{
"width": 612,
"height": 792
},
{
"width": 612,
"height": 792
}
],
"review": {
"rate": "Ok",
"note": "",
"reviewerId": "62de356a2f027ab62a00bef1"
},
"jobStart": 1678360991,
"sessionTime": 6,
"elapsedTime": 6,
"updateTime": 1678360997,
"selectBoundingBox": true,
"lastUpdate": 1678360998343
}
}
],
"annotator_id": [
"1@an.com"
],
"state": 4,
"state_description": "Approved",
"comprehend_blocks_source": "/uploads/781555718520b47b0b96bb0f/intermediate/blocks/f098e3d9-56fa-4770-9cbd-7415758d77aa_blocks.json",
"labels": {
"Name:KEY": 2,
"Name:VAL": 2,
"key-pair": 2
}
}
Retrieve a list of tasks matching the filter criteria
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
list |
querry |
list |
list of parameters |
project_id |
querry parram |
string |
Internal project_id assigned to the Project within Newton Workbench |
task_id |
querry param |
string |
Internal task_id assigned to the task in the Project within Newton Workbench |
file_name: |
querry param |
string |
file_name metadata assigned to the task |
file_type |
querry param |
string |
file_type metadata assigned to the task |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
tasks = client.get_tasks(
project_id="557b89e25a0588898fae91f0",
task_id=None,
file_name=None,
file_type=None,
trail = False
)
pprint(tasks)
Status of the operation is returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
body |
String |
Internal project_id for the given project in Newton workbench |
task_id |
body |
string |
Internal task_id assigned to the task in the Project within Newton Workbench |
file_name: |
body |
string |
file_name metadata assigned to the task |
file_type: |
body |
string |
file_type metadata assigned to the task |
source |
body |
string |
internal source file reference on local storage disk |
company |
body |
string |
Code for company |
annotator_id |
body |
string |
It is the id of annotator |
state |
body |
Integer |
Numerical representation of state of task |
state_description |
body |
string |
Status of task |
labels |
body |
list |
It gives the count of labels relationships added in task |
Sample Response Body
[
{
"project_id": "46c165230e44e4ba3954b407",
"task_id": "08698951b8d33f236db0f9c6",
"file_name": "Invoice-Template.pdf",
"file_type": "application/pdf",
"source": "file:781555718520b47b0b96bb0f/287b33efe398121be781e046",
"company": "60f38299446de8dabe9207e5",
"state": 0,
"state_description": "Unassigned"
},
{
"project_id": "46c165230e44e4ba3954b407",
"task_id": "f43faa1a5168f5fa5204c16e",
"file_name": "ABSTRACT - Axia (3).pdf",
"file_type": "application/pdf",
"source": "file:781555718520b47b0b96bb0f/4dc320a225eec89248d36222",
"company": "60f38299446de8dabe9207e5",
"annotator_id": [
"1@an.com"
],
"state": 4,
"state_description": "Approved",
"labels": {
"Name:KEY": 2,
"Name:VAL": 2,
"key-pair": 2
}
},
{
"project_id": "46c165230e44e4ba3954b407",
"task_id": "ce5863666d0b85ccfd0b06e1",
"file_name": "AVVISO DI GARA - TAG.pdf",
"file_type": "application/pdf",
"source": "file:781555718520b47b0b96bb0f/600e148e6bf778f852a61b27",
"company": "60f38299446de8dabe9207e5",
"state": 0,
"state_description": "Unassigned"
},
{
"project_id": "46c165230e44e4ba3954b407",
"task_id": "1bf678f3fca031245a482e96",
"file_name": "InvoiceSimple-PDF-Template.pdf",
"file_type": "application/pdf",
"source": "file:781555718520b47b0b96bb0f/bed472a61777cc506008e145",
"company": "60f38299446de8dabe9207e5",
"state": 0,
"state_description": "Unassigned"
}
]
Delete the given task item
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
task_id |
querry |
string |
Internal task_id assigned in the Project within Newton Workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
data = client.delete_task(task_id="449354de1168469a8229f605")
pprint(data)
Status of the delete operation is returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
message |
body |
String |
Gets the confirmation message for task Deleted |
Status |
body |
Integer |
Action is done |
Sample Response Body
{'message': 'Task deleted sucessfuly', 'status': 1}
Creates a new dataset based on configuration settings provided in the JSON body.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_name |
body |
String |
Name of the dataset |
dataset_description |
body |
string |
Relevant Dataset Description |
dataset_type |
body |
string |
Type of Dataset |
item_format |
body |
string |
Type of items |
meta_data |
body |
list |
Metadata added to Dataset. |
s3IntermediateUrl |
body |
string |
It is s3 bucket path for processing the items |
aws_credentials_enabled |
body |
Boolean |
Toggles for selection of mode of AWS Secutity |
aws_credentials |
body |
list |
Type of AWS Security |
s3IntermediateUrl |
body |
string |
It is s3 bucket path for processing the items |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
body={
"dataset_name": "Test-Dataset-API",
"dataset_description": "This is a test Dataset",
"dataset_type": "Image",
"item_format": "image/tiff",
"meta_data": {
"Dataset": "Image Dataset"
},
"s3IntermediateUrl": "s3://************************************",
"aws_credentials_enabled": true,
"aws_credentials": {
"awsKey": "***********",
"awsSecret": "**************",
"awsRegion": "***********",
"awsType": "key"
}
}
pprint(client.create_dataset(body))
After creation of Dataset,it returns the Response body as per below and it is having Attirbutes which are in Payload.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
body |
string |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
dataset_name |
body |
String |
Name of the dataset |
dataset_description |
body |
string |
Relevant Dataset Description |
dataset_type |
body |
string |
Type of Dataset |
item_format |
body |
string |
Type of items |
meta_data |
body |
list |
Metadata added to Dataset. |
s3IntermediateUrl |
body |
string |
It is s3 bucket path for processing the items |
aws_credentials_enabled |
body |
Boolean |
Toggles for selection of mode of AWS Secutity |
aws_credentials |
body |
list |
Type of AWS Security |
s3IntermediateUrl |
body |
string |
It is s3 bucket path for processing the items |
Sample Response Body
{
"dataset_id": "85bfac4fb66d935312a373ec",
"dataset_name": "Test-Dataset-API",
"dataset_type": "Image",
"dataset_description": "This is a test Dataset",
"dataset_versions": [
{
"id": 0,
"items": 0,
"name": "V.1",
"locked": false,
"created": 1678442477,
"modified": 1678442477
}
],
"item_format": "image/tiff",
"meta_data": {
"Dataset": "Image Dataset"
},
"company": "60f38299446de8dabe9207e5",
"aws_credentials_enabled": true,
"aws_credentials": {
"awsKey":
"awsSecret":
"awsRegion":
"awsType": "key"
},
"s3IntermediateUrl": "s3://************************************",
}
Fetches configuration details of an existing dataset in the workbench based on the provided dataset_id parameter.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
querry |
string |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
# Invoke get_project method
response = client.get_dataset(dataset_id="449354de1168469a8229f605")
pprint(response)
The requested dataset’s configuration is returned in JSON format.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
body |
string |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
dataset_name |
body |
String |
Name of the dataset |
dataset_description |
body |
string |
Relevant Dataset Description |
dataset_type |
body |
string |
Type of Dataset |
item_format |
body |
string |
Type of items |
meta_data |
body |
list |
Metadata added to Dataset. |
s3IntermediateUrl |
body |
string |
It is s3 bucket path for processing the items |
aws_credentials_enabled |
body |
Boolean |
Toggles for selection of mode of AWS Secutity |
aws_credentials |
body |
list |
Type of AWS Security |
s3IntermediateUrl |
body |
string |
It is s3 bucket path for processing the items |
Sample Response Body
{
"dataset_id": "85bfac4fb66d935312a373ec",
"dataset_name": "Test-Dataset-API",
"dataset_type": "Image",
"dataset_description": "This is a test Dataset",
"dataset_versions": [
{
"id": 0,
"items": 0,
"name": "V.1",
"locked": false,
"created": 1678442477,
"modified": 1678442477
}
],
"item_format": "image/tiff",
"meta_data": {
"Dataset": "Image Dataset"
},
"company": "60f38299446de8dabe9207e5",
"aws_credentials_enabled": true,
"aws_credentials": {
"awsKey": "********************",
"awsSecret": "****************************************",
"awsRegion": "*********",
"awsType": "key"
},
"s3IntermediateUrl": "s3://************************************",
}
Updates configuration of an existing dataset in the workbench based on the provided dataset_id and body JSON parameter.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
body |
string |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
dataset_name |
body |
String |
Name of the dataset |
dataset_description |
body |
string |
Relevant Dataset Description |
dataset_type |
body |
string |
Type of Dataset |
item_format |
body |
string |
Type of items |
meta_data |
body |
list |
Metadata added to Dataset. |
s3IntermediateUrl |
body |
string |
It is s3 bucket path for processing the items |
aws_credentials_enabled |
body |
Boolean |
Toggles for selection of mode of AWS Secutity |
aws_credentials |
body |
list |
Type of AWS Security |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
body={
"dataset_name": "Test-Dataset-API",
"dataset_description": "Update dataset",
"dataset_type": "Image",
"item_format": "image/tiff",
"meta_data": {
"Dataset": "Image Dataset"
},
"s3IntermediateUrl": "s3://************************************",
"aws_credentials_enabled": true,
"aws_credentials": {
"awsKey": "***********",
"awsSecret": "**************",
"awsRegion": "***********",
"awsType": "key"
}
}
response = client.update_dataset(dataset_id="85bfac4fb66d935312a373ec",body=body)
pprint(response)
The updated dataset’s new configuration is returned in JSON format.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
FIELD |
In |
TYPE |
DESCRIPTION |
dataset_id |
body |
string |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
dataset_name |
body |
String |
Name of the dataset |
dataset_description |
body |
string |
Relevant Dataset Description |
dataset_type |
body |
string |
Type of Dataset |
item_format |
body |
string |
Type of items |
meta_data |
body |
list |
Metadata added to Dataset. |
s3IntermediateUrl |
body |
string |
It is s3 bucket path for processing the items |
aws_credentials_enabled |
body |
Boolean |
Toggles for selection of mode of AWS Secutity |
aws_credentials |
body |
list |
Type of AWS Security |
s3IntermediateUrl |
body |
string |
It is s3 bucket path for processing the items |
Sample Response Body
{
"dataset_id": "85bfac4fb66d935312a373ec",
"dataset_name": "Test-Dataset-API",
"dataset_type": "Image",
"dataset_description": "Update Dataset",
"dataset_versions": [
{
"id": 0,
"items": 0,
"name": "V.1",
"locked": false,
"created": 1678442477,
"modified": 1678442477
}
],
"item_format": "image/tiff",
"meta_data": {
"Dataset": "Image Dataset"
},
"company": "60f38299446de8dabe9207e5",
"aws_credentials_enabled": true,
"aws_credentials": {
"awsKey": "********************",
"awsSecret": "****************************************",
"awsRegion": "*********",
"awsType": "key"
},
"s3IntermediateUrl": "s3://************************************",
}
Fetches a list of datasets that meet the criteria defined by the parameters (dataset_id or dataset_name or active status)
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
querry |
String |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
# Invoke list_datasets method
response = client.list_datasets(dataset_id=None,dataset_name=None,active=True)
pprint(response)
All the above three parameters can be applied as filters with AND criteria. When all three parameters are set to None, then no filter is applied and all datasets are returned
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
body |
string |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
dataset_name |
body |
string |
Name of the dataset |
dataset_type |
body |
string |
Type of Dataset |
dataset_versions |
body |
list |
It is the list versions of datasets |
company |
body |
String |
Code of the company |
company_name |
body |
string |
Name of the company |
Sample Response Body
{
"dataset_id": "c8a04fbf7c8f95ef8912338f",
"dataset_name": "Test Dataset",
"dataset_type": "Image",
"dataset_versions": [
{
"id": 0,
"items": 1,
"name": "Base version",
"locked": true,
"created": 1657526913,
"modified": 1657526913
},
{
"id": 1,
"items": 59,
"name": "Version 2",
"locked": true,
"created": 1657527052,
"modified": 1657527052
}
],
"company": "60f38299446de8dabe9207e5",
"company_name": "Objectways"
},
{
"dataset_id": "bd35da16cd39283f119454cc",
"dataset_name": "Test Dataset 3",
"dataset_type": "Image",
"dataset_versions": [
{
"id": 0,
"items": 1,
"name": "V.1",
"locked": true,
"created": 1657708086,
"modified": 1657708086
},
{
"id": 1,
"items": 5,
"name": "V.2",
"locked": true,
"created": 1657709319,
"modified": 1657709319
},
],
"company": "60f38299446de8dabe9207e5",
"company_name": "Objectways"
}
Deletes an existing dataset in the workbench based on the provided dataset_id parameter.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
querry |
string |
Internal project_id assigned to the Project within Newton Workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
# Invoke delete_dataset method
response = client.delete_dataset(dataset_id="8bc05ec26ab161e218a0e842")
pprint(response)
Status of the delete operation is returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
message |
body |
String |
Gets the confirmation message for Project Deletion |
Status |
body |
Integer |
Action is done |
Sample Response Body
{
'message': 'dataset deleted',
'status': 1
}
Creates a new dataset based on configuration settings provided in the JSON body.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
querry |
string |
Id of the dataset |
dataset_items |
querry |
Array |
List of dataset items |
Sample Request Body
body = {
"dataset_id": "b0e13cfe3ec7af93230ef87c",
"dataset_items": [
{
"meta_data": {
"batch": "10",
"test": "cell"
},
"source": "s3://****************"
},
{
"meta_data": {
"batch": "1",
"test": "cell"
},
"source": "s3://******************"
}
]
}
pprint(client.create_dataset_item(body))
Status of operation is returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
status |
body |
Integer |
Action is done |
inserted_items |
body |
Integer |
Number of dataset_items added in dataset |
Sample Response Body
{ "status": 1, "inserted_items": 2 }
Retrieve a dataset item
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
item_id |
querry |
String |
Internal item_id for the given dataset item in Newton workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
data = client.get_dataset_item(item_id="449354de1168469a8229f605")
pprint(data)
The requested dataset’s configuration is returned in JSON format.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
body |
string |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
dataset_type |
body |
string |
Type of Dataset |
item_id |
body |
string |
Internal item_id for the given dataset item in Newton workbench |
file_name |
body |
string |
file_name metadata assigned to the task |
file_type |
body |
string |
file_type metadata assigned to the task |
source |
body |
string |
internal source file reference on local storage disk |
version |
body |
list |
It is the list versions of datasets |
plain_text |
body |
string |
Text of Item added in Dataset |
meta_data |
body |
list |
Metadata added to Dataset_item. |
company |
body |
string |
Code for the company |
state |
body |
Integer |
State of item |
Sample Response Body
[
{
"dataset_id": "781555718520b47b0b96bb0f",
"dataset_type": "PDFOCR",
"item_id": "4dc320a225eec89248d36222",
"tags": {
"test-tag1": 1
},
"file_name": "ABSTRACT - Axia (3).pdf",
"file_type": "application/pdf",
"source": "file:781555718520b47b0b96bb0f/4dc320a225eec89248d36222",
"version": [
8,
9
],
"plain_text": {
"1": "Lease Profile Lease Id: PR0001 - 000222 Master Occupant Id: 00000162-1 1 Page Report IdWEBX_PROFILE Database HAVERFORD Reported by Joe Staugaard 1/7/2022 11:50 Legal Name: Contact Name: Phone No: Fax No: N A M E B L L I T O Tenant Id: Tenant Type Id: Lease Stop: SIC Group: NAICS Code AxiaWomen's Health RegionalWomens Health Management Jenni Witters 227 Laurel Road Echelon One, Suite 300 Voorhees NJ 08043 RegionalWomens Health Managem Bryn Mawr PA 19010 HP Main Line LLC No Suite Information Occupancy Status: "
},
"meta_data": {
"pages": "1",
"use-textract-only": "true",
"source_ref": "/uploads/781555718520b47b0b96bb0f/4dc320a225eec89248d36222",
"document_id": "4dc320a225eec89248d36222"
},
"company": "60f38299446de8dabe9207e5",
"company_name": "Objectways",
"state": 0
}
]
Delete the given dataset item
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
item_id |
querry |
String |
Internal item_id for the given dataset item in Newton workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
data = client.delete_dataset_item(item_id="6bae961fcebe81cbacbedec6")
pprint(data)
Status of the delete operation is returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
message |
body |
String |
Gets the confirmation message for Datatset_item Deleted |
status |
body |
Integer |
Action is done |
Sample Response Body
{
"message": "dataset item deleted",
"status": 1
}
Retrieve a list of dataset items matching the filter criteria of version
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
list |
querry |
list |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
dataset_id |
querry param |
string |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
dataset_version |
queery param |
string |
Internal dataset_version for the given dataset in Newton workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
# Invoke list_datasets method
dataset_items = client.list_dataset_items(dataset_id="2ed8316fe3691cea93b8d70c",dataset_version="0")
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
body |
string |
Internal dataset_id assigned to the Dataset within Newton Workbench. |
dataset_type |
body |
string |
Type of the dataset |
dataset_type |
body |
string |
Type of Dataset |
item_id |
body |
string |
Id of item in Dataset |
file_name |
body |
string |
file_name metadata assigned to the task |
file_type |
body |
string |
file_type metadata assigned to the task |
source |
body |
string |
internal source file reference on local storage disk |
version |
body |
list |
It is the list versions of datasets |
plain_text |
body |
string |
Text of Item added in Dataset |
meta_data |
body |
list |
Metadata added to Dataset_item. |
company |
body |
string |
Code for the company |
state |
body |
Integer |
State of item |
tags |
body |
string |
Tags added to Datatset_item |
Sample Response Body
[
{
"dataset_id": "781555718520b47b0b96bb0f",
"dataset_type": "PDFOCR",
"item_id": "82900099bc3ede09b88dc512",
"file_name": "Mosaic.png",
"file_type": "application/pdf",
"source": "file:781555718520b47b0b96bb0f/82900099bc3ede09b88dc512",
"version": [
0,
1,
2,
3
],
"plain_text": {
"1": ""
},
"meta_data": {
"pages": "1",
"use-textract-only": "true",
"source_ref": "/uploads/781555718520b47b0b96bb0f/82900099bc3ede09b88dc512",
"document_id": "82900099bc3ede09b88dc512"
},
"company": "60f38299446de8dabe9207e5",
"company_name": "Objectways",
"state": 12,
"tags": []
},
{
"dataset_id": "781555718520b47b0b96bb0f",
"dataset_type": "PDFOCR",
"item_id": "a319515564d3e1e7e74be409",
"tags": [
"test 1"
],
"file_name": "ABSTRACT - Axia (3).pdf",
"file_type": "application/pdf",
"source": "file:781555718520b47b0b96bb0f/a319515564d3e1e7e74be409",
"version": [
0,
1,
2,
3
],
"plain_text": {
"1": "Lease Profile Lease Id: PR0001 - 000222 Master Occupant Id: 00000162-1 1 Page Report IdWEBX_PROFILE Database HAVERFORD Reported by Joe Staugaard 1/7/2022 11:50 Legal Name: Contact Name: Phone No: Fax No: N A M E B L L I T O Tenant Id: Tenant Type Id: Lease Stop: SIC Group: NAICS Code AxiaWomen's Health RegionalWomens Health Management Jenni Witters 227 Laurel Road Echelon One, Suite 300 Voorhees NJ 08043 RegionalWomens Health Managem Bryn Mawr PA 19010 HP Main Line LLC No Suite Information ",
"2": "Lease Profile Lease Id: PR0001 - 000222 Master Occupant Id: 00000162-1 2 Page Report IdWEBX_PROFILE Database HAVERFORD Reported by Joe Staugaard 1/7/2022 11:50 LLMAINT Article 11 - Landlord responsible for repairs to all plumbing and other fixtures, equipment and systems 3/15/2021 (including replacement, if necessary) in or serving the Premises. Landlord to provide janitorial services (Exhibit E) and pest control as needed. NOTICE Section 1(l) of Lease 3/15/2021 OPEX Section 1 (g), 1(i) and Article 4 of Lease 3/15/2021 PRS (16.26%) of expenses over the Base Year(calendar year 2021. PARKING Section 6(a) of Lease 3/15/2021 Landlord shall reserve one or more parking spaces, in "
},
"meta_data": {
"pages": "1",
"use-textract-only": "true",
"source_ref": "/uploads/781555718520b47b0b96bb0f/a319515564d3e1e7e74be409",
"document_id": "a319515564d3e1e7e74be409"
},
"company": "60f38299446de8dabe9207e5",
"company_name": "Objectways",
"state": 12
}
]
Export all tasks from a given project as JSON list
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
querry |
string |
Internal project_id assigned to the Project within Newton Workbench |
export_note |
querry |
string |
Note added by user |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
projects = client.export_project_tasks(project_id="1e80e389c318d5746169c5b6",export_note="This is test export via API"),
export_note="This is test export via API",
pprint(projects)
Export status
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
progress |
body |
String |
it gives the percentage of progress of exporting the task |
message |
body |
String |
it tells how to use “export_url” |
export_url |
body |
String |
url used for downloading exports |
Sample Response Body
{
"progress": "100%",
"message": "Use the export_url to download the project export file",
"export_url": "https://devdocuments.objectways.com/export_testner3_2023-03-11T06:17:12.4972567.manifest"
}
This method enlisits the exports exported in the project.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
querry |
string |
Internal project_id assigned to the Project within Newton Workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
response = client.list_project_exports( project_id="449354de1168469a8229f605")
Export status
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
exportId |
body |
string |
Used for download the manifest file |
created |
body |
Integer |
Universal Time Stamp |
createdBy |
body |
String |
User email who exports the project |
note |
body |
string |
note by user |
project |
body |
string |
project_id |
selection |
body |
Boolean |
Toggels if tasks are selected or not in project to export |
items |
body |
integer |
Count of tasks to be exported |
filter |
body |
Boolean |
Toggels applying filter in project to export the filtered tasks |
projectName |
body |
string |
Name of project |
Sample Response Body
[
{
"exportId": "2023-03-11T06:54:50.1371301",
"created": 1678517690,
"createdBy": "abc@example.com",
"note": "note",
"project": "f9af04fc0315e4f536c849b1",
"selection": false,
"items": 1,
"filter": "",
"projectName": "Bulk Project"
},
{
"exportId": "2023-03-11T06:55:28.6315616",
"created": 1678517729,
"createdBy": "abc@example.com",
"note": "note1",
"project": "f9af04fc0315e4f536c849b1",
"selection": false,
"items": 1,
"filter": "",
"projectName": "Bulk Project"
}
]
It downloads the project exports with given export id
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
querry |
string |
Internal project_id assigned to the Project within Newton Workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
response = client.download_project_export(export_id="2023-03-11T06:55:28.6315616")
Export status
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
Status |
body |
string |
It is the state of Downloading Exports |
progress |
body |
String |
it gives the percentage of progress of exporting the task |
message |
body |
string |
it tells how to use “export_url” |
export_url |
body |
string |
url used for downloading exports |
Sample Response Body
{
"status": "COMPLETED",
"progress": "100%",
"message": "Use the export_url to download the project export file",
"export_url": "https://devdocuments.objectways.com/export_2023-03-11T06:54:50.1371301_bulkproject.manifest"
}
Export all dataset items from a given dataset as JSON list.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
querry |
string |
Internal dataset_id assigned to the Dataset within Newton Workbench |
export_note |
querry |
string |
Note added by user |
project_id |
querry |
string |
Internal project_id assigned to the Project within Newton Workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
response = client.export_dataset(
dataset_id="3aa168a963f1d4dbe0b1f549",
export_note="This is test export via API",
project_id="449354de1168469a8229f606")
Export status
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
progress |
body |
String |
it gives the percentage of progress of exporting the task |
exportId |
body |
string |
Used for downloading exports |
Sample Response Body
{
"progress": "100%",
"exportId": "2023-03-11T07:32:44.2329426"
}
This method enlisits the exports exported in the Dataset.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
querry |
string |
Internal dataset_id assigned to the Project within Newton Workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
response = client.list_dataset_exports(dataset_id="449354de1168469a8229f605")
Export status
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
exportId |
body |
string |
Used for download the manifest |
datasetId |
body |
String |
Id of Dataset |
created |
body |
Integer |
Universal Time Stamp |
createdBy |
body |
String |
User email who exports the project |
note |
body |
String |
note by user |
project |
body |
string |
selected project |
selection |
body |
Boolean |
Toggels if tasks are selected or not in project to export |
items |
body |
integer |
Count of tasks to be exported |
filter |
body |
Boolean |
Toggels applying filter in project to export the filtered tasks |
projects |
body |
string |
project selected for export |
Sample Response Body
[
{
"exportId": "2023-02-06T09:04:17.1804171",
"datasetId": "f82570db65aa7464d1aa5a00",
"created": 1675674257,
"createdBy": "abc@example.com",
"note": "export",
"project": "",
"selection": false,
"items": 16,
"filter": "",
"projects": []
},
{
"exportId": "2023-02-06T09:07:14.8943466",
"datasetId": "f82570db65aa7464d1aa5a00",
"created": 1675674435,
"createdBy": "abc@example.com",
"note": "export",
"project": "",
"selection": false,
"items": 16,
"filter": "",
"projects": []
}
]
Export status with url
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
dataset_id |
querry |
String |
Internal dataset_id assigned to the Project within Newton Workbench |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
response = client.download_dataset_export(
export_id="2023-02-06T09:07:14.8943466")
Export status
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
Status |
body |
string |
It is the state of Downloading Exports |
progress |
body |
string |
it gives the percentage of progress of exporting the task |
messageS |
body |
string |
it tells how to use “export_url” |
export_url |
body |
string |
url used for downloading exports |
Sample Response Body
{
"status": "COMPLETED",
"progress": "100%",
"message": "Use the export_url to download the project export file",
"export_url": "https://devdocuments.objectways.com/export_2023-02-06T09:04:17.1804171_scanneddocumentdataset.manifest"
}
Add a team member to collaborate on an existing project.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
querry |
string |
project to which the task needs to be added |
querry |
String |
Email id of an user to be added to the project as a collaborator |
|
role |
querry |
string |
role assigned to the team member. This should be one of annotator or reviewer or supervisor |
Sample Request Body
- ::
from pprint import pprint from objectways import newton
# Initialize Newton client client = newton.Newton(api_url=”YOUR_API_URL”,api_key=”YOUR_API_KEY”)
member = client.add_team_member(project_id=”449354de1168469a8229f605”, email=”someone@email.com”, role=”annotator|reviewer|supervisor”) pprint
Status of operation is returned as a JSON
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
status |
body |
integer |
The status code of the response (1 for success, 0 for failure) |
message |
body |
string |
A message indicating whether the user was added to the |
Sample Response Body
{
"status": 1,
"message": "user added to the project team"
}
Return list of team members assigned to a project.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
querry |
string |
project to which the task needs to be added |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
team = client.get_project_team_members(project_id="449354de1168469a8229f605")
pprint(team)
JSON list of team members in the given project
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
body |
string |
Email-id of user |
|
role |
body |
reviewer |
Role of USer |
Sample Response Body
{
[
{
"email": "q1@qc.com",
"role": "reviewer"
},
{
"email": "1@an.com",
"role": "annotator"
}
]
}
Remove the given team member from an existing project.
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
project_id |
querry |
String |
project to which the task needs to be added |
querry |
string |
Email-id of user |
Sample Request Body
from pprint import pprint
from objectways import newton
# Initialize Newton client
client = newton.Newton(api_url="YOUR_API_URL",api_key="YOUR_API_KEY")
team = client.remove_project_team_member(project_id="449354de1168469a8229f605", email="someone@email.com" )
JSON list of team members in the given project
FIELD |
In |
TYPE |
DESCRIPTION |
---|---|---|---|
status |
body |
string |
The status code of the response (1 for success, 0 for failure) |
message |
body |
string |
A message indicating whether the member was removed from the project team. |
Sample Response Body
{
{
"status": 1,
"message": "user deleted from project team"
}
}