{
  "openapi": "3.0.1",
  "info": {
    "title": "External Event Public API",
    "contact": {
      "name": "DrillPlan Framework Team",
      "email": "bgc-taiji-fwk@slb.com"
    },
    "version": "v1",
    "x-product-id": "DrillPlan-External-Event-API",
    "description": "```plain {% title=\"Client ID\" %}\nfwk-drillplan.slbservice.com\n```\n"
  },
  "paths": {
    "/v1/external-events": {
      "post": {
        "tags": [
          "ExternalEvent"
        ],
        "summary": "Create an external event.",
        "description": "Create an external event",
        "operationId": "CreateExternalEventV1",
        "requestBody": {
          "description": "Request content",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalEventRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalEventRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalEventRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalEventRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {}
              },
              "application/json": {
                "schema": {}
              },
              "text/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ExternalEventRequestDto": {
        "required": [
          "content",
          "sender",
          "status",
          "title"
        ],
        "type": "object",
        "properties": {
          "projectId": {
            "maxLength": 50,
            "pattern": "^[a-z0-9]*$",
            "type": "string",
            "nullable": true
          },
          "planId": {
            "maxLength": 50,
            "pattern": "^[a-z0-9/\\-]*$",
            "type": "string",
            "nullable": true
          },
          "status": {
            "minLength": 1,
            "type": "string",
            "description": "The status should be one of [Success, Warning, Error]."
          },
          "title": {
            "minLength": 1,
            "maxLength": 100,
            "type": "string",
            "description": "The title should be as concise as possible."
          },
          "content": {
            "maxLength": 1000,
            "type": "string",
            "description": "The content uses Markdown format, supporting bold, italic, lists, and links. <br />\r\nLine break: \\n\\n <br />\r\nFor example, if the content want to display in DrillPlan UI like below: <br />\r\n---\r\nExample content with **bold** *italic*, lists and link. <br />\r\nOrdered:\r\n  1. Item O1\r\n  2. Item O2\r\n\r\nUnordered:\r\n  * Item U1\r\n  * Item U2\r\n\r\nEnd of message with [Link](url).\r\n\r\n---\r\nThe content should be: <br />\r\nExample content with \\*\\*bold\\*\\* \\*italic\\*, lists and link. \\n\\n Ordered: \\n\\n 1. Item O1 \\n\\n 2. Item O2 \\n\\n Unordered: \\n\\n - Item U1 \\n\\n - Item U2 \\n\\n End of message with \\[Link\\]\\(url\\). <br />"
          },
          "sender": {
            "minLength": 1,
            "maxLength": 50,
            "type": "string",
            "description": "The sender is normally the external system name."
          }
        },
        "additionalProperties": false
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "User Token from SLB Authenticator Service"
      },
      "appkey": {
        "type": "apiKey",
        "description": "AppKey/ConsumerKey from your App on Developer Portal",
        "name": "appkey",
        "in": "header"
      },
      "sauth_service_token": {
        "type": "oauth2",
        "description": "Service from SAuth v2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://p4d.csi.cloud.slb-ds.com/v2/token",
            "scopes": {
              "fwk-drillplan.slbservice.com": ""
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearer": [],
      "appkey": []
    },
    {
      "sauth_service_token": [],
      "appkey": []
    }
  ],
  "servers": [
    {
      "url": "https://eu-api.delfi.slb.com/drillplan/external-event",
      "description": "ProdEU"
    },
    {
      "url": "https://api.delfi.slb.com/drillplan/external-event",
      "description": "ProdUS"
    }
  ],
  "tags": [
    {
      "name": "ExternalEvent",
      "description": "Service endpoints to access DrillPlan external event."
    }
  ]
}