Data retrieval

Get the details about a specific work order.

The status of a work order corresponds to a set of tasks. For each task, the current analyzed value from one or more analyses is provided (aggregation is an internal Deepomatic process).

In addition to the set of tasks, the completion state of the work order (progress score), updated with the analysis, is returned. It is both recommended to illustrate user’s progress with a progress bar based on the progress score (value is between 0 and 100) and to use this score to implement a logic for closing the intervention based on Deepomatic results.

In case of correction via the correction endpoint, the corrected value is also returned.

All endpoints are described with the EU (Europe) server format. If your application runs on the US server, you will need to use the following format: https://api.{site-id}.customers.us1.deepomatic.com/v0.2/.

Every Deepomatic application is versioned. We recommend to not integrate any logic based on the tasks and task groups ids as those ids changes when a version is upgraded. You can instead use tasks and task groups names that are agnostic to version changes.

Retrieve a work order

GET https://api.{site-id}.customers.deepomatic.com/v0.2/work-orders/{id}/

Path Parameters

Name
Type
Description

id*

string

Id of the work order to retrieve This id corresponds to the id returned in the create a work order API response.

Query Parameters

Name
Type
Description

include_inputs

boolean

Include analyzed inputs in the response Default to true. Setting this parameter to false will give you a less verbose output. If it fits your needs you should pass false as it will be faster.

Headers

Name
Type
Description

Authorization*

string

Deepomatic API Key associated to your account.

Response format

progress_score - number (between 0 and 100) : completion state of the work order computed based on the tasks included in the conformity score.

review_date - date : date of the review performed by back office teams in our platform. For more details regarding work order review, please refer to the reviewing documentation.

inputs - array : array containing the different inputs sent to perform the analysis including the conformity_messages associated in case a data conformity check is not passed.

