{
  "openapi": "3.0.1",
  "info": {
    "title": "Search and Download Workflow",
    "description": "Endpoints for fetching data",
    "version": "v1"
  },
  "paths": {
    "/api/entry/{id}": {
      "get": {
        "tags": [
          "Entry"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/api/entry/search": {
      "post": {
        "tags": [
          "Entry"
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EntrySearchParams"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntrySearchParams"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EntrySearchParams"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EntrySearchParams"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/api/file/{id}/text": {
      "get": {
        "tags": [
          "File"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/api/file/{id}/download": {
      "get": {
        "tags": [
          "File"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/api/wellbore/{id}": {
      "get": {
        "tags": [
          "Wellbore"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/api/wellbore/search": {
      "post": {
        "tags": [
          "Wellbore"
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/WellboreSearchParams"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WellboreSearchParams"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WellboreSearchParams"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WellboreSearchParams"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EntrySearchParams": {
        "type": "object",
        "properties": {
          "wellboreId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "searchTerm": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "fileStartDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "entryTypeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "entryTypeName": {
            "type": "string",
            "nullable": true
          },
          "remarks": {
            "type": "string",
            "nullable": true
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "take": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "skip": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "api": {
            "type": "string",
            "nullable": true
          },
          "fileExtension": {
            "type": "string",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "user": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "userId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "includeNewApprovals": {
            "type": "boolean",
            "nullable": true
          },
          "rigId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "asset": {
            "type": "string",
            "nullable": true
          },
          "includeDeletedFiles": {
            "type": "boolean",
            "nullable": true
          },
          "includeWellProperties": {
            "type": "boolean"
          },
          "onlyIncludeMatchingFiles": {
            "type": "boolean",
            "nullable": true
          },
          "wellboreName": {
            "type": "string",
            "nullable": true
          },
          "usaStateId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WellboreSearchParams": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "wellboreName": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "companyId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "asset": {
            "type": "string",
            "nullable": true
          },
          "stage": {
            "type": "string",
            "nullable": true
          },
          "rig": {
            "type": "string",
            "nullable": true
          },
          "searchTerm": {
            "type": "string",
            "nullable": true
          },
          "skip": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "take": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "padNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "padName": {
            "type": "string",
            "nullable": true
          },
          "wellboreTagValues": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "nullable": true
          },
          "api": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "usaStateId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "editedSince": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "proxyRopcAuth": {
        "type": "oauth2",
        "flows": {
          "password": {
            "tokenUrl": "https://identity.welldrive.com/connect/token",
            "scopes": {
              "WD.Partner.API": "Access to the proxy api.",
              "WD.Partner.API.Access": "Access to user access data endpoints."
            }
          }
        }
      },
      "proxyClientCredsAuth": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://identity.welldrive.com/connect/token",
            "scopes": {
              "WD.Partner.API": "Basic access."
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "proxyRopcAuth": [ ],
      "proxyClientCredsAuth": [ ]
    }
  ]
}