KEY TERMS
A work order is a set of elementary tasks that must be performed by a field technician. These tasks are related to one or more photos that are requested from the technicians. End-users can also specify other parameters (a category, a number, etc.)
A task in this context refers to a specific checkpoint that can be validated via the Deepomatic application. There may be several checkpoints to be validated on a single photo, or conversely there may be several photos needed to validate a single checkpoint. The most basic checkpoint is the presence of a certain type of photo requested from the field technician, but much more complex checkpoints can be implemented in your Deepomatic application.
A state in this context corresponds to the current status of a given control point for your work order. It is built from the aggregation of the results of the workflow executions.
This is a REST API.
Since authentication parameters are transmitted through HTTP headers, and the transferred data may contain sensitive information, it is strongly recommended to use HTTPs with secure encryption.
All endpoints must end with a slash /
unless specified explicitly.
Body parameters are JSON data. They must be sent with an application/json
MIME type. The root element of the JSON that is sent must be an object.
Once your application has been deployed, you can call an API that has been deployed as part of your application. To do so, however, the two following conditions must be met:
your workflow must be compatible - it must define outcomes that are the result sent within the API
you must have added the customer-api
service to your application
{"id": "30c99d1c-2468-4155-8322-2beda677b464","name": "work order 123","site_id": "3a749f74-182e-4154-9cfe-03f352a0ff74","create_date": "2021-03-10T10:05:44.689343+01:00","update_date": "2021-03-10T10:05:44.689374+01:00","review_date": None,"tags": ["tag1","custom-tag-2","hello"],"assigned_user_id": None,"parameters": {"text-to-validate": "abcdef"},"metadata": {"source": "foo","location": "bar"},"tasks": [{"id": "785e7f54-b10b-4fa6-96fc-cbb89e32c369","name": "very-important-checkpoint","label": "The cable is connected.","type": "Boolean","state": None}]}
{"count": 1,"next": 'https://api-staging.deepomatic.com/v0.7/work-orders/?limit=4&offset=24',"previous": 'https://api-staging.deepomatic.com/v0.7/work-orders/?limit=4&offset=16',"results": [{"id": "30c99d1c-2468-4155-8322-2beda677b464","name": "work order 123","create_date": "2021-03-10T10:05:44.689343+01:00","update_date": "2021-03-10T10:05:44.689374+01:00","review_date": "2021-03-10T10:05:44.689374+01:00","tags": ["tag1","custom-tag-2","hello"],"parameters": {"text-to-validate": "abcdef"},"metadata": {"source": "foo","location": "bar"}]},{"id": "21b72ddd-4518-4d44-98af-67dfedf6ae04","name": "work order 456","create_date": "2021-02-25T18:21:06.814571+01:00","update_date": "2021-02-25T18:21:06.814571+01:00","review_date": "2021-02-25T18:21:06.814571+01:00","tags": ["tag1","custom-tag-3"],"parameters": {"measure-to-validate": 36.5},"metadata": {"source": "foo","location": "bar"}]}]}
{"id": "30c99d1c-2468-4155-8322-2beda677b464","name": "work order 123","site_id": "3a749f74-182e-4154-9cfe-03f352a0ff74","create_date": "2021-03-10T10:05:44.689343+01:00","update_date": "2021-03-10T10:05:44.689374+01:00","review_date": "2021-02-25T18:21:06.814571+01:00","tags": ["tag1","custom-tag-2","hello"],"assigned_user_id": None,"parameters": {"text-to-validate": "abcdef"},"metadata": {"source": "foo","location": "bar"},"tasks": [{"id": "785e7f54-b10b-4fa6-96fc-cbb89e32c369","name": "very-important-checkpoint","label": "The cable is connected.","type": "Boolean","state": {"id": "42d926f8-8c2f-4e35-9611-8a2f058a36ef","analyzed_value": true,"analyzed_date": "2021-02-24T18:21:06.814571+01:00","corrected_value": None,"corrected_date": "2021-02-24T18:21:06.814571+01:00","message": "Everything is alright.","analyzed_inputs": [{"input_id": "e265e644-6a7c-432d-8a6b-7588dd501e01","regions": [{"bbox": {"xmax": 0.5531774759292603,"xmin": 0.26091110706329346,"ymax": 0.6088465452194214,"ymin": 0.26795440912246704},"score": 0.9999864101409912,"concept": "Cable label",}}]],},{"id": "a750dc02-ff55-47a3-9e92-df3b123f9d07","name": "another-important-checkpoint","label": "The plugs are installed.","type": "Text","state": {"id": "36dbae13-ad7c-463f-ad6a-f24bfba1e1cd","analyzed_value": "1 missing plug","analyzed_date": "2021-02-24T18:21:06.814571+01:00","corrected_value": None,"corrected_date": "2021-02-24T18:21:06.814571+01:00","message": "Quality problem detected.","analyzed_inputs": [{"input_id": "4de9b9e1-b97c-4044-a1cc-c1ca606c8dfe","regions": [{"bbox": {"xmax": 0.5531774759292603,"xmin": 0.26091110706329346,"ymax": 0.6088465452194214,"ymin": 0.26795440912246704},"score": 0.9999864101409912,"concept": "Missing plug",}}]],}],"inputs": [{"id": "e265e644-6a7c-432d-8a6b-7588dd501e01","name": "image_input_1","data": {"type": "image","value": "https://storage.googleapis.com/dp-resources-prod/inputs/e265e644-6a7c-432d-8a6b-7588dd501e01.jpeg?GoogleAccessId=vulcan-prod%40deepomatic-160015.iam.gserviceaccount.com&Expires=1614275929&Signature=XxrUs3rbJdHgAQ4FgccwjIv9%2B9eYWHj1dtozDjL%2BYrgEdfsEsV3wY4onxboly3Mnx35bp%2BPfkOQ7GO3jNnoL6t%2BtG0QJzY41VuTUQbAMmOp2rw%2FkicXPU2DEi125eZKzmBqpiot2yCteqTK4c6VNC4g2g75%2F2HHTDYfbRuUtHfvXUXKXxhasSL5Uk%2BPbC0o34i4EA1WgiRAGrnugj8I2Ri4%2FJa26NtQcYxDpe895HZs7vTAl35hArxqumc4c7c8%2BH9nbNdeb0ycOg3y7rURQ%3D%3D"},"metadata": {}},{"id": "4de9b9e1-b97c-4044-a1cc-c1ca606c8dfe","name": "image_input_2","data": {"type": "image","value": "https://storage.googleapis.com/dp-resources-prod/inputs/e265e644-6a7c-432d-8a6b-7588dd501e01.jpeg?GoogleAccessId=vulcan-prod%40deepomatic-160015.iam.gserviceaccount.com&Expires=1614275929&Signature=XxrUs3rbJdHgAQ4FgccwjIv9%2B9eYWHj1dtozDjL%2BYrgEdfsEsV3wY4onxboly3Mnx35bp%2BPfkOQ7GO3jNnoL6t%2BtG0QJzY41VuTUQbAMmOp2rw%2FkicXPU2DEi125eZKzmBqpiot2yCteqTK4c6VNC4g2g75%2F2HHTDYfbRuUtHfvXUXKXxhasSL5Uk%2BPbC0o34i4EA1WgiRAGrnugj8I2Ri4%2FJa26NtQcYxDpe895HZs7vTAl35hArxqumc4c7c8%2BH9nbNdeb0ycOg3y7rURQ%3D%3D"},"metadata": {}}]]}
{"error": "Not found.", "detail": ""}
{"id": "30c99d1c-2468-4155-8322-2beda677b464","site_id": "3a749f74-182e-4154-9cfe-03f352a0ff74","create_date": "2021-03-10T10:05:44.689343+01:00","update_date": "2021-03-10T10:05:44.689374+01:00","review_date": "2021-02-25T18:21:06.814571+01:00","name": "work order 123","analyses": [{"id": "03b31cbc-ef89-4aec-bf2f-8427ac234168","inputs": [{"id": "e265e644-6a7c-432d-8a6b-7588dd501e01","name": "image_input","data": {"type": "image","value": "https://storage.googleapis.com/dp-resources-prod/inputs/e265e644-6a7c-432d-8a6b-7588dd501e01.jpeg?GoogleAccessId=vulcan-prod%40deepomatic-160015.iam.gserviceaccount.com&Expires=1614275929&Signature=XxrUs3rbJdHgAQ4FgccwjIv9%2B9eYWHj1dtozDjL%2BYrgEdfsEsV3wY4onxboly3MnxuR6x%2FT3AwEL0gJnXVFT0wlTtdpcm%2FVzsD6cF0fOonZ55rZ2r9vep8WcgbtwpTmOq9D35bp%2BPfkOQ7GO3jNnoL6t%2BtG0QJzY41VuTUQbAMmOp2rw%2FkicXPU2DEi125eZKzmBqpiot2yCteqTK4c6VNC4g2g75%2F2HHTDYfbRuUtHfvXUXKXxhasSL5Uk%2BPbC0o34i4EA1WgiRAGrnugj8I2Ri4%2FJa26NtQcYxDpe895HZs7vTAl35hArxqumc4c7c8%2BH9nbNdeb0ycOg3y7rURQ%3D%3D"},"metadata": {}}],"tasks":[{"id": "785e7f54-b10b-4fa6-96fc-cbb89e32c369","name": "life-question","label": "what is the answer to life ?","type": "Text","state": {"id": "42d926f8-8c2f-4e35-9611-8a2f058a36ef","analyzed_value": "OK","analyzed_date": "2021-02-24T18:21:06.814571+01:00","corrected_value": None,"corrected_date": "2021-02-24T18:21:06.814571+01:00","message": "Everything went alright: OK","analyzed_inputs": [{"input_id": "e265e644-6a7c-432d-8a6b-7588dd501e01","regions": [{"bbox": {"xmax": 0.5531774759292603,"xmin": 0.26091110706329346,"ymax": 0.6088465452194214,"ymin": 0.26795440912246704},"score": 0.9999864101409912,"concept": "Etiquette Cable",}}]]}]}]}
{"id": "30c99d1c-2468-4155-8322-2beda677b464","name": "work order 123","site_id": "3a749f74-182e-4154-9cfe-03f352a0ff74","create_date": "2021-03-10T10:05:44.689343+01:00","update_date": "2021-03-10T10:05:44.689374+01:00","tags": ["tag1","custom-tag-2","hello"],"assigned_user_id": None,"parameters": {"text-to-validate": "abcdef"},"metadata": {"source": "foo","location": "bar"},"tasks": [{"id": "785e7f54-b10b-4fa6-96fc-cbb89e32c369","name": "very-important-checkpoint","label": "The cable is connected.","type": "Boolean","state": None}]}
{"source": "foo","location": "bar"}
{"id": "03b31cbc-ef89-4aec-bf2f-8427ac234168","tasks": [{"id": "785e7f54-b10b-4fa6-96fc-cbb89e32c369","name": "life-question","label": "what is the answer to life ?","type": "Text","state": {"id": "42d926f8-8c2f-4e35-9611-8a2f058a36ef","analyzed_value": "OK","analyzed_date": "2021-02-24T18:21:06.814571+01:00","message": "Everything went alright: OK","analyzed_inputs": [{"input_id": "e265e644-6a7c-432d-8a6b-7588dd501e01","regions": [{"bbox": {"xmax": 0.5531774759292603,"xmin": 0.26091110706329346,"ymax": 0.6088465452194214,"ymin": 0.26795440912246704},"score": 0.9999864101409912,"concept": "Etiquette Cable",}}]],}],"inputs": [{"id": "e265e644-6a7c-432d-8a6b-7588dd501e01","name": "image_input"}]]}
"inputs": [{'name': 'windshield_image','data':{'type': 'image','value': 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRw...'},'metadata': {}},{'name': 'dog_image','data':{'type': 'image','value': 'https://link/to/my/image/dog.jpg'}},{'name': 'anything','data':{'type': 'text','value': 'something'}},{'name': 'pi','data':{'type': 'number','value': 3.14}}]
{"id":"f54b713c-8dad-401c-ad9d-2961e0205ec6","name":"life-question","label":"what is the answer to life ?","type":"Text","state":{"id":"2a78da05-6786-4d81-82b5-b31d3921e834","analyzed_value":"None","analyzed_date":"None","corrected_value":"OK","corrected_date":"2021-03-17T10:48:13.876288Z","message":"Everything went alright: OK"}}