{
  "openapi": "3.0.0",
  "info": {
    "title": "MasterData API",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://api.production.de.insiders.cloud/1/rest"
    }
  ],
  "paths": {
    "/subsystems/masterdata/count/{subsystem}/{tableName}": {
      "get": {
        "operationId": "CountMasterDataActiveVersion",
        "parameters": [
          {
            "name": "subsystem",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-position": 1
          },
          {
            "name": "tableName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-position": 2
          }
        ],
        "responses": {
          "400": {
            "description": ""
          },
          "403": {
            "description": ""
          },
          "404": {
            "description": ""
          },
          "500": {
            "description": ""
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountMasterDataResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "token": []
          }
        ]
      }
    },
    "/subsystems/masterdata/count/{subsystem}/{tableName}/{versionType}": {
      "get": {
        "operationId": "CountMasterData",
        "parameters": [
          {
            "name": "subsystem",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-position": 1
          },
          {
            "name": "tableName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-position": 2
          },
          {
            "name": "versionType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-position": 3
          }
        ],
        "responses": {
          "400": {
            "description": ""
          },
          "403": {
            "description": ""
          },
          "404": {
            "description": ""
          },
          "500": {
            "description": ""
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountMasterDataResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "token": []
          }
        ]
      }
    },
    "/subsystems/masterdata/live": {
      "put": {
        "operationId": "WriteMasterDataLive",
        "requestBody": {
          "x-name": "request",
          "content": {
            "application/json": {
              "schema": {
                "nullable": false,
                "$ref": "#/components/schemas/WriteMasterDataLiveRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteDataResponse"
                }
              }
            }
          },
          "403": {
            "description": ""
          },
          "500": {
            "description": ""
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteMasterDataLiveResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "token": []
          }
        ]
      },
      "post": {
        "operationId": "DeleteMasterDataLive",
        "requestBody": {
          "x-name": "request",
          "content": {
            "application/json": {
              "schema": {
                "nullable": false,
                "$ref": "#/components/schemas/DeleteMasterDataLiveRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteDataResponse"
                }
              }
            }
          },
          "403": {
            "description": ""
          },
          "500": {
            "description": ""
          },
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteMasterDataLiveResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "token": []
          }
        ]
      }
    },
    "/subsystems/masterdata/version": {
      "get": {
        "operationId": "GetVersion",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetVersionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "token": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CountMasterDataResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "VersionType": {
            "$ref": "#/components/schemas/VersionType"
          },
          "Count": {
            "type": "integer",
            "format": "int64"
          },
          "Subsystem": {
            "type": "string"
          },
          "Tablename": {
            "type": "string"
          }
        }
      },
      "VersionType": {
        "type": "string",
        "description": "",
        "enum": [
          "Active",
          "Inactive"
        ]
      },
      "WriteMasterDataLiveRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tableName",
          "subsystem",
          "row",
          "columns"
        ],
        "properties": {
          "tableName": {
            "type": "string"
          },
          "subsystem": {
            "type": "string"
          },
          "row": {
            "type": "array",
            "items": {}
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "WriteDataResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MasterDataError"
            }
          }
        }
      },
      "MasterDataError": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "WriteMasterDataLiveResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DeleteMasterDataLiveRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tableName",
          "subsystem",
          "columns",
          "values"
        ],
        "properties": {
          "tableName": {
            "type": "string"
          },
          "subsystem": {
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "values": {
            "type": "array",
            "items": {}
          }
        }
      },
      "DeleteDataResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MasterDataError"
            }
          }
        }
      },
      "DeleteMasterDataLiveResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "GetVersionResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "Major": {
            "type": "string"
          },
          "Minor": {
            "type": "string"
          },
          "Patch": {
            "type": "string"
          },
          "Commit": {
            "type": "string"
          },
          "Version": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "token": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}