{
  "openapi": "3.0.3",
  "info": {
    "title": "DrillPlan Reporting API",
    "version": "2.1.0",
    "x-product-id": "DrillPlan-Reporting-API",
    "description": "Provides access to DrillPlan reports.\n```plain {% title=\"Client ID\" %}\nfwk-drillplan.slbservice.com\n```\n"
  },
  "tags": [
    {
      "name": "Exports",
      "description": "Service endpoints to access report exports."
    },
    {
      "name": "Reports",
      "description": "Service endpoints to access DrillPlan reports."
    },
    {
      "name": "Tasks",
      "description": "Service endpoints to access asynchronous tasks."
    },
    {
      "name": "Templates",
      "description": "Service endpoints to access DrillPlan report templates."
    }
  ],
  "security": [
    {
      "bearer": [],
      "appkey": []
    }
  ],
  "paths": {
    "/v2/templates": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DataPartition"
        }
      ],
      "get": {
        "tags": [
          "Templates"
        ],
        "summary": "Get report templates.",
        "description": "Returns a collection of report templates.  \n",
        "operationId": "GetTemplatesV2",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/v2/projects/{projectId}/reports": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/ReportName"
        },
        {
          "$ref": "#/components/parameters/DataPartition"
        }
      ],
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get project reports.",
        "description": "Returns a collection of reports created in a DrillPlan project.   \nThe user must be a member of the project to be able to enumerate the reports. \n",
        "operationId": "GetProjectReportsV2",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/v2/projects/{projectId}/reports/create": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/DataPartition"
        }
      ],
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Create a report creation task.",
        "description": "Creates a new instance of the asynchronous report creation task. \nThe user must be a member of the project to be able to create reports.\n",
        "operationId": "CreateReportCreateTaskV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "423": {
            "$ref": "#/components/responses/Locked"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/v2/projects/{projectId}/reports/{reportId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/ReportId"
        },
        {
          "$ref": "#/components/parameters/DataPartition"
        }
      ],
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get a report.",
        "description": "Allows to retrieve a specific DrillPlan report details using a report ID.   \nTo report details, the user must be a member of the project to which the report belongs. \n",
        "operationId": "GetReportV2",
        "parameters": [
          {
            "name": "include",
            "description": "Allows to include additional information to the response. Use 'chapters' to include information about report chapters.",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "chapters"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/v2/projects/{projectId}/reports/{reportId}/content/export": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/ReportId"
        },
        {
          "$ref": "#/components/parameters/DataPartition"
        }
      ],
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Crate a report export task.",
        "description": "Creates a new instance of the asynchronous export task for a given DrillPlan report.  \nTo create an export task, the user must be a member of the project to which the report belongs. \n",
        "operationId": "CreateReportContentExportTaskV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportContentExportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "423": {
            "$ref": "#/components/responses/Locked"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/v2/projects/{projectId}/reports/{reportId}/content/update": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/ReportId"
        },
        {
          "$ref": "#/components/parameters/DataPartition"
        }
      ],
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Create a report content update task.",
        "description": "Creates a new instance of the asynchronous content update task for a given DrillPlan report.  \nTo create a content update task, the user must be a member of the project to which the report belongs. \n",
        "operationId": "CreateReportContentUpdateTaskV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportContentUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "423": {
            "$ref": "#/components/responses/Locked"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/v2/projects/{projectId}/exports/{exportId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/ExportId"
        },
        {
          "$ref": "#/components/parameters/DataPartition"
        }
      ],
      "get": {
        "tags": [
          "Exports"
        ],
        "summary": "Get a result of a report export by ID.",
        "description": "Allows to get a result of a DrillPlan report export in binary form.  \nResults of export operations are transient and get deleted after one minute after the corresponding export task gets completed.  \nTo get the results, the user must be a member of the project to which the exported report belongs. \n",
        "operationId": "GetExportV2",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/v2/projects/{projectId}/tasks/{taskId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/TaskId"
        },
        {
          "$ref": "#/components/parameters/DataPartition"
        }
      ],
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "Get a task.",
        "description": "Allows to get a specific asynchronous task details using its ID.   \nThis end-point can be used to monitor the state of an asynchronous task.  \nTo get the task details, the user must be a member of the project to which the task belongs. \n",
        "operationId": "GetTaskV2",
        "responses": {
          "200": {
            "description": "Task status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "appkey": {
        "description": "Application key.",
        "in": "header",
        "name": "appkey",
        "type": "apiKey"
      },
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "User Token from SLB Authenticator Service"
      }
    },
    "parameters": {
      "ProjectId": {
        "name": "projectId",
        "in": "path",
        "description": "Identifier of the project.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ReportId": {
        "name": "reportId",
        "in": "path",
        "description": "Identifier of the report.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ExportId": {
        "name": "exportId",
        "in": "path",
        "description": "Identifier of the report export.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ReportName": {
        "name": "name",
        "in": "query",
        "description": "Report name to search for using exact match.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "TaskId": {
        "name": "taskId",
        "in": "path",
        "description": "Identifier of the task.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "DataPartition": {
        "description": "Data partition ID.",
        "in": "header",
        "name": "slb-data-partition-id",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "NotFound": {
        "description": "Resource not found.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
              "title": "Not Found",
              "detail": "Resource is not found"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "User is not authorized.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://www.rfc-editor.org/rfc/rfc7235#section-3.1",
              "title": "Unauthorized",
              "detail": "User alice@example.com is not authorized."
            }
          }
        }
      },
      "BadRequest": {
        "description": "Bad request.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
              "title": "Bad Request",
              "detail": "The request parameter failed to validate."
            }
          }
        }
      },
      "Locked": {
        "description": "Locked.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://datatracker.ietf.org/doc/html/rfc4918#section-11.3",
              "title": "Locked",
              "detail": "The report is locked for an update."
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal server error.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
              "title": "Internal Server Error",
              "detail": "Server encountered an internal error that prevented it from fulfilling this request."
            }
          }
        }
      },
      "UnexpectedError": {
        "description": "Unexpected error.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
              "title": "Unsupported Media Type",
              "detail": "Media type 'application/xml' is not supported."
            }
          }
        }
      }
    },
    "schemas": {
      "TemplateList": {
        "type": "object",
        "description": "The list of report templates.",
        "required": [
          "templates"
        ],
        "properties": {
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Template"
            }
          }
        }
      },
      "Template": {
        "type": "object",
        "description": "The report template.",
        "required": [
          "type",
          "name"
        ],
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TemplateType"
          },
          "name": {
            "type": "string",
            "description": "The report template name."
          },
          "comments": {
            "type": "string",
            "description": "The report template comments."
          },
          "last_modified": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp of the last template modification."
          },
          "last_modified_by": {
            "type": "string",
            "description": "The user who modified the template."
          }
        },
        "example": {
          "type": "Regular",
          "name": "My Template",
          "comments": "My awesome template",
          "last_modified": "2023-11-08T14:26:17.758Z",
          "last_modified_by": "Joe Bloggs"
        }
      },
      "TemplateType": {
        "type": "string",
        "description": "The report template type.",
        "x-csharp-value-type": true,
        "enum": [
          "Regular",
          "Protected"
        ]
      },
      "ReportList": {
        "type": "object",
        "description": "The list of reports.",
        "required": [
          "reports"
        ],
        "properties": {
          "reports": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportSummary"
            }
          }
        }
      },
      "ReportSummary": {
        "type": "object",
        "description": "The report.",
        "required": [
          "id",
          "project_id",
          "name",
          "template",
          "plan",
          "audit_status",
          "editor_link"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The report ID."
          },
          "project_id": {
            "type": "string",
            "description": "The project ID."
          },
          "name": {
            "type": "string",
            "description": "The report name."
          },
          "template": {
            "$ref": "#/components/schemas/ReportTemplate"
          },
          "plan": {
            "$ref": "#/components/schemas/PlanReference"
          },
          "last_update": {
            "$ref": "#/components/schemas/ReportSuccessfulUpdate"
          },
          "audit_status": {
            "$ref": "#/components/schemas/AuditStatus"
          },
          "editor_link": {
            "type": "string",
            "description": "The location of the report in DrillPlan to view."
          }
        },
        "example": {
          "id": "3c00e4d64f5ddb13b4",
          "project_id": "3c123ca123bef23423",
          "name": "Awesome Report",
          "template": {
            "name": "Blank Report"
          },
          "plan": {
            "id": "1832968"
          },
          "audit_status": "InProgress",
          "editor_link": "https://test.evt.slb.com/reporting/web/projects/1234567890/reports/1234567890?view-mode=true",
          "last_update": {
            "plan": {
              "id": "f98e41e2bbb4c5e38c"
            },
            "started": "2022-08-16T11:00:00Z",
            "ended": "2022-08-16T12:00:00Z"
          }
        }
      },
      "Report": {
        "type": "object",
        "description": "The report.",
        "required": [
          "id",
          "project_id",
          "name",
          "template",
          "plan",
          "audit_status",
          "editor_link"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The report ID."
          },
          "project_id": {
            "type": "string",
            "description": "The project ID."
          },
          "name": {
            "type": "string",
            "description": "The report name."
          },
          "template": {
            "$ref": "#/components/schemas/ReportTemplate"
          },
          "plan": {
            "$ref": "#/components/schemas/PlanReference"
          },
          "last_update": {
            "$ref": "#/components/schemas/ReportSuccessfulUpdate"
          },
          "audit_status": {
            "$ref": "#/components/schemas/AuditStatus"
          },
          "editor_link": {
            "type": "string",
            "description": "The location of the report in DrillPlan to view."
          },
          "chapters": {
            "type": "array",
            "description": "Report chapters.",
            "items": {
              "$ref": "#/components/schemas/Chapter"
            }
          },
          "chapter_problems": {
            "type": "array",
            "description": "Chapter related problems.",
            "items": {
              "$ref": "#/components/schemas/ChapterProblem"
            }
          }
        },
        "example": {
          "id": "3c00e4d64f5ddb13b4",
          "project_id": "3c123ca123bef23423",
          "name": "Awesome Report",
          "template": {
            "name": "Blank Report"
          },
          "plan": {
            "id": "f98e41e2bbb4c5e38c"
          },
          "audit_status": "InProgress",
          "editor_link": "https://test.evt.slb.com/webdrillplan/projects/f4371c4c2d973c00/reports/bbb4c5e38cbf4?view-mode=true",
          "last_update": {
            "plan": {
              "id": "f98e41e2bbb4c5e38c"
            },
            "started": "2022-08-16T11:00:00Z",
            "ended": "2022-08-16T12:00:00Z"
          },
          "chapters": [
            {
              "id": 20354,
              "name": "chapter 1",
              "is_linked": false,
              "chapter_mapping": {
                "level_reference_type": "Activity",
                "references": [
                  {
                    "id": "plan_node_id_well",
                    "type": "Well"
                  },
                  {
                    "id": "plan_node_id_wellbore",
                    "type": "Wellbore"
                  },
                  {
                    "id": "plan_node_id_section",
                    "type": "Section"
                  },
                  {
                    "id": "plan_node_id_activity",
                    "type": "Activity"
                  }
                ]
              }
            },
            {
              "id": 24186,
              "name": "chapter 2",
              "is_linked": false,
              "problem": {
                "type": "any-type",
                "title": "Problem Title",
                "detail": "Problem Detail",
                "severity": "Error"
              }
            }
          ],
          "chapter_problems": [
            {
              "chapter_id": 25468,
              "problem": {
                "type": "any-type",
                "title": "Problem Title",
                "detail": "Problem Detail",
                "severity": "Error"
              }
            }
          ]
        }
      },
      "Chapter": {
        "type": "object",
        "description": "The report chapter.",
        "required": [
          "id",
          "name",
          "is_linked"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "description": "The chapter ID."
          },
          "parent_chapter_id": {
            "type": "integer",
            "description": "The parent chapter ID."
          },
          "name": {
            "type": "string",
            "description": "The chapter title."
          },
          "is_linked": {
            "type": "boolean",
            "description": "Defines if the chapter is linked."
          },
          "chapter_mapping": {
            "$ref": "#/components/schemas/ChapterMapping"
          },
          "problem": {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        }
      },
      "ChapterProblem": {
        "type": "object",
        "description": "The document chapter related problem.",
        "required": [
          "chapter_id",
          "problem"
        ],
        "properties": {
          "chapter_id": {
            "type": "integer",
            "description": "XaitPorter document chapter ID."
          },
          "chapter_title": {
            "type": "string",
            "description": "XaitPorter document chapter title."
          },
          "problem": {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        }
      },
      "ChapterMapping": {
        "type": "object",
        "description": "The chapter mapping object.",
        "required": [
          "level_reference_type",
          "references"
        ],
        "properties": {
          "level_reference_type": {
            "$ref": "#/components/schemas/LevelReferenceType"
          },
          "references": {
            "type": "array",
            "description": "The list of related level references. In the case of mapping to Well, the list contains a Wellbore node, which is Root/Default Wellbore.",
            "items": {
              "$ref": "#/components/schemas/LevelReference"
            }
          }
        }
      },
      "LevelReference": {
        "type": "object",
        "required": [
          "id",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The reference ID, corresponds node ID in the plan."
          },
          "type": {
            "$ref": "#/components/schemas/LevelReferenceType"
          }
        }
      },
      "LevelReferenceType": {
        "type": "string",
        "description": "The type of the level reference.",
        "x-csharp-value-type": true,
        "enum": [
          "Well",
          "Wellbore",
          "Section",
          "Activity"
        ]
      },
      "ReportTemplate": {
        "type": "object",
        "description": "The report template.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The report template name."
          }
        }
      },
      "PlanReference": {
        "type": "object",
        "description": "Reference to the plan associated with a report.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The plan ID."
          }
        }
      },
      "ReportSuccessfulUpdate": {
        "type": "object",
        "description": "Represents information on the last successful report update.",
        "required": [
          "plan",
          "started",
          "ended"
        ],
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/PlanReference"
          },
          "started": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp of the last successful update start."
          },
          "ended": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp of the last successful update end."
          }
        }
      },
      "ReportCreateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncTaskRequest"
          },
          {
            "type": "object",
            "description": "The report creation request.",
            "required": [
              "name",
              "template_name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "The report name."
              },
              "template_name": {
                "type": "string",
                "description": "The report template name."
              },
              "plan_id": {
                "type": "string",
                "description": "The plan ID the report is associated with. If it is not specified, the report will follow the master plan."
              }
            },
            "example": {
              "name": "New new report",
              "template_name": "My template",
              "callback": {
                "uri": "https://example.com/callback",
                "headers": {
                  "Authorization": "Bearer your_token_here",
                  "Custom-Header": "custom_value"
                }
              }
            }
          }
        ]
      },
      "ReportContentUpdateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncTaskRequest"
          },
          {
            "type": "object",
            "description": "The report content update request.",
            "properties": {
              "chapters": {
                "type": "array",
                "description": "The list of chapters to include into the update.  If the `chapters` property is missing or equal to `null`, the entire report gets updated.",
                "items": {
                  "$ref": "#/components/schemas/IncludedChapter"
                }
              }
            },
            "example": {
              "chapters": [
                12511,
                21312
              ],
              "callback": {
                "uri": "https://example.com/callback",
                "headers": {
                  "Authorization": "Bearer your_token_here",
                  "Custom-Header": "custom_value"
                }
              }
            }
          }
        ]
      },
      "IncludedChapter": {
        "type": "object",
        "description": "The chapter included in the update.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "description": "The chapter ID."
          }
        }
      },
      "ReportContentExportRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncTaskRequest"
          },
          {
            "type": "object",
            "description": "The report content export request.",
            "required": [
              "content_type"
            ],
            "properties": {
              "content_type": {
                "type": "string",
                "description": "The report export content type ('application/pdf')."
              }
            },
            "example": {
              "content_type": "application/pdf",
              "callback": {
                "uri": "https://example.com/callback",
                "headers": {
                  "Authorization": "Bearer your_token_here",
                  "Custom-Header": "custom_value"
                }
              }
            }
          }
        ]
      },
      "AuditStatus": {
        "type": "string",
        "description": "The audit status.",
        "enum": [
          "InProgress",
          "InReview",
          "InApproval",
          "Completed",
          "Rejected"
        ]
      },
      "Task": {
        "type": "object",
        "description": "The asynchronous task.",
        "required": [
          "id",
          "status",
          "is_completed"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The task ID."
          },
          "project_id": {
            "type": "string",
            "description": "The project ID."
          },
          "status": {
            "$ref": "#/components/schemas/TaskStatus"
          },
          "is_completed": {
            "type": "boolean",
            "description": "Indicates whether the task has completed."
          },
          "problem": {
            "$ref": "#/components/schemas/ProblemDetails"
          },
          "artifacts": {
            "type": "object",
            "description": "Artifacts of the task.",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "example": {
          "id": "c40a4a24176a7f6ea7edd",
          "project_id": "21322abc123def12001ef",
          "status": "succeeded",
          "is_completed": true,
          "artifacts": {
            "export_id": "d973c00e4d64f5ddb"
          }
        }
      },
      "TaskStatus": {
        "type": "string",
        "description": "Represents the current stage in the lifecycle of a Task.",
        "x-csharp-value-type": true,
        "enum": [
          "Created",
          "Published",
          "Running",
          "Succeeded",
          "Canceled",
          "Faulted"
        ]
      },
      "AsyncTaskRequest": {
        "type": "object",
        "description": "A request to create an asynchronous task.",
        "properties": {
          "callback": {
            "$ref": "#/components/schemas/Callback"
          }
        }
      },
      "Callback": {
        "type": "object",
        "description": "The callback definition.",
        "required": [
          "uri"
        ],
        "properties": {
          "uri": {
            "type": "string",
            "description": "The callback URI."
          },
          "headers": {
            "type": "object",
            "description": "The collection of headers.",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "example": {
          "uri": "https://example.com/callback",
          "headers": {
            "Authorization": "Bearer your_token_here",
            "Custom-Header": "custom_value"
          }
        }
      },
      "CallbackData": {
        "type": "object",
        "description": "The data provided in callback calls.",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the task the callback is related to."
          },
          "project_id": {
            "type": "string",
            "description": "The project ID."
          },
          "status": {
            "$ref": "#/components/schemas/TaskStatus"
          },
          "artifacts": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Type specific task artifact created as the result of the task execution."
          },
          "problem": {
            "description": "A problem associated with the task.",
            "$ref": "#/components/schemas/ProblemDetails"
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "description": "Problem details according to RFC7807.",
        "required": [
          "type",
          "title"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "A reference that uniquely identifies the problem type."
          },
          "title": {
            "type": "string",
            "description": "A short, human-readable summary of the problem type."
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem."
          },
          "severity": {
            "$ref": "#/components/schemas/ProblemDetailsSeverity"
          }
        }
      },
      "ProblemDetailsSeverity": {
        "type": "string",
        "description": "The severity of the problem type.",
        "enum": [
          "Error",
          "Warning"
        ],
        "default": "Error"
      }
    }
  },
  "servers": [
    {
      "url": "https://eu-api.delfi.slb.com/drillplan/reporting",
      "description": "ProdEU"
    },
    {
      "url": "https://api.delfi.slb.com/drillplan/reporting",
      "description": "ProdUS"
    }
  ]
}