conformity_messages - array : array returned when a data conformity check is not passed. It contains information such as the code , the name and the message associated to the check. The check level is also provided and two values can be returned: "warning" and "error". Depending on the level set in our platform, different responses will be returned (for more details on the responses' format, see below).

state - object : object containing in particular the task analyzed_value which is dependent on the task type (eg. if the type is "Boolean", then the value returned will be either True or False), the message associated to the analysis and the analyzed_inputs array that allows you to retrieve the bounding boxes detected.

In the include_inputs = false option, both the inputs array and the analyzed_inputs field are not returned. The response time is therefore reduced.

{
    "id": "1eb136be-65d9-4964-8a8d-1a20c1573d7b",
    "name": "work-order",
    "site_id": "39c9d63f-a517-4f9d-ae45-415d80931226",
    "progress_score": 50,
    "review_date": null,
    "create_date": "2023-05-29T12:12:11.584841Z",
    "update_date": "2023-05-29T12:12:12.020635Z",
    "tags": [
        "group-1",
        "group-2"
    ],
    "app_version_id": "c14d3664-b69f-4357-a443-866111a65fb8",
    "parameters": null,
    "metadata": {
        "region": "North",
        "intervention_date": "05-29-2023"
    },
    "types": [
        {
            "id": "47fed03f-0894-4d1a-91ff-d0ab0af641b0",
            "name": "maintenance"
        },
        {
            "id": "4e9acb6f-ee3e-4e90-86fd-8baea0dfd969",
            "name": "one-equipment"
        }
    ],
    "inputs": [
        {
            "id": "dd38664f-8d48-4fcb-bf52-3e940b55b0d3",
            "name": "context",
            "data": {
                "type": "text",
                "value": "equipment-after-intervention"
            },
            "metadata": {},
            "conformity_messages": []
        },
        {
            "id": "f5c76f7d-79ad-424f-bca6-5117c48efd9b",
            "name": "image_input",
            "data": {
                "type": "image",
                "value": "https://storage.googleapis.com/dp-resources-prod/inputs/f5c76f7d-79ad-424f-bca6-5117c48efd9b.jpeg?Expires=1685778294&GoogleAccessId=vesta-prod%40deepomatic-160015.iam.gserviceaccount.com&Signature=rUeXgdfDOiWYISoK7M48HnvO6HwDpaGXlIL6ZCLBEA9kUKon%2ByHU5JyWu8pF%2BtKeDjxzja3Q%2BCYrgjZquSg96SnZh83tnefLaHpS3o0%2FMfBN7ogKM8CzkbNdt%2BDPwO1syYCpcdxHBfkUlwl7W90HlI%2BOkM%2FHb8NN%2BSLC5hcbvLEgeWJUEjwPoHSMh%2FRmm36m3NFFi%2F7dbOhaddstjKgH8KvhP%2B7thjhT7OiIVEdt9roHs5HTSD0RmCKyodytY5XUlRiLMPPwS3EsHnNLJmaZBbMzqBW5z%2FsZI3OSX3pJJmWuJ0%2B2pGsmzvHx%2FORzQmnsr5nuJ%2BQghSvJT22QhmYsmQ%3D%3D"
            },
            "metadata": {},
            "conformity_messages": []
        },
    "field_engineer_email": "richard.roe@deepomatic.com,
    "field_engineer_name": "Richard Roe",
    "user_group_ids": [],
    "tasks": [
        {
            "id": "db081122-b571-48d9-b19b-6f690be1e94e",
            "name": "equipment_after_intervention",
            "label": "Is it a photo of the equipment after intervention?",
            "type": "Boolean",
            "group_name": "equipment-after-intervention",
            "group_id": "6f15b52e-4717-4ec5-a8b2-bd58e7eec5ca",
            "state": {        
                "id": "2052385d-ac0c-4080-b8e9-fa4814b5b407",
                "analyzed_value": true,
                "analyzed_date": "2023-05-29T17:43:12.260474Z",
                "corrected_value": false,
                "corrected_date": "2023-05-29T17:44:25.567482Z",
                "message": "Invalid photo",
                "color": "#e45d26",
                "is_conformity_validated": false
                "analyzed_inputs": [
                    {
                        "input_id": "f5c76f7d-79ad-424f-bca6-5117c48efd9b",
                        "regions": []
                    }
                ]
            }
        }, 
        {
            "id": "b5293ca9-faa1-4880-8c07-1bb0475da4d6",
            "name": "equipment_after_intervention_degradations",
            "label": "Number of degradations",
            "type": "Number",
            "group_name": "equipment-after-intervention",
            "group_id": "6f15b52e-4717-4ec5-a8b2-bd58e7eec5ca",
            "state": {
                "id": "54ef3d77-026c-4a5b-9eee-971ceb00b942",
                "analyzed_value": 2.0,
                "analyzed_date": "2023-05-29T17:43:12.260474Z",
                "corrected_value": null,
                "corrected_date": null,
                "message": "Degradations have been spotted on the equipment",
                "color": "#e4264e",
                "is_conformity_validated": false,
                "analyzed_inputs": [
                    {
                        "input_id": "f5c76f7d-79ad-424f-bca6-5117c48efd9b",
                        "regions": [
                            {
                                "bbox": {
                                    "xmax": 0.23577146,
                                    "xmin": 0.21882737,
                                    "ymax": 0.6945216,
                                    "ymin": 0.6803977
                                },
                                "score": 0.9281037449836731,
                                "concept": "degradations"
                            },
                            {
                                "bbox": {
                                    "xmax": 0.2890531,
                                    "xmin": 0.27096856,
                                    "ymax": 0.68964636,
                                    "ymin": 0.67994857
                                },
                                "score": 0.9210498332977295,
                                "concept": "degradations"
                            }
                        ]
                    }
                ]
            }
        }
    ],
    "task_groups": [
        {
            "id": "6f15b52e-4717-4ec5-a8b2-bd58e7eec5ca",
            "name": "equipment-after-intervention",
            "display_name": "Equipment after intervention",
            "order": 0
        }
    ]
}

Request examples

include_inputs = true

curl 'https://api.{site-id}.customers.deepomatic.com/v0.2/work-orders/{id}' \    
    -X GET \
    -H 'Authorization: Token <your_api_key>' \       
    -H 'Content-Type: application/json'        

include_inputs = false

curl 'https://api.{site-id}.customers.deepomatic.com/v0.2/work-orders/{id}?include_inputs=false' \    
    -X GET \
    -H 'Authorization: Token <your_api_key>' \      
    -H 'Content-Type: application/json'       

Last updated