{
  "openapi": "3.0.4",
  "info": {
    "title": "Masterdata API",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://api.staging.de.insiders.cloud"
    }
  ],
  "paths": {
    "/1/rest/subsystems/masterdata/count/{subsystem}/{tableName}": {
      "get": {
        "tags": [
          "MasterData"
        ],
        "operationId": "CountMasterDataActiveVersion",
        "parameters": [
          {
            "name": "subsystem",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tableName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountMasterDataResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/CountMasterDataResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/1/rest/subsystems/masterdata/count/{subsystem}/{tableName}/{versionType}": {
      "get": {
        "tags": [
          "MasterData"
        ],
        "operationId": "CountMasterData",
        "parameters": [
          {
            "name": "subsystem",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tableName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "versionType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountMasterDataResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/CountMasterDataResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/1/rest/subsystems/masterdata/live": {
      "put": {
        "tags": [
          "MasterData"
        ],
        "operationId": "WriteMasterDataLive",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WriteMasterDataLiveRequest"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteMasterDataLiveResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteMasterDataLiveResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteMasterDataLiveResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteMasterDataLiveResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteMasterDataLiveResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteMasterDataLiveResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteMasterDataLiveResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteMasterDataLiveResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "MasterData"
        ],
        "operationId": "DeleteMasterDataLive",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/DeleteMasterDataLiveRequest"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteMasterDataLiveResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteMasterDataLiveResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteMasterDataLiveResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteMasterDataLiveResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteMasterDataLiveResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteMasterDataLiveResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteMasterDataLiveResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteMasterDataLiveResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CountMasterDataResponse": {
        "type": "object",
        "properties": {
          "VersionType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VersionType"
              }
            ]
          },
          "Count": {
            "type": "integer",
            "format": "int64"
          },
          "Subsystem": {
            "type": "string"
          },
          "Tablename": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DeleteMasterDataLiveRequest": {
        "required": [
          "columns",
          "subsystem",
          "tableName",
          "values"
        ],
        "type": "object",
        "properties": {
          "tableName": {
            "minLength": 1,
            "type": "string"
          },
          "subsystem": {
            "minLength": 1,
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "values": {
            "type": "array",
            "items": { }
          }
        },
        "additionalProperties": false
      },
      "DeleteMasterDataLiveResponse": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "nullable": true
          },
          "errorCode": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          },
          "details": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VersionType": {
        "enum": [
          "Active",
          "Inactive"
        ],
        "type": "string"
      },
      "WriteMasterDataLiveRequest": {
        "required": [
          "columns",
          "row",
          "subsystem",
          "tableName"
        ],
        "type": "object",
        "properties": {
          "tableName": {
            "minLength": 1,
            "type": "string"
          },
          "subsystem": {
            "minLength": 1,
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "row": {
            "type": "array",
            "items": { }
          }
        },
        "additionalProperties": false
      },
      "WriteMasterDataLiveResponse": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "token": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "token": [ ]
    }
  ],
  "tags": [
    {
      "name": "MasterData"
    }
  ]
}