Last updated

Introduction

DrillPlan's Dynamic Display Items API provides access to DrillPlan dynamic display items.

How to request key parameters content

  1. An asynchronous task for requesting key parameters content can be created via executing a POST using /drillplan/ddis/v1/projects/{projectId}/key-parameters/content/requests end-point and providing the following payload:

    {  
       "plan_id": "131231231",  // The plan ID 
       "language": "en-EN", // Optional, project language is used if it is not specified. 
       "unit_system": "English", // Optional, Project unit system is used if it is not specified. 
       "key_parameters": [ 
           { 
              "key_parameter_id": "well-name", 
              "level_id": "d973c00e4d64f5ddb1231" // The content level ID specified as a plan node ID of the plan referenced in the request. 
           } 
        ],
       "callback": {
            "uri": "https://example.com/callback",
            "headers": {
               "Authorization": "Bearer your_token_here",
               "Custom-Header": "custom_header_value"
            }
        }   
    }  

    Available key parameters could be obtained via executing a GET request using /drillplan/ddis/v1/key-parameters end-point.

  2. Once the content generation is complete, the DrillPlan Reporting subsystem will send a POST request to the specified callback endpoint with the following payload:

    {
      "id": "395849cf9bbf440d91", // ID of the task the callback is related to.
      "status": "Succeeded", // The task execution status.
      "artifacts": {
         "content_id": "ac5ed2e4e05976"
      }
    }
  3. You can also retrieve the tasks created in step 1 by sending a GET request to /drillplan/ddis/v2/projects/{projectId}/tasks/{taskId}

  4. After obtaining the content_id, the result of the content generation operation can be received by issuing a GET request to /drillplan/ddis/v1/projects/{projectId}/key-parameters/content/{contentId}.

How to request display items content

  1. An asynchronous task for requesting display items content can be created via executing a POST using /drillplan/ddis/v1/projects/{projectId}/display-tems/content/requests end-point and providing the following payload:

    {  
       "plan_id": "131231231",  // The plan ID 
       "language": "en-EN", // Optional, project language is used if it is not specified. 
       "unit_system": "English", // Optional, Project unit system is used if it is not specified. 
       "display_items": [ 
           { 
              "display_item_id": "pressure-aea-card-results", 
              "level_id": "d973c00e4d64f5ddb1231" // The content level ID specified as a plan node ID of the plan referenced in the request. 
           } 
        ],
        "callback": {
            "uri": "https://example.com/callback",
            "headers": {
               "Authorization": "Bearer your_token_here",
               "Custom-Header": "custom_header_value"
            }
         }          
    }  

    Available display items could be obtained via executing a GET request using /drillplan/ddis/v1/display-items end-point.

  2. Once the content generation is complete, the DrillPlan Reporting subsystem will send a POST request to the specified callback endpoint with the following payload:

    {
      "id": "395849cf9bbf440d91", // ID of the task the callback is related to.
      "status": "Succeeded", // The task execution status.
      "artifacts": {
         "content_id": "ac5ed2e4e05976"
      }
    }
  3. You can also retrieve the tasks created in step 1 by sending a GET request to /drillplan/ddis/v2/projects/{projectId}/tasks/{taskId}

  4. After obtaining the content_id, the result of the content generation operation can be received by issuing a GET request to /drillplan/ddis/v1/projects/{projectId}/display-items/content/{contentId}. The response should contains the following content:

    {  
       "display_items": [ 
           { 
              "display_item_id": "pressure-aea-card-results", 
              "level_id": "d973c00e4d64f5ddb1231", // The content level ID specified as a plan node ID of the plan referenced in the request. 
              "content_parts": [
                  {
                      "content_part_id": "d1231c00e4d45461231", // The content part ID which could be used to retrieve part's content.
                      "title": "AEA Result" // The title of the content part.
                  }
              ]
           } 
        ] 
    }  
  5. Using the content part IDs from the previous response, the actual content can be retrieved by issuing a GET request to /drillplan/ddis/v1/projects/{projectId}/display-items/content-parts/{contentPartId}. The response may contain content of different types, including image/jpeg, image/png, and application/pdf.