{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Introduction","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"introduction","__idx":0},"children":["Introduction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["DrillPlan's ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/drillplan/apis/reportingapi"},"children":["Reporting API"]}," provides access to reports created in DrillPlan."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-to-get-project-reports","__idx":1},"children":["How to get project reports"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A project ID needs to be provided to enumerate reports. A project ID can be obtained by listing user-joined projects using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/plan/v1/projects/joined"]}," end-point exposed as part of ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/drillplan/apis/projectplanapi"},"children":["Project Plan API"]},". After obtaining a project ID, the reports created in that project can be retrieved by executing a GET request using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/reporting/v2/projects/{projectId}/reports"]}," end-point."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"asynchronous-reporting-api","__idx":2},"children":["Asynchronous Reporting API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Such tasks as report creation, report update, and report export implemented as asynchronous processes and requires several HTTP calls to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/drillplan/apis/reportingapi"},"children":["Reporting API"]}," to be completed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"how-to-create-a-report","__idx":3},"children":["How to create a report"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An asynchronous task for creating a report can be created via executing a POST using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/reporting/v2/projects/{projectId}/reports/create"]}," end-point and providing the following payload:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{ \n   \"name\": \"New report name\", \n   \"template\": \"Template name\",\n   \"callback\": {\n     \"uri\": \"https://example.com/callback\",\n     \"headers\": {\n         \"Authorization\": \"Bearer your_token_here\",\n         \"Custom-Header\": \"custom_header_value\"\n     }\n   }\n} \n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Available report templates could be obtained via executing a GET request using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/reporting/v2/templates"]}," end-point."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once the report creation is complete, the DrillPlan Reporting subsystem will send a POST request to the specified callback endpoint with the following payload:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"395849cf9bbf440d91\", // ID of the task the callback is related to.\n  \"status\": \"Succeeded\", // The task execution status.\n  \"artifacts\": {\n     \"report_id\": \"ac5ed2e4e05976\" // The created report ID.\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also retrieve the tasks created in step 1 by sending a GET request to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/reporting/v2/projects/{projectId}/tasks/{taskId}"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After obtaining the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["report_id"]},", you can get the result of the report creation by sending a GET request to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/reporting/v2/projects/{projectId}/reports/{reportId}"]},"."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"how-to-update-a-report","__idx":4},"children":["How to update a report"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An asynchronous task for updating a report can be created via executing a POST using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/reporting/v2/projects/{projectId}/reports/{reportId/content/update"]}," end-point and providing the following payload:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{ \n    // Optional \n    // \"chapters\": [ \n    //    { \n    //        \"id\": 123412 \n    //    } \n    //] \n    \"callback\": {\n       \"uri\": \"https://example.com/callback\",\n       \"headers\": {\n          \"Authorization\": \"Bearer your_token_here\",\n          \"Custom-Header\": \"custom_header_value\"\n       }\n    }\n} \n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Where the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["chapters"]}," field contains a list of chapters that needed to be updated. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["chapters"]}," field is optional and if not provided, all report chapters are updated."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once the report update is complete, the DrillPlan Reporting subsystem will send a POST request to the specified callback endpoint with the following payload:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"395849cf9bbf440d91\", // ID of the task the callback is related to.\n  \"status\": \"Succeeded\", // The task execution status.\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also retrieve the tasks created in step 1 by sending a GET request to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/reporting/v2/projects/{projectId}/tasks/{taskId}"]},"."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-to-export-a-report","__idx":5},"children":["How to export a report"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An asynchronous task for exporting a report should be created by executing a POST request using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/reporting/v2/projects/{projectId}/reports/{reportId}/content/export"]}," end-point."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The payload provided in the request should contain the required content type of the exported report, e.g.:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{ \n    \"content_type\": \"application/pdf\",\n    \"callback\": {\n       \"uri\": \"https://example.com/callback\",\n       \"headers\": {\n          \"Authorization\": \"Bearer your_token_here\",\n          \"Custom-Header\": \"custom_header_value\"\n       }\n    }       \n} \n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Successful responses to such task creation requests contain a task ID that can be used to monitor the task state."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once the report export is complete, the DrillPlan Reporting subsystem will send a POST request to the specified callback endpoint with the following payload:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"395849cf9bbf440d91\", // ID of the task the callback is related to.\n  \"status\": \"Succeeded\", // The task execution status.\n  \"artifacts\": {\n     \"export_id\": \"ac5ed2e4e05976\"\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also retrieve the tasks created in step 1 by sending a GET request to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/reporting/v2/projects/{projectId}/tasks/{taskId}"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After obtaining the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["export_id"]},", the result of the export operation can be received by issuing a GET request to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/drillplan/reporting/v2/projects/{projectId}/exports/{exportId}"]},". Successful responses to such requests should contain binary data of the requested media type."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["🚩Important:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["In cases where a report update is in progress, attempts to create an export task should fail with HTTP status code 423 (Locked). After some time has passed, the request can be re-issued."]}]}]},"headings":[{"value":"Introduction","id":"introduction","depth":2},{"value":"How to get project reports","id":"how-to-get-project-reports","depth":2},{"value":"Asynchronous Reporting API","id":"asynchronous-reporting-api","depth":2},{"value":"How to create a report","id":"how-to-create-a-report","depth":3},{"value":"How to update a report","id":"how-to-update-a-report","depth":3},{"value":"How to export a report","id":"how-to-export-a-report","depth":2}],"frontmatter":{"seo":{"title":"Introduction"}},"lastModified":"2025-04-14T22:07:22.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/drillplan/docs/tutorials/api-consumption-guide/reporting-api","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}