{
  "openapi": "3.0.0",
  "info": {
    "title": "Workflow Service",
    "version": "1.0.0",
    "contact": {
      "name": "SLB Customer Support for Digital",
      "url": "https://customersupport.digital.slb.com"
    },
    "x-product-id": "OSDU-Workflow-Service",
    "description": "Workflow Service API is a wrapper API on existing orchestrator services (Apache Airflow) defined in a way which suits the domain workflow needs. This API is responsible for creation and maintenance of the workflows. Operational tasks such as starting, stopping and pausing workflows are also part of this API. <br><br>\nurl: 'http://www.apache.org/licenses/LICENSE-2.0.html'\n\n```plain {% title=\"Client ID\" %}\n963f2cc6915e479fa0fcb73ec2ec90e7\n```\n"
  },
  "servers": [
    {
      "url": "https://as5.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB Saas OSDU (SGP)"
    },
    {
      "url": "https://br5.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB SaaS OSDU (BRS)"
    },
    {
      "url": "https://eu5.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB Saas OSDU (WEU)"
    },
    {
      "url": "https://eu6.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB SaaS OSDU (EUT)"
    },
    {
      "url": "https://eu7.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB Saas OSDU (MDE)"
    },
    {
      "url": "https://us5.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB Saas OSDU (PSC)"
    },
    {
      "url": "https://us7.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB Saas OSDU (USC)"
    },
    {
      "url": "https://us8.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB Saas OSDU (WUS)"
    },
    {
      "url": "https://as6.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB Saas OSDU (SAS)"
    },
    {
      "url": "https://eu8.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB Saas OSDU (SWC)"
    },
    {
      "url": "https://as7.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB Saas OSDU (MYW)"
    },
    {
      "url": "https://za1.api.enterprisedata.slb.com/api/workflow/v1",
      "description": "SLB Saas OSDU (ZAN)"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Workflow",
      "description": "Workflow management"
    },
    {
      "name": "Workflow Run",
      "description": "Workflow Execution management."
    },
    {
      "name": "Custom Operators",
      "description": "Custom Operators management."
    },
    {
      "name": "Info",
      "description": "Build and git information"
    }
  ],
  "paths": {
    "/workflow": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "List all the workflows applicable for a partition.",
        "operationId": "listAllWorkflow",
        "description": "List all workflows for provided partition. \n\n**Key Points**\n\n1. This will include both the private and public workflows.\n2. Workflows can be fetched using this API.\n3. If the workflow service is down we get a 502 from gateway.",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "description": "Filter workflow names which start with the full prefix specified.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WorkflowMetadata"
                  },
                  "type": "array"
                }
              }
            },
            "description": "List of all the workflows (public & private) accessible from the partition."
          },
          "400": {
            "description": "Bad Request. Partition ID is missing/invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Workflow"
        ],
        "summary": "Registers a workflow definition composed of standard and custom operators in the orchestration tool.",
        "operationId": "deployWorkflow",
        "description": "Register a new workflow. Workflows (Airflow DAGs) could be composed of standard components (In-built Airflow operators, hooks & sensors) or custom components (User-defined operators, hooks and sensors).\n<br><br> **Key Points**\n\n  1. Workflow name and DAG name (in workflow definition) are expected to be\nthe same.\n  2. API will check the syntactic validity of the workflow based on the orchestrator.\n  3. Audit information will be added automatically. Audit params are: \"createdBy\" and \"createdTimestamp\".",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowMetadata"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Contents of DAG is invalid or partition ID is missing/invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict - Workflow with same name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowRequest"
              }
            }
          },
          "description": "Request payload for deploying new workflow."
        }
      }
    },
    "/workflow/{workflow_name}": {
      "get": {
        "tags": [
          "Workflow"
        ],
        "summary": "Get workflow by name",
        "operationId": "getWorkflow",
        "description": "Get details of a registered workflow using the workflow name.",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workflow_name",
            "in": "path",
            "description": "Workflow Name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow successfully returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowMetadata"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Partition ID is missing/invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Workflow"
        ],
        "summary": "Delete workflow by workflow name",
        "operationId": "deleteWorkflow",
        "description": "Delete a registered workflow based on the workflow name.  Workflow runs with status either SUCCESS or FAILED can be deleted.",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workflow_name",
            "in": "path",
            "description": "Workflow Name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Workflow successfully deleted",
            "content": {}
          },
          "400": {
            "description": "Bad Request. Partition ID is missing/invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workflow/{workflow_name}/workflowRun": {
      "get": {
        "tags": [
          "Workflow Run"
        ],
        "summary": "Get details of all workflows ever run",
        "operationId": "getAllWorkflowInstances",
        "description": "Get all the workflow run instances for the workflow specified by the workflow name.",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "params",
            "in": "query",
            "description": "params can be prefix, startDate, endDate and limit\n\n  prefix : prefix of the runId.\n  \n  startDate : Date on which workflow was triggered.\n  \n  endDate : Date on which workflow execution ended.\n  \n  limit : number of results.\n  ",
            "example": {
              "startDate": 1617709000423,
              "endDate": 1617710801960,
              "limit": 1,
              "prefix": "5"
            },
            "required": true,
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "workflow_name",
            "in": "path",
            "description": "Specify the workflow Name to get all the workflow run instances.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowRun"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Partition ID is missing/invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Workflow Run"
        ],
        "summary": "Triggers a workflow execution.",
        "operationId": "triggerWorkflow",
        "description": "Trigger the execution of a valid workflow which is already registered.<br><br> ",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workflow_name",
            "in": "path",
            "description": "Specify the workflow Name to run.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriggerWorkflowRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Workflow successfully triggered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Partition ID is missing/invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workflow/{workflow_name}/workflowRun/{runId}": {
      "get": {
        "tags": [
          "Workflow Run"
        ],
        "summary": "Get details of a specific workflow run instance.",
        "operationId": "getWorkflowRun",
        "description": "Returns the status of a workflow run which can be one of the following - \n\n  1. SUBMITTED - Workflow trigger accepted by platform, but actual\nworkflow run has not started. \n  2. RUNNING - Workflow in progress or under execution.\n  3. SUCCESS - Workflow run completed successfully.\n  4. FAILED - Workflow run completed with failures.           \n\n A workflow status of either SUCCESS or FAILED represents the completion of a workflow run. ",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workflow_name",
            "in": "path",
            "description": "Workflow Name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "description": "Run id for the workflow.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow execution detail.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Partition ID is missing/invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Workflow Run"
        ],
        "summary": "Update the status of a workflow run.",
        "operationId": "updateWorkflowRun",
        "description": "Explicitly update the status of a workflow run.",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workflow_name",
            "in": "path",
            "description": "Workflow Name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "description": "Run id for the workflow.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowRunRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Workflow updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Partition ID is missing/invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/workflow/{workflowId}/workflowRun/{runId}/getSignedUrl": {
      "get": {
        "tags": [
          "Workflow Run"
        ],
        "summary": "Get signed URL of a location that can be shared by tasks",
        "description": "Returns a signed url with read/write access to a location which can be shared between different tasks in a workflow run.",
        "operationId": "getSignedUrl",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workflowId",
            "in": "path",
            "description": "Workflow ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "description": "ID of the workflow run",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns signed url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSignedUrlResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request. Either the run completed or failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Run does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customOperator": {
      "post": {
        "tags": [
          "Custom Operators"
        ],
        "summary": "Add a new custom operator",
        "description": "Register a custom operator which can be re-used in multiple workflows.",
        "operationId": "registerCustomOperator",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Request payload for registering custom operator",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterCustomOperatorRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucessfully registered operator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomOperator"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operator with same name already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Custom Operators"
        ],
        "summary": "Get all registered custom operators",
        "description": "Get all the registered custom operators in a data partition.  The results can be limited using the limit parameter.",
        "operationId": "getAllCustomOperators",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of custom operators to return. Default value of Limit is 50.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Cursor for subsequent request.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns list of custom operators",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAllCustomOperatorsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/customOperator/{customOperatorId}": {
      "get": {
        "tags": [
          "Custom Operators"
        ],
        "summary": "Get custom operator by ID",
        "description": "Returns a single custom operator based on the custom operator ID.",
        "operationId": "getCustomOperatorById",
        "parameters": [
          {
            "name": "data-partition-id",
            "in": "header",
            "description": "desired data partition id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customOperatorId",
            "in": "path",
            "description": "ID of custom operator to return",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns custom operator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomOperator"
                }
              }
            }
          },
          "401": {
            "description": "Unknown or Invalid user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "User forbidden from accessing this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Custom operator not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/info": {
      "get": {
        "tags": [
          "Info"
        ],
        "summary": "Version info",
        "description": "For deployment available public `/info` endpoint,  which provides build and git related information.",
        "operationId": "Version info",
        "responses": {
          "200": {
            "description": "Version info.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionInfo"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "User Token from SLB Authenticator Service"
      }
    },
    "schemas": {
      "WorkflowRun": {
        "title": "Workflow Run",
        "description": "Represents one workflow run.",
        "type": "object",
        "properties": {
          "endTimeStamp": {
            "readOnly": true,
            "type": "number",
            "description": "End timestamp of the workflow run. Epoch timestamp."
          },
          "runId": {
            "readOnly": true,
            "type": "string",
            "description": "Run id for the workflow."
          },
          "startTimeStamp": {
            "readOnly": true,
            "type": "number",
            "description": "Start timestamp of the workflow run. Epoch time stamp."
          },
          "status": {
            "description": "Task execution status",
            "enum": [
              "submitted",
              "running",
              "failed",
              "success"
            ],
            "title": "status",
            "type": "string"
          },
          "submittedBy": {
            "readOnly": true,
            "type": "string",
            "description": "System captured user details which triggered the  run."
          },
          "workflowEngineExecutionDate": {
            "type": "string",
            "format": "date-time"
          },
          "workflowId": {
            "readOnly": true,
            "type": "string",
            "description": "Workflow id for the workflow."
          },
          "workflowName": {
            "type": "string",
            "description": "Name of the workflow."
          }
        }
      },
      "Error": {
        "title": "Error",
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorDetails"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ErrorDetails": {
        "title": "Error Details",
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "RegisterCustomOperatorRequest": {
        "type": "object",
        "required": [
          "name",
          "className",
          "description",
          "content"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "hello_world_operator"
          },
          "className": {
            "type": "string",
            "example": "HelloWorld"
          },
          "description": {
            "type": "string",
            "example": "Used to print hello world"
          },
          "content": {
            "type": "string",
            "example": "Content of the custom operator"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomOperatorProperty"
            }
          }
        }
      },
      "CustomOperator": {
        "type": "object",
        "required": [
          "id",
          "name",
          "className",
          "description"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "some_id"
          },
          "name": {
            "type": "string",
            "example": "hello_world_operator"
          },
          "className": {
            "type": "string",
            "example": "HelloWorld"
          },
          "description": {
            "type": "string",
            "example": "Used to print hello world"
          },
          "createdBy": {
            "type": "string",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomOperatorProperty"
            }
          }
        }
      },
      "CustomOperatorProperty": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "some Variable"
          },
          "description": {
            "type": "string",
            "example": "some Description"
          },
          "mandatory": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "GetAllCustomOperatorsResponse": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomOperator"
            }
          },
          "cursor": {
            "type": "string"
          }
        }
      },
      "GetSignedUrlResponse": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "example": "https://foo.com"
          }
        }
      },
      "UpdateWorkflowRunRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "submitted",
              "running",
              "failed",
              "success"
            ]
          }
        },
        "title": "UpdateWorkflowRunRequest"
      },
      "WorkflowMetadata": {
        "type": "object",
        "properties": {
          "createdBy": {
            "type": "string"
          },
          "creationTimestamp": {
            "type": "integer",
            "format": "int64"
          },
          "description": {
            "type": "string"
          },
          "registrationInstructions": {
            "type": "object",
            "$ref": "#/components/schemas/RegistrationInstructionsResponse"
          },
          "version": {
            "type": "integer",
            "format": "int64"
          },
          "workflowId": {
            "type": "string"
          },
          "workflowName": {
            "type": "string"
          }
        },
        "title": "WorkflowMetadata"
      },
      "CreateWorkflowRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "registrationInstructions": {
            "type": "object",
            "$ref": "#/components/schemas/RegistrationInstructions"
          },
          "workflowName": {
            "type": "string"
          }
        },
        "title": "CreateWorkflowRequest"
      },
      "WorkflowRunResponse": {
        "title": "Workflow Run Response",
        "description": "Represent one workflow run.",
        "type": "object",
        "properties": {
          "endTimeStamp": {
            "readOnly": true,
            "type": "number",
            "description": "End timestamp of the workflow run. Epoch timestamp."
          },
          "runId": {
            "readOnly": true,
            "type": "string",
            "description": "Run id for the workflow."
          },
          "startTimeStamp": {
            "readOnly": true,
            "type": "number",
            "description": "Start timestamp of the workflow run. Epoch timestamp."
          },
          "status": {
            "description": "Task execution status",
            "enum": [
              "submitted",
              "running",
              "failed",
              "success"
            ],
            "title": "status",
            "type": "string"
          },
          "submittedBy": {
            "readOnly": true,
            "type": "string",
            "description": "System captured user details which triggered the run."
          },
          "workflowId": {
            "readOnly": true,
            "type": "string",
            "description": "Workflow id for the workflow."
          }
        }
      },
      "TriggerWorkflowRequest": {
        "type": "object",
        "properties": {
          "executionContext": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Record id of file metadata record."
              },
              "dataPartitionId": {
                "type": "string",
                "description": "Data partition id."
              }
            }
          },
          "runId": {
            "type": "string",
            "description": "Optional. Run ID can be set explicitly by the user. If not set, the system will generate a run ID for the workflow run."
          }
        },
        "title": "TriggerWorkflowRequest"
      },
      "RegistrationInstructions": {
        "type": "object",
        "title": "RegistrationInstructions",
        "properties": {
          "dagName": {
            "type": "string",
            "description": "Name of the DAG"
          },
          "dagContent": {
            "type": "string",
            "description": "Workflow Detail file content which contains orchestration artifacts. For example, in case of Airflow, this field will contain contents of a python DAG file."
          }
        }
      },
      "RegistrationInstructionsResponse": {
        "type": "object",
        "title": "RegistrationInstructionsResponse",
        "properties": {
          "dagName": {
            "type": "string",
            "description": "Name of the DAG"
          }
        }
      },
      "VersionInfo": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string",
            "description": "Maven artifact group ID."
          },
          "actifactId": {
            "type": "string",
            "description": "Maven artifact ID."
          },
          "version": {
            "type": "string",
            "description": "Maven artifact version"
          },
          "buildTime": {
            "type": "string",
            "description": "Maven artifact build time"
          },
          "branch": {
            "type": "string",
            "description": "Current git branch"
          },
          "commitId": {
            "type": "string",
            "description": "Latest commit hash"
          },
          "commitMessage": {
            "type": "string",
            "description": "Latest commit message"
          },
          "connectedOuterServices": {
            "type": "array",
            "description": "Connected outer services information",
            "items": {
              "$ref": "#/components/schemas/ConnectedOuterService"
            }
          }
        },
        "description": "Version info."
      },
      "ConnectedOuterService": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Connected outer service name."
          },
          "version": {
            "type": "string",
            "description": "Connected outer service version."
          }
        },
        "description": "Connected outer service information."
      }
    }
  }
}